Added Print statements.

This commit is contained in:
Batuhan Berk Başoğlu 2020-11-16 13:15:24 -05:00
parent e214ba9498
commit f5e99dd345
4 changed files with 5 additions and 1 deletions

Binary file not shown.

View file

@ -8,6 +8,7 @@ def start():
count = 0 count = 0
users = DBHelper.db.child("Users").get() users = DBHelper.db.child("Users").get()
thieves = DBHelper.db.child("Thieves").get() thieves = DBHelper.db.child("Thieves").get()
print("Checking and updating User photos...")
try: try:
for user in users.each(): for user in users.each():
count += 1 count += 1
@ -15,9 +16,11 @@ def start():
os.makedirs("Facial_images/face_rec/train/User_" + str(count)) os.makedirs("Facial_images/face_rec/train/User_" + str(count))
for i in range(20): for i in range(20):
DBHelper.download_user_photo("User_" + str(count) + "/" + str(i) + ".jpg") DBHelper.download_user_photo("User_" + str(count) + "/" + str(i) + ".jpg")
print("Success.")
except: except:
print("No Users are registered.") print("No Users are registered.")
count = 0 count = 0
print("Checking and updating Thief photos...")
try: try:
for thief in thieves.each(): for thief in thieves.each():
count += 1 count += 1
@ -25,7 +28,8 @@ def start():
os.makedirs("Photos_of_Thieves/Thief_" + str(count)) os.makedirs("Photos_of_Thieves/Thief_" + str(count))
for i in range(20): for i in range(20):
DBHelper.download_thief_photo("Thief_" + str(count) + "/" + str(i) + ".jpg") DBHelper.download_thief_photo("Thief_" + str(count) + "/" + str(i) + ".jpg")
print("Success.")
except: except:
print("No Thieves for now.") print("No Thieves are registered.")
Facial_Recognition_Wrapper.training_recognizer("Fisher") Facial_Recognition_Wrapper.training_recognizer("Fisher")
Facial_Recognition_Wrapper.face_recognition_inference("Fisher") Facial_Recognition_Wrapper.face_recognition_inference("Fisher")