AOSSIE-Org / AOSSIE-Org/PictoPy
BUG:Potential bugs and robustness issues in FaceDetector.detect_faces
- Lingua principale
- Python
- Stelle
- 283
- Fork
- 679
- Merge medio
- 7g 2h
- PR unite (30g)
- 3
Descrizione
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
FaceDetector.detect_faces can produce inconsistent or unsafe results: class_ids are returned unfiltered while boxes and embeddings are filtered by confidence, cropped face images can be empty (leading to possible crashes), and ids is returned as a string instead of a list, making downstream usage unreliable.
**Prposed Solution**
Filter class_ids in the same way as boxes and scores, skip empty face crops before preprocessing, return ids as a proper list instead of a string, and add an explicit early return when no faces are detected to make behavior clearer and safer.
I had like to implement the solution.
### Record
- [x] I agree to follow this project's Code of Conduct
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.