BUG: Semantic search sees portrait phone photos sideways (SigLIP ignores EXIF orientation)
Maintainer thường phản hồi trong vòng 4 ngà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
- 76/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
- machine-learning, search
Hướng nghiên cứu
Bắt đầu với backend/app/utils/SigLIP.py và kiểm tra siglip_util_preprocess_image(); issue xác định luồng mở và thay đổi kích thước ảnh. Thêm một unit test sử dụng JPEG có EXIF Orientation=6, như issue đề xuất. Công việc hoàn tất khi đầu ra tiền xử lý đúng chiều và test xác minh việc xử lý hướng ảnh.
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?
While going through the semantic search code I noticed that siglip_util_preprocess_image() in backend/app/utils/SigLIP.py doesn't handle EXIF orientation.
Phones usually store portrait photos as landscape pixels + an EXIF Orientation tag (like 6 = rotate 90° clockwise). Viewers read that tag and show the photo upright. But here the image is just opened and resized:
img = (
Image.open(img_path)
.convert("RGB")
.resize((resolution, resolution), Image.BICUBIC)
)
so SigLIP ends up getting portrait phone photos turned sideways. That would hurt semantic search and semantic labels for basically any portrait photo taken on a phone.
The face/object side is fine btw, cv2.imread already applies EXIF orientation. So right now the same photo is upright for YOLO/FaceNet but sideways for SigLIP.
How I checked
I ran the actual siglip_util_preprocess_image() on a real phone photo with Orientation = 6 and turned the output tensor back into an image:
| What you see | What SigLIP gets |
|---|---|
| (drag 1_what_you_see.png here) | (drag 2_what_siglip_sees.png here) |
Also tried a small test image saved with Orientation=6 (red left half, blue right half). It displays with red on top, but SigLIP gets red on the left:
Displayed size (w,h): (200, 400)
SigLIP input: red in top half=0.50, red in left half=1.00
Upright photo: red in top half=1.00, red in left half=0.50
Checked on dev at 3c6b10f.
Not a duplicate of
- #1570 / #1596 - same cause, but only fixes thumbnails
- #1727 - only the OpenCV loaders for faces/objects
Neither touches SigLIP.py.
Possible fix
Add ImageOps.exif_transpose() right after Image.open() and a unit test with an Orientation=6 JPEG. It's a small change.
One thing I wasn't sure about: photos that are already embedded will keep the old sideways embeddings. Should they get re-embedded as part of this, or is that better as a separate issue?
I'd like to work on this if that's okay.
Record
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Python
- Star
- 322
- Fork
- 793
- Merge trung bình
- 6 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 20
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
-
BUG: Share password loses leading/trailing spaces so the password you set doesn't workCó thể đã có người làm @swastiksharma45 đã nhận 2 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
AOSSIE-Org/PictoPy#1779 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
BUG: PROD: Face search shows "No Matches Found" for every empty result, even when AI tagging is offCó thể đã có người làm @dhruvbit đã nhận 3 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AOSSIE-Org/PictoPy#1770 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
BUG: Add images to album: success message shows requested count, not number actually addedCó thể đã có người làm @riyanshbhosale đã nhận 5 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AOSSIE-Org/PictoPy#1740 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
BUG: /sync-folder does not validate the supplied folder_idCó thể làm lại được @sathvikn113 đã nhận 10 ngày trước và không có pull request nào đang mở. Đang mởbug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AOSSIE-Org/PictoPy#1731 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
DOC: update deprecated libgl1-mesa-glx package and stale setup.md referencesCó thể làm lại được @avika269 đã nhận 10 ngày trước và không có pull request nào đang mở. Đang mởdocumentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
AOSSIE-Org/PictoPy#1730 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của AOSSIE-Org/PictoPy
Issue tương tự
-
S2-12 Atualizar README.mdĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
cofade/open-garden-planner#1044 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
python-commandline-toolsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
codecrafters-io/build-your-own-x#2126 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
julianleno/cortai#10 ·
-
difficulty:easy func:python os:windows prio:high type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NatronGitHub/Natron#2029 ·
Maintainer thường phản hồi trong vòng 1 ngày