exadel-inc / exadel-inc/CompreFace
det_prob_threshold is validating the wrong field on method recognize.
- Dominant language
- Java
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
det_prod threshold is comparing the probability field instead of the similarity field.
A clear and concise description of what the bug is.
**To Reproduce**
add two subjects, and try recognition with a completely different user with filter det_prob_threshold activated.
Steps to reproduce the behavior:
Log application when i try request.
```
----------------------------REQUEST-------------------------------------------
ENDPOINT: http://192.168.3.84:8000/api/v1/recognition/recognize?limit=10&det_prob_threshold=0.7
----------------------------REQUEST-------------------------------------------
----------------------------RESPONSE-------------------------------------------
STATUS CODE:200
{
"result" : [ {
"box" : {
"probability" : 0.96841,
"x_max" : 704,
"y_max" : 575,
"x_min" : 211,
"y_min" : 30
},
"subjects" : [ {
"subject" : "31a41cb2-d640-4833-ae9e-1baca1c2e2bd",
"similarity" : 0.09532
} ]
} ]
}
----------------------------RESPONSE-------------------------------------------
```
Notice in the log above that the filter was applied to **0.7** and the API returns a user with **"similarity": 0.09532**, carrying out some tests I confirmed that the filter is comparing the **probability** field instead of the **similarity** field.
Contributor guide
Assessment
This issue has not been assessed yet.