ageitgey / ageitgey/face_recognition

problems with using the library with celery

Open
#767 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
56.8k
Forks
13.7k
PR merge metrics
No merged PRs in 30d

Description

Hi, I have flask app with following extensions used:

Python 3.7.2
Flask 1.0.2
Celery 4.3.0rc2
Face-recognition 1.2.3

And when I'm running this:
face_recognition.face_locations(image, model='cnn)
my worker fails with this output:

[2019-03-06 19:51:15,454: ERROR/MainProcess] Process 'ForkPoolWorker-8' pid:93763 exited with 'signal 11 (SIGSEGV)'
[2019-03-06 19:51:15,472: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: signal 11 (SIGSEGV).')

I know, that celery workers are not fork safe but still hope that there's a solution for my case

Any help appreciated

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing face_recognition.face_locations(image, model='cnn') in the listed Flask and Celery environment, then investigate the worker's SIGSEGV and WorkerLostError. The issue is done when the CNN call no longer crashes the worker or the supported limitation and workaround are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.