feat: add instagram OCR fallback extraction#17
Merged
Conversation
1000hyehyang
approved these changes
May 27, 2026
1000hyehyang
left a comment
Member
There was a problem hiding this comment.
오늘 (5/27) 회의한 내용 바탕으로 다시 설계해주세요! (혹시, 설계가 너무 복잡하고 비효율적인 것 같으면 말씀해주세요! 집 돌아와서 생각해보니까 비효율적인 것 같기도 하고..ㅠㅠ 더 좋은 설계, UX가 있으면 공유 부탁드립니다~~)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ 무엇을 바꿨나요?
Instagram 게시글(
/p/...)에서 caption-only 장소 추출이 실패했을 때, 게시글 이미지 carousel을 크롤링하고 HF OCR로 이미지 내 텍스트를 추출한 뒤 기존 Qwen/Kakao 파이프라인으로 다시 장소 후보를 추출하도록 fallback 흐름을 추가했습니다.🔗 관련 이슈
Closes #16
💡 왜 바꿨나요?
일부 Instagram 게시글은 상호명과 주소가 caption이 아니라 이미지 안에 포함되어 있습니다. 기존에는 caption만
content_text로 사용해서 이런 게시글에서 장소 후보가 비거나 직접 검색 fallback에 의존하는 문제가 있었습니다.📝 주요 변경 사항
HFOCRClient추가HFExtractionClient와 분리JobProcessor에 OCR fallback 연결places가 비어 있으면 Instagram post에 한해 이미지 OCR fallback 실행caption + OCR textaugmented content로 Qwen 추출 재실행content_text도 augmented content로 저장raw_metadata.instagram.ocr_fallback에 fallback 실행 정보 기록👀 리뷰어가 보면 좋은 부분
JobProcessor._extract_result()의 fallback 조건이 의도대로 좁게 잡혔는지google/gemma-3-27b-it)과 HF router 설정 재사용 방식이 적절한지content_text와raw_metadata구조가 API/DB 관점에서 괜찮은지🧪 테스트
방식
메모