exadel-inc / CompreFace

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

Problem with a time #953

Open bogdanov-i opened 2 years ago

bogdanov-i commented 2 years ago

Hello. I have a problem. I use CompreFace Verification to compare 2 user photos. The project is deployed on the CPU. I don't use GPU. The server capacity is as follows: -4 Core; -16 Gb;

How much should the request be processed compared to? My comparison takes about 6-10 seconds. What is the normal value?

pospielov commented 2 years ago

Photo processing speed depends on many factors: image size, number of faces on it, CPU architecture, and others. But I would expect it to be from 100ms to 1 second.

It's definitely atypical. Did you try it on another server or a personal PC? Is CompreFace utilizes all resources (CPU and RAM)?

bogdanov-i commented 2 years ago

Hello. Image size: 480p (480x640); Image quality and format: Jpeg (100); Image: 1 face, 15px each side of the face, 30px each top and bottom of the face; Server: 4 cores, 16 Gb. We use Selectel. There are no restrictions.

We took Compre Face, wrapped it with RestTemplate to make the interaction logic we need, namely: we need to form a response template. This led, in our opinion, to an increase in delay by 1-2 seconds. But, then, the spread should be in the region of 4-8 seconds, but this is not typical either.

Which server should we use? What requirements should he have?

pospielov commented 2 years ago

The server should be enough. You can try it on your personal PC using UI. It should work much faster than 4-8 seconds. Just one thing to notice - the first two requests are always slow because of server initialization.