Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Configurable MediaPipe Detection parameters #1360

Closed
tyasnk opened this issue Oct 7, 2024 · 2 comments · Fixed by #1362
Closed

[FEATURE]: Configurable MediaPipe Detection parameters #1360

tyasnk opened this issue Oct 7, 2024 · 2 comments · Fixed by #1362
Labels
enhancement New feature or request

Comments

@tyasnk
Copy link
Contributor

tyasnk commented Oct 7, 2024

Description

I use the Mediapipe backend as detector. I look at the source https://github.com/serengil/deepface/blob/master/deepface/models/face_detection/MediaPipe.py#L35 it hardcoded the min_detection_confidence param and also there is no model_selection param there.

It would be good if we can config them by using environment variable like this

face_detection = mp_face_detection.FaceDetection(
    min_detection_confidence=os.getenv("MEDIAPIPE_MIN_DETECTION_CONFIDENCE", 0.7),
    model_selection=os.getenv("MEDIAPIPE_MODEL_SELECTION", 0)
)

Additional Info

No response

@tyasnk tyasnk added the enhancement New feature or request label Oct 7, 2024
@serengil
Copy link
Owner

serengil commented Oct 7, 2024

Fair enough

@serengil
Copy link
Owner

@tyasnk do you mind to create a PR for this? you already written the most of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants