552 Commits

Author SHA1 Message Date
Sefik Ilkin Serengil
dc57b9d43f
enforce_detection desc 2022-06-15 17:20:43 +01:00
sasael
3f29c6a606 Added dominant_gender and probabilities for man / woman results in analyze function 2022-06-12 15:35:53 +03:00
Sefik Ilkin Serengil
2bd5a5d572 script 2022-05-23 23:56:30 +01:00
Sefik Ilkin Serengil
631cf64236 sface class 2022-05-10 22:39:54 +01:00
Sefik Ilkin Serengil
11df8d529f sface cleaner 2022-05-10 20:09:31 +01:00
Sefik Ilkin Serengil
f3d2a1f95a SFace thresholds 2022-05-10 00:36:21 +01:00
Sefik Ilkin Serengil
f89eb9264d sface threshold 2022-05-09 21:58:09 +01:00
Sefik Ilkin Serengil
cddc78f48d sface updates 2022-05-09 21:51:33 +01:00
Sefik Ilkin Serengil
8eafd08fc9
Merge branch 'master' into master 2022-05-09 21:44:14 +01:00
Rodrigo Andrade
3c0d84e34b fix input shape size 2022-05-08 21:35:25 -03:00
Rodrigo Andrade
1d18013978 fix typo 2022-05-08 21:27:56 -03:00
Rodrigo Andrade
a5ecdc1d8c use preprocessing from opencv 2022-05-08 21:27:42 -03:00
Rodrigo Andrade
9852bbe482 added sface 2022-05-08 21:19:52 -03:00
Rodrigo Andrade
f74e944dc6 sface wrapper 2022-05-08 21:19:41 -03:00
Onur Atakan ULUSOY
709cdc8109
Import fire 2022-05-09 00:13:53 +03:00
Onur Atakan ULUSOY
78358f7812
Merge branch 'master' into adding_command_line_interface 2022-05-08 23:23:06 +03:00
Onur Atakan ULUSOY
2d0aad07bb Save Operation for CLI 2022-05-08 23:20:42 +03:00
Sefik Ilkin Serengil
7a313f8fb0 main 2022-05-08 20:25:43 +01:00
Sefik Ilkin Serengil
31de8d7461 fire removed 2022-05-08 20:17:52 +01:00
Onur Atakan ULUSOY
a7cbf6da63 Added command line interface via fire library 2022-05-08 13:24:03 +03:00
Sefik Ilkin Serengil
fb68d4a8f8
numpy bgr 2022-05-01 09:26:49 +01:00
EigenEmara
8ceadea6ae Allow silent operation for find() 2022-04-15 10:23:01 +02:00
renhaa
4c0cdefe82
Fix typo in analyze docstring
```python
models['race'] = DeepFace.build_model('race')
```
gives
``` 
ValueError: Invalid model_name passed - race
```
Should be capital "Race"
```python
models['race'] = DeepFace.build_model('Race')
```
2022-03-15 09:29:48 +01:00
Sefik Ilkin Serengil
d080107998 issue 435 2022-03-11 20:43:56 +00:00
Sefik Ilkin Serengil
5171484957
simplified code 2022-01-19 12:07:57 +03:00
Sefik Ilkin Serengil
3485c348bc
previous code 2022-01-19 11:55:31 +03:00
sotirismos
4e2f8aba88 enhanced cropping of detected faces 2022-01-18 22:33:22 +02:00
Sefik Ilkin Serengil
12f34aa53f
Merge pull request #346 from blueprintparadise/master
Add MediapipeWrapper as a detector
2022-01-12 21:47:24 +03:00
Sefik Ilkin Serengil
b4122698b6
verify outputs 2022-01-12 17:18:18 +03:00
Sefik Ilkin Serengil
36ef4dc3f1 bug fix after pr 2022-01-08 09:41:56 +03:00
Sefik Ilkin Serengil
ea10243c7e
target_size in detectFace 2021-12-24 11:44:46 +03:00
Kanan_Mahammadli
799eb6c7a0 Modified functions.py so that it can read from https 2021-12-22 19:09:15 +03:00
Sefik Ilkin Serengil
96f7540199
division by 0 fixed 2021-11-13 11:26:48 +03:00
Sefik Ilkin Serengil
1ad0ffc6d9
continue if no face detected 2021-11-13 11:22:28 +03:00
Bosco Yung
a2f7ce6f97
Fix wrong img variable 2021-11-11 16:20:02 +08:00
Bosco Yung
9b816648e0
Remove extra BGR2RGB call in RetinaFaceWrapper
I suggest removing the extra BGR2RGB call.

