vladmandic/face-api

Face api gives an error when there are too many photos

Gokhan-Onal-DegoDe opened this issue · 3 comments

Hello. When the face api has too many photos (eg 5000 photos), wait for a few minutes and then gives an error. I share the demo address. You can review js file

When the photo is not much (for example, 300 photos) works properly. It only gives an error when there is too many photos.

I am new in the use of this library. I would be glad if you explain in detail. Thanks

i took a look at your js code and of course it has problems with too many photos - you're submitting all photos in parallel and expect library to handle it. you should limit number of submitted photos and do part-by-part.
this is not a library issue, this is really bad way to handle processing of large number of items in general - you can never submit all in parallel and create thousands of promises, no matter what you're doing - even if its simple 1+1=2.

@vladmandic I already know that this is the problem. Can you share a sample code about how to divide the photos?

Nevermind. I solved the problem.