Fix crash problem
|
@ -1,4 +1,7 @@
|
||||||
import pyrebase
|
import pyrebase
|
||||||
|
import sys
|
||||||
|
|
||||||
|
pwd = sys.path[0]
|
||||||
|
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
'apiKey': "AIzaSyAdL0W5HscjEDFPK4BDi6Cnc7FLa30GPYY",
|
'apiKey': "AIzaSyAdL0W5HscjEDFPK4BDi6Cnc7FLa30GPYY",
|
||||||
|
@ -9,7 +12,7 @@ firebaseConfig = {
|
||||||
'messagingSenderId': "163692530359",
|
'messagingSenderId': "163692530359",
|
||||||
'appId': "1:163692530359:web:b6dc7ccfc56a79afb11b32",
|
'appId': "1:163692530359:web:b6dc7ccfc56a79afb11b32",
|
||||||
'measurementId': "G-EPWP2LK89Q",
|
'measurementId': "G-EPWP2LK89Q",
|
||||||
'serviceAccount': 'vehicleantitheftrecognition-firebase-adminsdk-krrgw-05da515de5.json'
|
'serviceAccount': pwd + '/vehicleantitheftrecognition-firebase-adminsdk-krrgw-05da515de5.json'
|
||||||
}
|
}
|
||||||
|
|
||||||
firebase = pyrebase.initialize_app(firebaseConfig)
|
firebase = pyrebase.initialize_app(firebaseConfig)
|
||||||
|
|
|
@ -26,7 +26,7 @@ def inference():
|
||||||
index = np.load(pwd + '/Facial_models/index.pkl', allow_pickle=True)
|
index = np.load(pwd + '/Facial_models/index.pkl', allow_pickle=True)
|
||||||
faceDescriptorsEnrolled = np.load(pwd + '/Facial_models/descriptors.npy')
|
faceDescriptorsEnrolled = np.load(pwd + '/Facial_models/descriptors.npy')
|
||||||
|
|
||||||
cam = cv2.VideoCapture(0)
|
cam = cv2.VideoCapture(1)
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
x1 = x2 = y1 = y2 = 0
|
x1 = x2 = y1 = y2 = 0
|
||||||
|
@ -81,14 +81,14 @@ def inference():
|
||||||
|
|
||||||
# print("time taken = {:.3f} seconds".format(time.time() - t))
|
# print("time taken = {:.3f} seconds".format(time.time() - t))
|
||||||
|
|
||||||
cv2.rectangle(im, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
cv2.rectangle(im, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
||||||
font_face = cv2.FONT_HERSHEY_SIMPLEX
|
font_face = cv2.FONT_HERSHEY_SIMPLEX
|
||||||
font_scale = 0.8
|
font_scale = 0.8
|
||||||
text_color = (0, 255, 0)
|
text_color = (0, 255, 0)
|
||||||
printLabel = '{} {:0.4f}'.format(label, minDistance)
|
printLabel = '{} {:0.4f}'.format(label, minDistance)
|
||||||
cv2.putText(im, printLabel, (int(x1), int(y1)), font_face, font_scale, text_color, thickness=2)
|
cv2.putText(im, printLabel, (int(x1), int(y1)), font_face, font_scale, text_color, thickness=2)
|
||||||
|
|
||||||
cv2.imshow('img', im)
|
cv2.imshow('img', im)
|
||||||
|
|
||||||
k = cv2.waitKey(1) & 0xff
|
k = cv2.waitKey(1) & 0xff
|
||||||
if k == 27:
|
if k == 27:
|
||||||
|
|
4
Main.py
|
@ -1,5 +1,5 @@
|
||||||
import DBHelper
|
import DBHelper
|
||||||
import Start_Engine
|
import start_engine
|
||||||
import Upload_Face
|
import Upload_Face
|
||||||
import Remove_Face
|
import Remove_Face
|
||||||
import Check_Up
|
import Check_Up
|
||||||
|
@ -10,7 +10,7 @@ if __name__ == "__main__":
|
||||||
print("Starting the program.")
|
print("Starting the program.")
|
||||||
while True:
|
while True:
|
||||||
if DBHelper.get_power() == "on":
|
if DBHelper.get_power() == "on":
|
||||||
Start_Engine.start()
|
start_engine.start()
|
||||||
|
|
||||||
if None not in (DBHelper.get_register_firstname(),
|
if None not in (DBHelper.get_register_firstname(),
|
||||||
DBHelper.get_register_lastname(),
|
DBHelper.get_register_lastname(),
|
||||||
|
|
BIN
Photos_of_Thieves/Thief_1/0.jpg
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
Photos_of_Thieves/Thief_1/1.jpg
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
Photos_of_Thieves/Thief_1/10.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/11.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/12.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/13.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/14.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/15.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/16.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/17.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/18.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/19.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/2.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/20.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/21.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/22.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/23.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/24.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/25.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/26.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/27.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/28.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/29.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/3.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/30.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/31.jpg
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
Photos_of_Thieves/Thief_1/32.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/33.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/34.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/35.jpg
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
Photos_of_Thieves/Thief_1/36.jpg
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
Photos_of_Thieves/Thief_1/37.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/38.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/4.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/5.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/6.jpg
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Photos_of_Thieves/Thief_1/7.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/8.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Photos_of_Thieves/Thief_1/9.jpg
Normal file
After Width: | Height: | Size: 5.9 KiB |