While the RetinaFace model does expect RGB images, the corresponding conversion will be done in the RetinaFace preprocessing:
0c8d3ed8bd/retinaface/commons/preprocess.py (L45)

The extra BGR2RGB call here will in fact make the final channel order wrong, because OpenCV does not know about the channel order, each call will simply swap the channels.

Thanks!
2021-11-10 16:01:51 +08:00
blueprintparadise
4fc81fd2ef
Update MediapipeWrapper.py 2021-09-28 17:02:32 +05:30
blueprintparadise
f07f278d22
Update FaceDetector.py 2021-09-28 16:28:20 +05:30
blueprintparadise
ae10f5a352
Add files via upload 2021-09-28 16:26:15 +05:30
fpaludi
dbfebea430 Remove mutable objects from analyze arguments. Add tests to validate 2021-09-22 19:56:23 -03:00
Roelof Ruis
5a61a20ecf specify model directory via DEEPFACE_HOME env variable 2021-08-23 15:26:36 +02:00
Roelof Ruis
5b280dcb81 function name snake case 2021-08-23 15:08:47 +02:00
Sefik Ilkin Serengil
b024060284 ability to skip pre-processing 2021-08-19 17:37:01 +03:00
Sefik Ilkin Serengil
885f89dd52 issue 309 - lfw with detectors 2021-08-19 17:32:41 +03:00
Sefik Ilkin Serengil
d1e16f68b5 normalize_input simplified 2021-08-01 22:51:55 +03:00
Sefik Ilkin Serengil
e4484ac309 issue 131 normalization 2021-07-31 22:14:52 +03:00
Sefik Ilkin Serengil
b4631f1562 align arg for detectFace 2021-07-30 17:06:16 +03:00
Sefik Ilkin Serengil
3962545c82 issue 289 2021-07-27 18:50:56 +03:00
Sefik Ilkin Serengil
d3e03c3e5a detector argument for stream 2021-07-27 00:15:15 +03:00
Sefik Ilkin Serengil
74704452a3 bug 284 2021-07-13 09:39:43 +03:00
Sefik Ilkin Serengil
922682c1fa facenet 512 2021-07-12 23:25:37 +03:00
Sefik Ilkin Serengil
8d304056a8 progress bar 2021-07-10 22:20:27 +03:00
Martin Knoche
99fa752555
Added prog_bar keyword argument
To be able to disable tqdm progress bars in "analyze" method
2021-07-09 14:21:37 +02:00
Sefik Ilkin Serengil
a904d9007c google drive to github release 2021-07-03 00:27:35 +03:00
Sefik Ilkin Serengil
ed9367b8f1
resize approach 2021-07-02 09:30:27 +03:00
Sefik Ilkin Serengil
94236318ac
comments for resize 2021-07-01 17:17:46 +03:00
Libo-Xu
74d2f98883
Finish the TODO in function "preprocess_face"
Resize the detected face image proportionally then add black pixels to resize it to target_size, which avoids the transformation on the detected faces resulting from resizing directly.
2021-07-01 10:40:11 +08:00
Sefik Ilkin Serengil
5e2c530835 singleton comment 2021-06-27 00:56:27 +03:00
Sefik Ilkin Serengil
d73dcd5f23 region duplication simlified 2021-06-26 23:19:39 +03:00
Sefik Ilkin Serengil
a35b31d242 Merge branch 'master' of https://github.com/serengil/deepface 2021-06-26 23:13:54 +03:00
Sefik Ilkin Serengil
0fc1672c89 lightweight api 2021-06-26 23:13:46 +03:00
Sefik Ilkin Serengil
2c2aaa0ede
retinaface is not a must dependency 2021-06-25 16:01:47 +03:00
Sefik Ilkin Serengil
ea1497e35d eye detection procedure 2021-06-24 16:09:34 +03:00
Sefik Ilkin Serengil
057f06c09c detectFace bug + robust eye detector 2021-06-24 15:59:59 +03:00
Sefik Ilkin Serengil
18c96e492e performance improvement 2021-06-24 09:30:45 +03:00
Sefik Ilkin Serengil
8458e107c7 no need to use initialize_detector function anymore 2021-06-24 00:35:47 +03:00
Sefik Ilkin Serengil
e0809bf490 face recognition models as global 2021-06-24 00:11:06 +03:00
Sefik Ilkin Serengil
9f31012ef4 detector as a global variable 2021-06-24 00:00:20 +03:00
Sefik Ilkin Serengil
62baee3b45 more robust eye detector for opencv 2021-06-23 23:36:40 +03:00
Sefik Ilkin Serengil
8071733ddf opencv detector is default 2021-06-23 13:46:47 +03:00
Sefik Ilkin Serengil
67149c629b stream bug 2021-06-15 18:36:47 +03:00
Sefik Ilkin Serengil
4267953dc3 retinaface as default detector 2021-06-13 17:12:38 +03:00
Sefik Ilkin Serengil
804fbaa511 52 version causes trouble for stream 2021-05-28 09:32:06 +03:00
Sefik Ilkin Serengil
9af7c33ff7 version 0.0.52 2021-05-27 22:41:51 +03:00
Sefik Ilkin Serengil
3cd55fcf00
mtcnn is not a mandatory lib 2021-05-27 16:43:48 +03:00
Sefik Ilkin Serengil
1812391a3c align argument 2021-04-29 21:38:08 +03:00
Sefik Ilkin Serengil
73d1950133 initialize detector in represent 2021-04-29 21:19:49 +03:00
Sefik Ilkin Serengil
91aa422677 some comments 2021-04-29 21:04:08 +03:00
Sefik Ilkin Serengil
d11f08958e global eye detector for opencv and ssd 2021-04-29 21:00:25 +03:00
Sefik Ilkin Serengil
f4c78457c2 retinaface perf 2021-04-29 09:11:33 +03:00
Sefik Ilkin Serengil
0bdc341ce7 clean code in detectors interface 2021-04-28 23:03:15 +03:00
Sefik Ilkin Serengil
b898f97b38 detector mechanism 2021-04-28 21:42:58 +03:00
Sefik Ilkin Serengil
974f8bf27b retinaface added 2021-04-26 21:37:01 +03:00
Sefik Ilkin Serengil
b0f152ab31 ignore tf2 warnings 2021-04-11 14:25:22 +03:00
Sefik Ilkin Serengil
45b4714f47 represent function referenced in verify 2021-04-11 14:19:33 +03:00
Sefik Ilkin Serengil
d43aacb87e represent function 2021-04-10 12:30:24 +03:00
olive380
1b2ac91dfc
Fix bounding box for dlib
Change right --> top
2021-03-29 16:04:44 +02:00
Sefik Ilkin Serengil
83a2be7a5d stream video 2021-03-21 18:38:06 +03:00
Sefik Serengil
fee02411b3 issue 197 2021-03-09 22:16:34 +03:00
Sefik Serengil
97be78b004 face region fixes 2021-02-17 20:18:04 +03:00
Sean Yong
1f8bea146e Fixed bug with ssd facebox region 2021-02-17 13:55:49 +08:00
Sean Yong
e22072142e Added retrieve bounding box from analysis 2021-02-17 13:23:01 +08:00
Sefik Ilkin Serengil
d37e8930fc
issue 185 2021-02-11 11:58:22 +03:00
Sefik Serengil
e295cbfb55 issue 182 resolved 2021-02-05 20:57:57 +03:00
Sefik Ilkin Serengil
2dea7aeeba
issue 175 2021-01-25 21:26:33 +03:00
Sefik Serengil
286d48395d issue 162, deepid find 2021-01-13 22:41:17 +03:00
serengil
27843d69b4 boosting gdown dependency 2020-12-26 21:38:23 +03:00
serengil
0ef832c081 bug fixed for numpy inputs 2020-12-22 11:40:28 +03:00
serengil
6be5b2d41a analyze function is cleaner 2020-12-21 23:30:00 +03:00
serengil
5cfdb3b179 arcface added 2020-12-14 15:04:41 +03:00
serengil
767b2028b5 tf2 2020-12-13 20:10:41 +03:00
serengil
ada31621ac tf 2 compatible 2020-12-13 18:57:53 +03:00
serengil
08ce14e151 eye detector wasn't initialized for ssd backend 2020-12-08 09:49:36 +03:00
serengil
7b34c89d5d initialize input moved to functions 2020-12-07 22:40:18 +03:00
serengil
0eb2fcec6c docstrings 2020-12-05 20:43:06 +03:00
serengil
b1245e7055 real time implementation 2020-12-04 16:50:11 +03:00
serengil
7f8186278d .jpg .JPG problem 2020-12-04 14:50:40 +03:00
serengil
e2fde9157b dlib and lgbm are not must 2020-12-04 14:28:18 +03:00
serengil
3907515a0d clean codes 2020-12-02 11:10:54 +03:00
serengil
9f436f39a7 ensemble verify becomes cleaner 2020-11-30 19:51:20 +03:00
serengil
45f17417af boost verify 2020-11-30 16:50:49 +03:00
serengil
4535e37c52 unused library imports removed 2020-11-30 14:26:14 +03:00
serengil
0b257841cb common boosting function 2020-11-30 14:20:17 +03:00
serengil
9c46a9ab17 dict for json instead of string in verification 2020-11-30 12:42:02 +03:00
serengil
3057d82e0f common input initializer for img pairs as arrays 2020-11-30 11:47:30 +03:00
serengil
edae2a799c dlib input shape retrieved from class similar to others 2020-11-30 11:11:16 +03:00
serengil
cdea61c043 json resp handled with dict instead of string 2020-11-30 09:59:41 +03:00
serengil
4d9e252d93 unnecessary comments removed 2020-11-29 22:04:12 +03:00
serengil
6e4cf06738 check face_detector global variable initialized 2020-11-29 22:02:31 +03:00
serengil
b663ac641b global detector initializer 2020-11-29 21:41:09 +03:00
serengil
005f3bee31 global model building function created 2020-11-29 12:39:25 +03:00
ma7555
85235fdadb Loads MTCNN once only + add better readibility
This builds the MTCNN network only once for faster inference
2020-11-28 15:17:11 +02:00
sugyan
4dda4caee4 Fix preprocess_face for age prediction 2020-11-26 23:10:35 +09:00
serengil
aa25d178c4 mtcnn is a must 2020-09-29 15:16:47 +03:00
Şefik Serangil
e6da083983 issue 100 - if detected face has 0 in some dimension 2020-09-27 09:11:05 +03:00
Şefik Serangil
ebb317c693 dlib is optional 2020-09-23 21:13:48 +03:00
Şefik Serangil
3be387b92b dlib is optional 2020-09-17 20:41:07 +03:00
Şefik Serangil
33fe352930 dlib, mtcnn and lgbm optional 2020-09-17 20:27:42 +03:00
Şefik Serangil
f3de735d72 mtcnn is a must dependency 2020-09-10 07:59:52 +03:00
Şefik Serangil
ef2686bde2 clean code typos fixed 2020-09-09 14:02:57 +03:00
Şefik Serangil
81f8adb1d5 clean code 2020-09-08 13:22:03 +03:00
Şefik Serangil
a0c06a3792 stream bug fixed 2020-09-08 09:07:08 +03:00
Şefik Serangil
99fad576fa desc for detectors 2020-09-07 08:42:44 +03:00
Şefik Serangil
01614eaeff clean code in preprocess 2020-09-06 11:56:09 +03:00
Şefik Serangil
7f6d9075d1 common align procedure added for opencv and mtcnn 2020-09-06 11:46:52 +03:00
Şefik Serangil
b9abfb9c00 new backends for detectors 2020-09-05 22:47:20 +03:00
Şefik Serangil
4f7c5273c9 issue 89 solved 2020-09-03 09:13:35 +03:00
Şefik Serangil
7b3594fe03 Merge branch 'master' of https://github.com/serengil/deepface 2020-09-02 10:44:48 +03:00
Şefik Serangil
2351c9a3b5 warning added to stream function 2020-09-02 10:44:13 +03:00
Pradeep
0c53956360 Provide the ability to override the default gdrive model weights 2020-08-26 12:14:39 +01:00
Şefik Serangil
3471874b8f dlib resnet added 2020-08-16 21:24:12 +03:00
Sefik Ilkin Serengil
0c12758695
typo fixed 2020-08-08 18:29:39 +03:00
Şefik Serangil
9fcd62adcc download ensemble model 2020-07-01 14:19:12 +03:00
Şefik Serangil
b72b2ef05b division by zero problem 2020-06-28 11:28:14 +03:00
Şefik Serangil
45892dde2b input shape might be array for some versions 2020-06-21 09:39:24 +03:00
Şefik Serangil
7df474934c fix after PR 2020-06-18 14:54:26 +03:00
danielgo13
e09d277be9 fix: check first the type of the input_shape before get the shape. Also fix the if-else model_name 2020-06-18 18:30:13 +07:00
Şefik Serangil
be0b0d40c8 deepid bug fixed 2020-06-17 09:56:59 +03:00
Şefik Serangil
4bb49ab446 deepid in api and stream 2020-06-17 09:05:34 +03:00
Şefik Serangil
79e481ee7c deepid model added 2020-06-16 23:48:18 +03:00
Şefik Serangil
44078eddb8 ensemble pre-trained model 2020-06-15 16:11:57 +03:00
Şefik Serangil
787be49db4 deepface path for ensemble 2020-06-15 16:06:41 +03:00
Sefik Ilkin Serengil
a4ac69625f
confidence score removed 2020-06-08 10:49:52 +03:00
Şefik Serangil
f95f5acbe8 unit tests for find and ensemble 2020-06-08 10:26:56 +03:00
Şefik Serangil
2f9815a1fc ensemble in find function 2020-06-08 09:46:08 +03:00
Şefik Serangil
cc5440c6d7 ensemble learning 2020-06-07 23:38:01 +03:00
Sefik Ilkin Serengil
8fbc194f29
alternative thresholds as comment 2020-06-01 14:52:23 +03:00
Şefik Serangil
4440d82d44 distance in find function implemented 2020-05-25 17:23:15 +03:00
Şefik Serangil
89142e6872 find function added 2020-05-25 14:59:51 +03:00
Sefik Ilkin Serengil
892cbae56a
set enforce_detection to False message 2020-05-15 13:19:54 +03:00
Şefik Serangil
eeacf48069 bug fix 2020-05-04 13:38:57 +03:00
Şefik Serangil
728df10e46 progress bar 2020-05-04 11:48:14 +03:00
Şefik Serangil
74d8a64d57 enforce face detection option 2020-05-04 10:54:28 +03:00
Uria Franko
c6300b53e0 Typo Mistake 2020-04-21 16:24:47 +03:00
Uria Franko
58b0b0a037 Prevent re-detect on 224 2020-04-21 16:02:03 +03:00
Şefik Serangil
6f51009ccd memory allocation + graph problem in verify 2020-04-20 14:30:11 +03:00
Sefik Ilkin Serengil
32b9ee5369
duplicated import 2020-04-20 09:03:00 +03:00
Şefik Serangil
fa81b4f7fd passing built models for analysis from api 2020-04-17 20:19:32 +03:00
Uria Franko
987c5782a0 Revert "Revert "Analyze Pass Models""
This reverts commit 378417f7691a5240434389728a73ff66719274cd.
2020-04-17 14:59:01 +03:00
Uria Franko
378417f769 Revert "Analyze Pass Models"
This reverts commit b124c7bd391f492f07df3fd4a5f13888be3f8426.
2020-04-17 14:57:53 +03:00
Uria Franko
b124c7bd39 Analyze Pass Models 2020-04-17 14:49:10 +03:00
Uria Franko
1fcbd36464 Return Built Models 2020-04-16 11:32:56 +03:00
Uria Franko
93c9462161 Load models to memory
2 new functions:
verify_init(model_name)
analyze_init(models)

