Read this first
Landmark Assistant 현재 인수인계 문서
이 문서는 Sprint 1 시연 산출물을 설명하는 legacy handoff다. 최신 앱 전달 기준은 Model Serving Contract의 MobileCLIP2-S3 FP16 mixed image/text encoder bundle을 따른다.
현재 결론
이 문서의 mobile_artifacts_int8/와 landmark_encoder.onnx 설명은
Sprint 1 데모앱을 재현할 때만 사용한다. 현재 팀원 전달용 모델 artifact는
mobileclip2_s3_server_full_ce_hardneg_fold3_20260611_214421/mobile_artifacts/fp16이며,
image encoder와 text encoder가 분리되어 있다.
Sprint 2의 현재 선택 모델은 MobileCLIP2-S3 full CE hard negative fold3다. 학습은 image/text multi-task 구조였고, export 결과물은 image encoder ONNX와 text encoder ONNX를 모두 포함한다.
무엇이 왜 바뀌었나
| 이전 계획 | 현재 기준 | 변경 이유 | 근거 |
|---|---|---|---|
| 여러 후보 모델을 계속 비교 | MobileCLIP2-S3/S4 비교 후 S3 full CE hardneg fold3를 앱 후보로 선택 | Sprint 2 실험 결과 기준으로 현재 앱 탑재 후보는 S3 run이다. S4 고정 표현은 Sprint 1 계획 문맥으로만 남긴다. | ADR-0004 |
best.pt 직접 로드 데모 |
mobile_artifacts/fp16 image/text encoder bundle |
앱은 이미지와 텍스트를 각각 embedding으로 바꾸고, index/catalog/DB와 결합해 결과를 보여준다. | Model Serving Contract |
| FP32 ONNX만 전달 | 검증된 FP16 mixed ONNX 전달 | 순수 FP16은 embedding parity가 흔들려 mixed storage 정책을 사용한다. image/text encoder 모두 PyTorch parity를 검증했다. | Model Serving Contract |
| AI Hub w8a16 NPU artifact를 바로 시연 모델로 사용 | NPU latency evidence로만 사용 | AI Hub FP32는 cos 0.9995로 동치였지만, w8a16 PTQ는 calibration 15장/260장 모두 임베딩 붕괴. 따라서 latency 수치와 정확도 모델을 분리해 설명한다. | INT8/NPU report |
| Top-3만 보여주는 closed-set 데모 | 4-way confidence policy | 화면 캡처, 범위 밖 이미지, 40/30/20식 애매 결과를 확정 답처럼 보여주면 사용자 신뢰를 잃음. | 1차 데모 테스트 |
| 영어 caption 중심 | 한/영 caption과 text catalog를 학습/검색 기준으로 관리 | 한국어 질의는 alias/keyword 보정만으로는 한계가 있음. Sprint 2는 image-text contrastive 학습까지 고려한다. | ADR-0003 |
| Sprint 1 단일 이미지 학습 경로 | MobileCLIP2-S4 multi-task 학습 경로 추가 | 특정 랜드마크 분류, 자연어 검색 alignment, hard negative 구분을 동시에 개선하기 위함. | Multi-task 학습 구현 |
| 문서 허브 상단에 Sprint 1 결과 중심 노출 | 현재 설계/운영 문서를 상단에 두고 Sprint 1 결과는 하단 섹션으로 정리 | Sprint 2 작업자가 지금 필요한 앱 구조, serving contract, 학습 설계를 먼저 보게 하기 위함. | Docs Hub |
Sprint 2 모델 학습 기준
모델 레포
C:\Users\hi\Downloads\종설_작업중\landmark-assistant-model-ver2
GitHub: https://github.com/HyunKN/landmark-assistant-model-ver2.git
기존 landmark_candidate.train은 Sprint 1 경로로 보존했다.
새 경로는 landmark_candidate.train_multitask이며, image-text contrastive와 classification/hard-negative loss를 함께 사용한다.
기준 실험 명령
cd /workspace/landmark-assistant-model-ver2
git pull
source .venv/bin/activate
export DATA_ROOT=/workspace/landmark-assistant-model-ver2/Dataset
GPUS=1,2,3,4 NPROC=4 bash scripts/run_multitask_tmux.sh mobileclip2_s4_partial_unfreeze_ce_hardneg 0
이 명령은 과거 기준 예시다. 현재 서버 실행 기준은
/workspace/landmark-assis/landmark-assistant-model-ver2 repo root에서 실행한다.
최신 실험 결과는 Sprint2 MobileCLIP Results와
paper experiment 문서를 따른다.
팀원 실행 기준
받아야 하는 것
mobile_artifacts/fp16/
mobileclip2_s3_server_full_ce_hardneg_image_encoder_fp16_mixed.onnx
mobileclip2_s3_server_full_ce_hardneg_image_encoder_fp16_mixed.onnx.data
mobileclip2_s3_server_full_ce_hardneg_text_encoder_fp16_mixed.onnx
mobileclip2_s3_server_full_ce_hardneg_text_encoder_fp16_mixed.onnx.data
preprocessing.json
tokenizer.json
prototype_index.json
classes.json
labels_master.json
manifest.json
config.yaml
각 .onnx는 같은 이름의 .onnx.data와 한 쌍이다.
앱은 manifest.json을 읽어 image/text encoder 파일명을 확인한다.
실행 명령
# Sprint 1 demo app 재현은 demo-app-guide.html 참고
# Sprint 2 Flutter 앱은 model-serving-contract.html의 image/text encoder contract를 따른다.
이 문서는 legacy handoff이므로 새 앱 구현 시에는 실행 명령보다 artifact contract를 우선한다.
지금 보여줘야 할 것과 접어둘 것
| 보여줄 것 | 접어둘 것 |
|---|---|
| Landmark Assistant가 이미지 입력 → Top-3/거절 → 상세정보까지 동작한다. | 모든 후보 모델의 sweep 세부 로그. |
| 팀원 실행 기준은 INT8 ONNX artifact이며, PyTorch checkpoint 없이도 이미지 검색이 돈다. | 초기 repo 분리 논의와 candidate repo publish 절차. |
| NPU latency는 AI Hub에서 100% NPU layer로 측정됐지만, w8a16 정확도는 붕괴했다. | w8a16을 최종 배포 모델처럼 말하는 표현. |
| 정확도와 신뢰도는 다르다. 높은 closed-set accuracy만으로 OOS 처리가 해결되지 않는다. | 초기 threshold 하나로 모든 입력을 처리하던 설명. |
| 데이터셋 v2는 한/영 caption, hard cases, negative/OOS 버킷을 보강하고 multi-task 학습에 투입해야 한다. | “데이터가 이미 충분하다”는 식의 표현. |
다음 작업
- 서버에서 multi-task 기준 실험
mobileclip2_s4_partial_unfreeze_ce_hardnegfold0를 실행한다. metrics.json,predictions_test.jsonl,low_margin_test.csv로 hard case와 low-margin case를 확인한다.- LoRA config와 ArcFace/CosFace config는 CE 기준 실험이 정상 동작한 뒤 비교한다.
- Data and Text Labeling Guide 기준으로 데이터셋 v2 caption과
confusing_with품질을 계속 보강한다. - Sprint 1 demo app artifact는 보존하고, 새 모델이 안정화되면 serving contract의 artifact 버전을 갱신한다.