Просмотр исходного кода

Update 'Attendence/attendence.py'

SadhulaSaiKumar 1 год назад
Родитель
Сommit
ff2ec9ff9e
1 измененных файлов: 17 добавлений и 20 удалений
  1. 17
    20
      Attendence/attendence.py

+ 17
- 20
Attendence/attendence.py Просмотреть файл

278
     else:
278
     else:
279
         print ("pickle File not exist")
279
         print ("pickle File not exist")
280
         print(name)
280
         print(name)
281
-        return "Please get registered with your Profile Picture",500
282
-        # return "Face not found in profile (please change your profile)",500
283
-	   
281
+        return "Face not found in profile (please change your profile)"
284
 
282
 
285
     check_faces=People+"/" + y + "/" + y + ".jpg"
283
     check_faces=People+"/" + y + "/" + y + ".jpg"
286
     print(check_faces)
284
     print(check_faces)
334
 
332
 
335
     if (len(number_of_faces))>1:
333
     if (len(number_of_faces))>1:
336
         print("Group Photo")
334
         print("Group Photo")
337
-        return "Too Many Faces in Profile Picture",500
335
+        return "Group Photo"
338
     elif (len(number_of_faces))==1:
336
     elif (len(number_of_faces))==1:
339
         print("Single Photo")
337
         print("Single Photo")
340
         pass
338
         pass
508
             try:
506
             try:
509
                 results = pool.map(submit, url_list)
507
                 results = pool.map(submit, url_list)
510
             except FileNotFoundError:
508
             except FileNotFoundError:
511
-                return 'please get registered with your PhotoID',500
509
+                return 'plese get registered with your PhotoID'
512
             except IndexError:
510
             except IndexError:
513
                 #return 'unable to recognize face'
511
                 #return 'unable to recognize face'
514
-                #return 'failed',500
515
-                return "Face does not Match with Profile Picture",500
512
+                return 'failed'
516
 
513
 
517
         pool.close()
514
         pool.close()
518
 
515
 
539
 
536
 
540
 
537
 
541
         # multiprocessing
538
         # multiprocessing
542
-        #pool_size = multiprocessing.cpu_count() * 2
543
-        #with multiprocessing.Pool(pool_size) as pool:
544
-           # try:
545
-          #      results = pool.map(registered, url_list)
546
-          #  except IndexError:
547
-          #      pass
548
-          #     print('face not found')
549
-          #  except FileNotFoundError:
550
-          #      pass
539
+        # pool_size = multiprocessing.cpu_count() * 2
540
+        # with multiprocessing.Pool(pool_size) as pool:
541
+        #     try:
542
+        #         results = pool.map(registered, url_list)
543
+        #     except IndexError:
544
+        #         pass
545
+        #         print('face not found')
546
+        #     except FileNotFoundError:
547
+        #         pass
551
                 
548
                 
552
             
549
             
553
-                #os.remove(img)
554
-               # return 'unable to recognize face'
550
+        #         #os.remove(img)
551
+        #        # return 'unable to recognize face'
555
 
552
 
556
-  #      pool.close()
553
+        # pool.close()
557
         #return results[0]
554
         #return results[0]
558
-    		result=registered(url_list)
555
+        result=registered(url_list)
559
         return 'Successfully saved encoding.........'
556
         return 'Successfully saved encoding.........'
560
 
557
 
561
 
558
 

Загрузка…
Отмена
Сохранить