AOSSIE-Org / AOSSIE-Org/PictoPy

BUG:Potential bugs and robustness issues in FaceDetector.detect_faces

Đang mở
#1,049 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
283
Fork
679
Merge trung bình
7 ngày 2 giờ
Pull request đã merge (30 ngày)
3

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.