Fixed the code.

This commit is contained in:
Batuhan Berk Başoğlu 2020-11-15 11:49:49 -05:00
parent 3193e4d438
commit 91e4530b24
22 changed files with 11 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

View file

@ -8,27 +8,26 @@ def start():
count = 0
users = DBHelper.db.child("Users").get()
try:
for x in users.each():
for user in users.each():
count += 1
for y in range(20):
if not os.path.isdir("Facial_images/face_rec/train/User_" + str(count)):
os.makedirs("Photos_of_Users/User_" + str(count))
DBHelper.download_user_photo("User_" + str(count) + "/" + str(y) + ".jpg")
if not os.path.isdir("Facial_images/face_rec/train/User_" + str(count)):
os.makedirs("Facial_images/face_rec/train/User_" + str(count))
for i in range(20):
DBHelper.download_user_photo("User_" + str(count) + "/" + str(i) + ".jpg")
except:
print("No Users are registered.")
count = 0
try:
for x in users.each():
for user in users.each():
count += 1
for y in range(20):
if not os.path.isdir("Photos_of_Thieves/Thief_" + str(count)):
os.makedirs("Photos_of_Thieves/Thief_" + str(count))
DBHelper.download_thief_photo("Thief_" + str(count) + "/" + str(y) + ".jpg")
if not os.path.isdir("Photos_of_Thieves/Thief_" + str(count)):
os.makedirs("Photos_of_Thieves/Thief_" + str(count))
for i in range(20):
DBHelper.download_thief_photo("Thief_" + str(count) + "/" + str(i) + ".jpg")
except:
print("No Thieves for now.")
Facial_Recognition_Wrapper.training_recognizer("Fisher")
Facial_Recognition_Wrapper.face_recognition_inference("Fisher")
start()