analyze instance changed

This commit is contained in:
Sefik Ilkin Serengil 2020-02-22 12:21:26 +03:00 committed by GitHub
parent 78ffe7befb
commit 67ee5830a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,33 +68,33 @@ demography = DeepFace.analyze("img4.jpg") #passing nothing as 2nd argument will
#demography = DeepFace.analyze("img4.jpg", ['age', 'gender', 'race', 'emotion']) #identical to the line above #demography = DeepFace.analyze("img4.jpg", ['age', 'gender', 'race', 'emotion']) #identical to the line above
``` ```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/tests/dataset/img4-cropped.jpg" width="20%" height="20%"></p> <p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/tests/dataset/test-case-2.jpg" width="20%" height="20%"></p>
Analysis function returns a json object. Analysis function returns a json object.
```json ```json
{ {
"age": 31.25149216214664 'age': 32.49221594557578,
, "gender": "Woman" 'gender': 'Woman',
, "race": { 'race': {
"asian": 0.43224629728474007, 'asian': 3.928472101688385,
"indian": 1.3657950678941648, 'white': 55.44567108154297,
"black": 0.05537125728443308, 'middle eastern': 15.896821022033691,
"white": 75.67231510116548, 'indian': 3.050043433904648,
"middle eastern": 13.872351579210257, 'latino hispanic': 20.90577930212021,
"latino hispanic": 8.601920819397021 'black': 0.7732132915407419
} },
, "dominant_race": "white" 'dominant_race': 'white'
, "emotion": { 'emotion': {
"angry": 0.08186087173241338, 'angry': 3.1055836006999016,
"disgust": 2.225523142400352e-06, 'fear': 1.1844050139188766,
"fear": 0.04342652618288561, 'neutral': 86.2661361694336,
"happy": 90.62228091028702, 'sad': 7.137920707464218,
"sad": 1.1166408126522078, 'disgust': 0.0001227657776325941,
"surprise": 0.6784230348078054, 'happy': 2.245445176959038,
"neutral": 7.457371945067876 'surprise': 0.06038688006810844
} },
, "dominant_emotion": "happy" 'dominant_emotion': 'neutral'
} }
``` ```