diff --git a/Photos_of_Users/User_1/0.jpg b/Photos_of_Users/User_1/0.jpg deleted file mode 100644 index 1c8668637..000000000 Binary files a/Photos_of_Users/User_1/0.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/1.jpg b/Photos_of_Users/User_1/1.jpg deleted file mode 100644 index a334b2855..000000000 Binary files a/Photos_of_Users/User_1/1.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/10.jpg b/Photos_of_Users/User_1/10.jpg deleted file mode 100644 index 4ee0647d5..000000000 Binary files a/Photos_of_Users/User_1/10.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/11.jpg b/Photos_of_Users/User_1/11.jpg deleted file mode 100644 index 39b255613..000000000 Binary files a/Photos_of_Users/User_1/11.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/12.jpg b/Photos_of_Users/User_1/12.jpg deleted file mode 100644 index 959a9574d..000000000 Binary files a/Photos_of_Users/User_1/12.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/13.jpg b/Photos_of_Users/User_1/13.jpg deleted file mode 100644 index f87719f55..000000000 Binary files a/Photos_of_Users/User_1/13.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/14.jpg b/Photos_of_Users/User_1/14.jpg deleted file mode 100644 index 3f8c7429d..000000000 Binary files a/Photos_of_Users/User_1/14.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/15.jpg b/Photos_of_Users/User_1/15.jpg deleted file mode 100644 index e6926999f..000000000 Binary files a/Photos_of_Users/User_1/15.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/16.jpg b/Photos_of_Users/User_1/16.jpg deleted file mode 100644 index 798203621..000000000 Binary files a/Photos_of_Users/User_1/16.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/17.jpg b/Photos_of_Users/User_1/17.jpg deleted file mode 100644 index ae33ad737..000000000 Binary files a/Photos_of_Users/User_1/17.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/18.jpg b/Photos_of_Users/User_1/18.jpg deleted file mode 100644 index 349116790..000000000 Binary files a/Photos_of_Users/User_1/18.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/19.jpg b/Photos_of_Users/User_1/19.jpg deleted file mode 100644 index e1ac74665..000000000 Binary files a/Photos_of_Users/User_1/19.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/2.jpg b/Photos_of_Users/User_1/2.jpg deleted file mode 100644 index 5b663e60a..000000000 Binary files a/Photos_of_Users/User_1/2.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/3.jpg b/Photos_of_Users/User_1/3.jpg deleted file mode 100644 index 4ed0d21b6..000000000 Binary files a/Photos_of_Users/User_1/3.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/4.jpg b/Photos_of_Users/User_1/4.jpg deleted file mode 100644 index 56225ee80..000000000 Binary files a/Photos_of_Users/User_1/4.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/5.jpg b/Photos_of_Users/User_1/5.jpg deleted file mode 100644 index 049893d57..000000000 Binary files a/Photos_of_Users/User_1/5.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/6.jpg b/Photos_of_Users/User_1/6.jpg deleted file mode 100644 index f74aa3fb9..000000000 Binary files a/Photos_of_Users/User_1/6.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/7.jpg b/Photos_of_Users/User_1/7.jpg deleted file mode 100644 index f69659cbd..000000000 Binary files a/Photos_of_Users/User_1/7.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/8.jpg b/Photos_of_Users/User_1/8.jpg deleted file mode 100644 index 8a7623bfa..000000000 Binary files a/Photos_of_Users/User_1/8.jpg and /dev/null differ diff --git a/Photos_of_Users/User_1/9.jpg b/Photos_of_Users/User_1/9.jpg deleted file mode 100644 index 5414367c6..000000000 Binary files a/Photos_of_Users/User_1/9.jpg and /dev/null differ diff --git a/__pycache__/Facial_Recognition_Wrapper.cpython-36.pyc b/__pycache__/Facial_Recognition_Wrapper.cpython-36.pyc index ad3761b3a..f6f436657 100644 Binary files a/__pycache__/Facial_Recognition_Wrapper.cpython-36.pyc and b/__pycache__/Facial_Recognition_Wrapper.cpython-36.pyc differ diff --git a/start_engine.py b/start_engine.py index daf2ae5d4..44475b9eb 100644 --- a/start_engine.py +++ b/start_engine.py @@ -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()