Added Face Enrollment to Remove_Face and CheckUp
This commit is contained in:
parent
bc15a21be3
commit
831792b3fa
9 changed files with 12 additions and 2 deletions
|
@ -3,6 +3,8 @@ import DBHelper
|
|||
from joblib import Parallel, delayed
|
||||
import multiprocessing
|
||||
|
||||
import Facial_Recognition_Enrollment
|
||||
|
||||
|
||||
def update():
|
||||
# Downloads all the user and thief photos from database to the project folder first or updates them.
|
||||
|
@ -17,7 +19,7 @@ def update():
|
|||
os.makedirs("Facial_images/face_rec/train/User_" + str(count))
|
||||
Parallel(n_jobs=multiprocessing.cpu_count())(
|
||||
delayed(download_parallel_user_photos)(i, count) for i in range(50))
|
||||
print("Success.")
|
||||
print("User data is found.")
|
||||
except:
|
||||
print("No Users are registered.")
|
||||
count = 0
|
||||
|
@ -29,9 +31,12 @@ def update():
|
|||
os.makedirs("Photos_of_Thieves/Thief_" + str(count))
|
||||
Parallel(n_jobs=multiprocessing.cpu_count())(
|
||||
delayed(download_parallel_thief_photos)(i, count) for i in range(50))
|
||||
print("Success.")
|
||||
print("Thief data is found.")
|
||||
except:
|
||||
print("No Thieves are registered.")
|
||||
print("Data saved! Starting enrollment...")
|
||||
Facial_Recognition_Enrollment.enroll_face_dataset()
|
||||
print("Success.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 0 B |
Binary file not shown.
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 0 B |
Binary file not shown.
Binary file not shown.
|
@ -4,6 +4,8 @@ from joblib import Parallel, delayed
|
|||
import multiprocessing
|
||||
import os
|
||||
|
||||
import Facial_Recognition_Enrollment
|
||||
|
||||
|
||||
def remove_your_face(firstname, lastname, email, phone):
|
||||
users = DBHelper.db.child("Users").get()
|
||||
|
@ -49,6 +51,9 @@ def remove_your_face(firstname, lastname, email, phone):
|
|||
DBHelper.get_phone("User_" + str(count2 + 1)))
|
||||
DBHelper.remove_data("User_" + str(count))
|
||||
shutil.rmtree("Facial_images/face_rec/train/User_" + str(count))
|
||||
print("Data saved! Starting enrollment...")
|
||||
Facial_Recognition_Enrollment.enroll_face_dataset()
|
||||
print("Face removal completed!")
|
||||
print("Success.")
|
||||
except:
|
||||
print("No Users exist for User Removal.")
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue