exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
5.52k stars 754 forks source link

SubCenter-ArcFace-r100-gpu docker cannot find face #714

Open bltcn opened 2 years ago

bltcn commented 2 years ago

Describe the bug SubCenter-ArcFace-r100-gpu docker cannot find face

To Reproduce Steps to reproduce the behavior:

  1. docker pull exadel/compreface-core:0.6.1-arcface-r100-gpu
  2. docker run -dp 3000:3000 --gpus all --name compreface-core-gpu exadel/compreface-core:0.6.1-arcface-r100-gpu
  3. docker cp compreface-core-gpu:/app/ml embedding-calculator/benchmark.sh
  4. docker exec -it compreface-core-gpu /bin/bash
  5. cd /app/ml
  6. chmod 777 benchmark.sh
  7. ./benchmark.sh

--- Run benchmark with ./sample_images/008_B.jpg (135756 bytes) --- Error: No embedding in response Concurrency Level: 1 Time per request: 40.837 [ms] (mean) Time per request: 40.837 [ms] (mean, across all concurrent requests)

--- Run benchmark with ./sample_images/001_A.jpg (2467788 bytes) --- Error: No embedding in response Concurrency Level: 1 Time per request: 867.224 [ms] (mean) Time per request: 867.224 [ms] (mean, across all concurrent requests)

Screenshots 008_B.jpg 008_B

001_A.jpg 001_A

Server (please complete the following information):

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 5016 C /usr/bin/python3.7 537MiB | | 0 N/A N/A 65213 C uwsgi 2509MiB | +-----------------------------------------------------------------------------+

bltcn commented 2 years ago

docker logs -f compreface-core-gpu

{"severity": "WARNING", "message": "400 Bad Request: No face is found in the given image", "request": {"method": "POST", "path": "/scan_faces", "filename": "image.jpg", "api_key": "", "remote_addr": "127.0.0.1"}, "logger": "root", "module": "error_handling", "traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.7/dist-packages/flask/app.py\", line 1936, in dispatch_request\n return self.view_functionsrule.endpoint\n File \"./src/services/flask_/needs_attached_file.py\", line 32, in wrapper\n return f(*args, **kwargs)\n File \"./src/_endpoints.py\", line 85, in scan_faces_post\n faces = _limit(faces, request.values.get(ARG.LIMIT))\n File \"./src/_endpoints.py\", line 121, in _limit\n raise NoFaceFoundError\nsrc.exceptions.NoFaceFoundError: 400 Bad Request: No face is found in the given image\n", "build_version": "dev"}

pospielov commented 2 years ago

No ML model is ideal, here is a benchmark for face detection: https://paperswithcode.com/sota/face-detection-on-wider-face-hard SubCenter-ArcFace-r100-gpu image uses RetinaFace - one of the best face detectors. It still does not find faces sometimes. We can't fix it from our side until a new even more accurate model will be invented.

bltcn commented 2 years ago

Please note that the pictures and scripts I tested are all sample pictures and scripts provided by this repository. So this docker cannot pass the official test, and the CPU version can normally detect faces and perform calculations.I tested the 0.6.1 GPU version and the 0.6.0 GPU version, and both had the same problem, but the CPU version did not

aididhaiqal commented 2 years ago

This seems related to Issue, can you see if your core log stuck at MXNet?