|
@@ -539,22 +539,23 @@ def register():
|
539
|
539
|
|
540
|
540
|
|
541
|
541
|
# 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
|
|
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
|
551
|
551
|
|
552
|
552
|
|
553
|
553
|
#os.remove(img)
|
554
|
554
|
# return 'unable to recognize face'
|
555
|
555
|
|
556
|
|
- pool.close()
|
|
556
|
+ # pool.close()
|
557
|
557
|
#return results[0]
|
|
558
|
+ result=registered(url_list)
|
558
|
559
|
return 'Successfully saved encoding.........'
|
559
|
560
|
|
560
|
561
|
|