The functions created in order to pre load models to memory for shorter analzye / verify first time
Ex:
Real time analyze waiting for first face to show
without analyze_init()
first analyze takes 1.5 sec
with analyze_init()
first analyze takes 0.3 sec
2020-04-16 10:37:23 +03:00
Uria Franko
8cc09f4314 Update DeepFace.py 2020-04-16 10:29:34 +03:00
Uria Franko
459b40d0e8 Update DeepFace.py 2020-04-16 10:27:50 +03:00
Şefik Serangil
ccb7aafc48 api 2020-04-11 16:38:31 +03:00
Şefik Serangil
6bb308a7e1 model building once for api 2020-04-11 15:37:47 +03:00
Şefik Serangil
71edb0150f plotting disabled 2020-04-09 16:06:41 +03:00
Şefik Serangil
8427be05c2 api support init 2020-04-09 12:04:51 +03:00
Şefik Serangil
9eaf86b27d walking enabled in db images 2020-04-03 23:37:11 +03:00
Şefik Serangil
6482e1b20e mood box shape 2020-04-01 15:49:29 +03:00
Şefik Serangil
67a86ef595 readme for stream 2020-03-31 21:49:46 +03:00
Şefik Serangil
bae9fb123d stream stock photo 2020-03-31 21:42:18 +03:00
Şefik Serangil
e38c251051 emotion for stream 2020-03-31 20:17:25 +03:00
Şefik Serangil
1af71925a2 stream function 2020-03-30 20:21:32 +03:00
Şefik Serangil
171c1a81d7 list operations supported 2020-03-05 15:20:45 +03:00
Şefik Serangil
5651615438 detectface for plot 2020-02-26 11:31:11 +03:00
Şefik Serangil
d3aef4e0c0 alignment fix for emotion 2020-02-25 22:11:57 +03:00
Şefik Serangil
905e1b082b alignment fix for emotion 2020-02-25 22:08:18 +03:00
Sefik Ilkin Serengil
9a7b66364a
plotting from the function 2020-02-23 23:36:28 +03:00
Şefik Serangil
cd329f74d6 face alignment 2020-02-23 23:25:49 +03:00
Şefik Serangil
c894020298 fb deepface model added 2020-02-15 18:52:58 +03:00
Şefik Serangil
c2464a5c55 workaround for interrupted weights 2020-02-13 18:33:14 +03:00
Şefik Serangil
5c6e9be50a new package structure 2020-02-13 14:08:16 +03:00
Sefik Ilkin Serengil
84fe836623
validate inputs function removed 2020-02-13 10:36:17 +03:00
Sefik Ilkin Serengil
9f785003b8
model_name and distance_metric check 2020-02-13 10:35:43 +03:00
Sefik Ilkin Serengil
79e27f9a07
url updated 2020-02-13 10:19:00 +03:00
Sefik Ilkin Serengil
08d09421c4
printing backends 2020-02-13 10:13:11 +03:00
Şefik Serangil
b7ed1897f5 calling analysis without param bug 2020-02-12 21:01:28 +03:00
Şefik Serangil
4fb23655c9 testing images 2020-02-10 17:52:09 +03:00
Şefik Serangil
8926b93ff2 demography and bugs 2020-02-10 16:55:48 +03:00
Şefik Serangil
850baea44a init 2020-02-08 23:48:44 +03:00