Skip to content

Conversation

@DaveDuck321
Copy link
Collaborator

@DaveDuck321 DaveDuck321 commented Feb 8, 2022

In my tests, cv2.dnn is faster and more accurate than dlib (see FaceDetectorDNN). I've also added FaceDetectorCascade for faster but less accurate face detection.

Please check that requirements.txt won't break production

Copy link
Owner

@WeixuanZ WeixuanZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Face detection works great, but cropping seems to be a bit dodgy now with more accurate detection
@FChippendale could you have a look

@DaveDuck321
Copy link
Collaborator Author

Face detection works great, but cropping seems to be a bit dodgy now with more accurate detection @FChippendale could you have a look

fyi I changed the defaults here: if it can't detect a face it'll set the entire image as a bounding box. We can revert this (with some other fix) if it messes with your assumptions in the cropping stage.

Copy link
Owner

@WeixuanZ WeixuanZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn’t copy secrets into the container - on production the env variables will be set in run config, while locally this will be explicitly passed into docker run command through Makefile variable substitution

Related to 9133f98

@antroseco
Copy link
Collaborator

We shouldn’t copy secrets into the container - on production the env variables will be set in run config, while locally this will be explicitly passed into docker run command through Makefile variable substitution

Related to 9133f98

Ah I missed that commit; let me rebase this branch on master to include it. What happens when .secrets doesn't exist though?

DaveDuck321 and others added 6 commits February 13, 2022 14:58
DLib and imutils were very slow for high resolution images and required
a large build on the initial installation. Fortunately, at this resolution,
`cv2.dnn` was ~4x faster, more accurate and already install with opencv.

Alternatively, I have provided `FaceDetectorCascade` which uses
`c2v.CascadeClassifier`. Although this is less accurate than dlib, I have
found that it is much faster at the required resolutions.
- The Makefile runs yack in dev mode, because we want http locally.
- Dockerfile only copies required files to the container image.
- docker run called with --rm; there's no reason for the container to
  persist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants