odd_size flags every non-modal image size when IQR is 0
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
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- computer-vision, data
Hướng nghiên cứu
Bắt đầu bằng cách đọc SizeProperty.get_scores trong issue_managers/image_property.py, tập trung vào nhánh threshold_gap == 0 và cách nhánh này xác định các cờ odd_size. Tái hiện hành vi với hai phân bố kích thước ảnh trong issue, rồi so sánh số lượng được đánh dấu sau khi thay đổi; kết quả mong đợi được nêu là các kích thước thiểu số không bị đánh dấu hết là ngoại lệ trong cả hai phân bố.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When more than roughly 70-75 % of a dataset share one image size, q1 == q3 in
SizeProperty.get_scores (issue_managers/image_property.py). The threshold_gap == 0 branch
then sets self.threshold = 1.0, so every image whose size differs from that one value at all
is flagged as odd_size, even if it is only slightly larger or smaller.
This is common with photos downscaled to a fixed maximum side (phone photos all end up 384x512,
and anything with a different aspect ratio or a smaller original becomes "odd"). Whether a
dataset hits the branch depends on whether the modal share is above or below the quartile, so a
small change in composition switches between "nothing flagged" and "all minority sizes flagged".
Reproduction (cleanvision 0.3.7, Pillow 10.2.0, numpy 2.2.6, pandas 2.2.3):
import tempfile
from pathlib import Path
import numpy as np
from PIL import Image
from cleanvision import Imagelab
rng = np.random.default_rng(0)
def n_flagged(counts):
with tempfile.TemporaryDirectory() as d:
for (w, h), n in counts.items():
for i in range(n):
Image.fromarray(rng.integers(0, 255, (h, w, 3), dtype=np.uint8)).save(Path(d) / f"{w}x{h}_{i}.png")
lab = Imagelab(data_path=d, verbose=False)
lab.find_issues(issue_types={"odd_size": {}}, verbose=False)
return int(lab.issues["is_odd_size_issue"].sum())
print(n_flagged({(384, 512): 140, (512, 512): 30, (512, 288): 30})) # 60
print(n_flagged({(384, 512): 100, (512, 512): 60, (512, 288): 40})) # 0
Expected: the same few (or no) images flagged in both cases (512x512 and 512x288 are not
outliers in either).
Possible fixes, any of these would do:
- fall back to a relative tolerance around the median (e.g. flag only beyond a factor of x)
instead of exact equality when IQR is 0 - or skip the check with a warning when IQR is 0
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 87
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 cleanlab/cleanvision
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cleanlab/cleanvision#282 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
cleanlab/cleanvision#278 ·
-
Broken linkCó thể đã có người làm @tdashelby-cmyk đã nhận 186 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
cleanlab/cleanvision#274 ·
-
Documentation / UI improvements: sidebar behavior, “edit page” link & accessibility enhancementsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
cleanlab/cleanvision#260 ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
cleanlab/cleanvision#259 · 1 bình luận ·
Tất cả issue của cleanlab/cleanvision
Issue tương tự
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL portsCó thể đã có người làm @himanchalkaushale đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OWASP/Nettacker#1884 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-connection-core C-enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
aws-samples/sample-per-model-bedrock#869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Spec: say that included_antigen_sources gates LENS labels; do not merge it into antigen kindsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
fzn0x/watchtower#17 ·