Fixed Start_Engine.
This commit is contained in:
		
							parent
							
								
									7e73cfe995
								
							
						
					
					
						commit
						1fd4263fc1
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -7,6 +7,7 @@ def start():
 | 
				
			||||||
    # Downloads all the user and thief photos from database to the project folder first or updates them.
 | 
					    # Downloads all the user and thief photos from database to the project folder first or updates them.
 | 
				
			||||||
    count = 0
 | 
					    count = 0
 | 
				
			||||||
    users = DBHelper.db.child("Users").get()
 | 
					    users = DBHelper.db.child("Users").get()
 | 
				
			||||||
 | 
					    thieves = DBHelper.db.child("Thieves").get()
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        for user in users.each():
 | 
					        for user in users.each():
 | 
				
			||||||
            count += 1
 | 
					            count += 1
 | 
				
			||||||
| 
						 | 
					@ -18,7 +19,7 @@ def start():
 | 
				
			||||||
        print("No Users are registered.")
 | 
					        print("No Users are registered.")
 | 
				
			||||||
    count = 0
 | 
					    count = 0
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        for user in users.each():
 | 
					        for thief in thieves.each():
 | 
				
			||||||
            count += 1
 | 
					            count += 1
 | 
				
			||||||
            if not os.path.isdir("Photos_of_Thieves/Thief_" + str(count)):
 | 
					            if not os.path.isdir("Photos_of_Thieves/Thief_" + str(count)):
 | 
				
			||||||
                os.makedirs("Photos_of_Thieves/Thief_" + str(count))
 | 
					                os.makedirs("Photos_of_Thieves/Thief_" + str(count))
 | 
				
			||||||
| 
						 | 
					@ -27,4 +28,6 @@ def start():
 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        print("No Thieves for now.")
 | 
					        print("No Thieves for now.")
 | 
				
			||||||
    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")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue