BUG: Unreadable images interrupt the entire AI-tagging process
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- opencv, python
- Lĩnh vực
- backend, machine-learning
Hướng nghiên cứu
Bắt đầu với backend/app/models/ObjectClassifier.py và backend/app/utils/images.py; theo dõi cách get_classes() xử lý một hình ảnh mà OpenCV không thể tải và cách vòng lặp gắn thẻ cập nhật isTagged. Kiểm tra các bài kiểm thử hiện có cho việc phân loại hình ảnh và xử lý theo lô. Công việc được xem là hoàn tất khi các hình ảnh không đọc được được bỏ qua mà không kết thúc lô, còn các hình ảnh được xử lý thành công nhưng không có phát hiện nào được đánh dấu là đã gắn thẻ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Description
The AI-tagging process can terminate unexpectedly when PictoPy encounters an image that OpenCV cannot load or decode(corrupt or unsupported image).
In ObjectClassifier.get_classes() (backend/app/models/ObjectClassifier.py), cv2.imread() returns None when an image cannot be loaded. However, image_util_classify_and_face_detect_images() (backend/app/utils/images.py) directly calls len(classes) without checking for None, resulting in a TypeError that interrupts the entire tagging batch.
Expected Behaviour
- Unreadable images should be logged and skipped.
- Their isTagged status should remain False.
- Processing should continue with the remaining images.
- Successfully processed images with no detections should still be marked as tagged.
Actual behaviour
- Application retrieves multiple untagged images from the database.
- YOLO processes images sequentially.
- One image is corrupt or unreadable.
- get_classes() returns None.
- len(None) raises a TypeError.
- The entire tagging batch terminates.
- Remaining images are not processed during that run.
Why Does This Matter?
A single unreadable image can prevent an entire batch of otherwise valid images from receiving AI-generated tags. Handling such failures individually would improve the reliability and stability of PictoPy's AI-tagging pipeline.
Proposed Solution
Handle the None return value before accessing len(classes). Skip the unreadable image and continue processing the remaining images.
Record
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Python
- Star
- 313
- Fork
- 755
- Merge trung bình
- 6 ngày 36 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AOSSIE-Org/PictoPy
-
enhancement possible-duplicate
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
AOSSIE-Org/PictoPy#1715 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
BUG: /folders/all-folders takes over a second when folders contain both images and videosCó thể đã có người làm @Saurabhyadav0 đã nhận 1 ngày trước. Đang mởbug enhancement possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
AOSSIE-Org/PictoPy#1708 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Add unit tests for personUtils.tsCó thể đã có người làm @mystic-fae đã nhận hôm nay. Đang mởenhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
AOSSIE-Org/PictoPy#1707 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
bug possible-duplicate
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
AOSSIE-Org/PictoPy#1700 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
BUG: Share page returns HTTP 500 when the unlock cookie contains a non-ASCII characterCó thể làm lại được @swastiksharma45 đã nhận 7 ngày trước và không có pull request nào đang mở. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AOSSIE-Org/PictoPy#1696 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của AOSSIE-Org/PictoPy
Issue tương tự
-
add entry to blockĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Có thể đã có người làm @0z5a đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
plot_graph crashes when a mesh node has no m2m edgeCó thể đã có người làm @tygvi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mllam/neural-lam#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
future-agi/future-agi#4092 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
WingedGuardian/GENesis-AGI#4641 ·
Maintainer thường phản hồi trong vòng 1 ngày