Updated the execution time of Upload_Face and Upload_Thief.

This commit is contained in:
Batuhan Berk Başoğlu 2021-02-10 10:51:05 -05:00
parent 68b0e75db2
commit 9bbb33d3b1
61 changed files with 31 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,8 @@
import DBHelper
import Facial_Recognition_Registration
import Facial_Recognition_Enrollment
from joblib import Parallel, delayed
import multiprocessing
def upload_your_face(firstname, lastname, email, phone):
@ -15,22 +17,22 @@ def upload_your_face(firstname, lastname, email, phone):
count += 1
print("Face registration start...")
Facial_Recognition_Registration.register_your_face("User_" + str(count))
Parallel(n_jobs=multiprocessing.cpu_count())(
delayed(upload_parallel_user_photos)(i, count) for i in range(50))
DBHelper.upload_data("User_" + str(count), firstname, lastname, email, phone)
print("Data saved! Starting enrollment...")
Facial_Recognition_Enrollment.enroll_face_dataset()
print("Face registration completed!")
for i in range(50):
DBHelper.upload_user_photo("User_" + str(count) + "/" + str(i) + ".jpg")
DBHelper.upload_data("User_" + str(count), firstname, lastname, email, phone)
print("Success.")
except:
print("Face registration start...")
Facial_Recognition_Registration.register_your_face("User_1")
Parallel(n_jobs=multiprocessing.cpu_count())(
delayed(upload_parallel_user_photo)(i) for i in range(50))
DBHelper.upload_data("User_1", firstname, lastname, email, phone)
print("Data saved! Starting enrollment...")
Facial_Recognition_Enrollment.enroll_face_dataset()
print("Face registration completed!")
for i in range(50):
DBHelper.upload_user_photo("User_1/" + str(i) + ".jpg")
DBHelper.upload_data("User_1", firstname, lastname, email, phone)
print("Success.")
@ -40,3 +42,11 @@ if __name__ == "__main__":
e = input('Enter your E-Mail:')
p = input('Enter your Phone:')
upload_your_face(f, l, e, p)
def upload_parallel_user_photos(i, count):
DBHelper.upload_user_photo("User_" + str(count) + "/" + str(i) + ".jpg")
def upload_parallel_user_photo(i):
DBHelper.upload_user_photo("User_1/" + str(i) + ".jpg")

View file

@ -1,6 +1,8 @@
import DBHelper
import Facial_Recognition_Thief_Registration
from datetime import datetime
from joblib import Parallel, delayed
import multiprocessing
def upload_thief_face():
@ -13,16 +15,16 @@ def upload_thief_face():
for thief in thieves.each():
count += 1
Facial_Recognition_Thief_Registration.register_your_face("Thief_" + str(count))
for i in range(50):
DBHelper.upload_thief_photo("Thief_" + str(count) + "/" + str(i) + ".jpg")
Parallel(n_jobs=multiprocessing.cpu_count())(
delayed(upload_parallel_thief_photos)(i, count) for i in range(50))
date = datetime.now().strftime("%d/%m/%Y")
time = datetime.now().strftime("%H:%M:%S")
DBHelper.upload_thief_data("Thief_" + str(count), date, time)
print("An intruder is recorded.")
except:
Facial_Recognition_Thief_Registration.register_your_face("Thief_1")
for i in range(50):
DBHelper.upload_thief_photo("Thief_1/" + str(i) + ".jpg")
Parallel(n_jobs=multiprocessing.cpu_count())(
delayed(upload_parallel_thief_photo)(i) for i in range(50))
date = datetime.now().strftime("%d/%m/%Y")
time = datetime.now().strftime("%H:%M:%S")
DBHelper.upload_thief_data("Thief_1", date, time)
@ -31,3 +33,11 @@ def upload_thief_face():
if __name__ == "__main__":
upload_thief_face()
def upload_parallel_thief_photos(i, count):
DBHelper.upload_thief_photo("Thief_" + str(count) + "/" + str(i) + ".jpg")
def upload_parallel_thief_photo(i):
DBHelper.upload_thief_photo("Thief_1/" + str(i) + ".jpg")

Binary file not shown.

Binary file not shown.

View file

@ -9,7 +9,7 @@ def start():
for user in users.each():
count += 1
if count != 0:
print("Starting the Face Recognition Software...")
print("Initializing the Face Recognition Software...")
Facial_Recognition_Inference.inference()
else:
print("No Users exist for Facial Recognition Software.")