-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/recognition #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Groq LLM API를 활용한 수학 문제 답안 인식 스크립트 추가 - 이미지에서 학생 답안을 추출하는 llm_test.py 구현 - 다양한 답안 형식 지원 (단답형, 복수답, 꼬리문제) - AI 서비스 의존성 라이브러리 requirements.txt 업데이트 - 향후 FastAPI, ML 모델 개발을 위한 기본 라이브러리 포함
- Flask 패턴을 기반으로 한 FastAPI 프로젝트 구조 구성 - recognition 모듈을 models/recognition/으로 이동하여 모듈화 - API 라우터 분리: recognition, grading, health 엔드포인트 - 비즈니스 로직을 services/ 레이어로 분리 - Pydantic 스키마를 통한 데이터 검증 모델 추가 - 이미지 처리 유틸리티 및 설정 관리 모듈 구현 - 상세한 README.md 문서 작성 (설치, 실행, API 가이드 포함) - 확장 가능한 디렉토리 구조로 재편성
- Detection 폴더의 yolov8l_best_0904.pt 모델 사용하도록 경로 수정 - exp_images 폴더의 이미지를 입력으로 사용하도록 변경 - 출력 디렉토리를 Detection 폴더 내로 변경 - section_crop 사용 설명서 추가
- 수능완성영어 인식 모델 (best_0927_수능완성영어.pt) 추가 - Flutter 프로젝트 빌드 아티팩트 및 설정 파일 추가 - Android, iOS, macOS 플랫폼 생성 파일 포함 - 플러그인 등록 및 네이티브 바인딩 파일 구성
- YOLOv8s(2048) + YOLOv8n(1280) 라우팅 추론 스크립트 구현 - Small 클래스(page_number, problem_number, answer_1/2)는 YOLOv8s로 처리 - Large 클래스(korean/english_content, section, answer_option)는 YOLOv8n으로 처리 - exp_images 18개 이미지 추론 완료 (총 208개 객체 검출) - 시각화 결과 및 JSON 예측 결과 저장 기능 추가 - section_crop.py 추론 파라미터 명시적 설정 (imgsz=2048, conf=0.25, iou=0.7, max_det=300)
- CLS Loss 및 Augmentation 최적화 (2024-10-04) - 자세한 내용은 README와 Slack 참고
- YOLOv8n imgsz 1280 모델 추가 - YOLOv8s imgsz 2048 9cls 모델 추가 - 학습 스크립트 및 설정 파일 포함 - 학습된 가중치 파일 (best.pt, last.pt) 포함
…rner/Gradi_25Fall into feature/recognition
- Move Model_routing_1004 and Model_routing_1104 to legacy directory - Add new Model_routing_1111 implementation - Add routing inference results for 2022 실전편 test cases - Update test results in Hierarchical_crop directory
…rner/Gradi_25Fall into feature/recognition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| self.ocr = OCRModel() | ||
|
|
||
| # JSON 파일 초기화 | ||
| self._init_json_file() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing attribute initialization causes AttributeError at runtime
The LLMDBPipeline.__init__ method calls self._init_json_file() which uses self.output_json_path, but output_json_path is never defined as an instance attribute in the constructor. This causes an AttributeError when instantiating the class. The save_to_json() method has the same issue. Comparing with the similar LLMDBPipelineFromImages class shows the constructor parameter and assignment is missing.
Additional Locations (1)
| cropped = image[y1:y2, x1:x2] | ||
| a_path = section_output / f"prob_{idx:02d}_{a_det['class_name']}.jpg" | ||
| cv2.imwrite(str(a_path), cropped) | ||
| result["crop_paths"][a_det['class_name']] = str(a_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: All problems in section assigned same content detections
In crop_and_save_images, when iterating over multiple problems in a section, the code retrieves english_content, korean_content, and answer detections from all section-level detections and always uses the first one (eng_dets[0], kor_dets[0]). This means if a section contains multiple problems, every problem gets associated with the same content instead of its own respective content. This produces incorrect output data where different problems incorrectly share identical content.
AI 작업 완료
YOLO Routing & 후처리 - 정다훈
Recognition & DB 세팅 - 최예림, 민유진
Note
Adds MNIST base-model training and prediction notebooks (EfficientNet/ResNet/MobileNet) plus READMEs and Kaggle-based evaluation for answer_1/answer_2.
mnist_base_model.ipynb: trains EfficientNet-B0, ResNet18, MobileNetV3 on MNIST with logs/plots and model saving.predict_answer.ipynb: downloads fine-tuned models from Kaggle and evaluatesanswer_1/answer_2with per-class/overall accuracy.mnist_base_model_README.md,answer_classifier_README.mdwith setup, results, and run guidance (incl. Kaggle API usage).Written by Cursor Bugbot for commit 9be3dec. This will update automatically on new commits. Configure here.