AOSSIE-Org / AOSSIE-Org/PictoPy

BUG:Potential bugs and robustness issues in FaceDetector.detect_faces

Aberta
#1,049 3 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
283
Forks
679
Merge médio
7d 2h
PRs com merge (30d)
3

Descrição

### 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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.