Skip to content

minnje0ng/pillDetection

Β 
Β 

Repository files navigation

pillDetection

πŸš€ 2025 컴퓨터비전 ν”„λ‘œμ νŠΈ

ν”„λ‘œμ νŠΈ κ°œμš”

λ³΅μž‘ν•œ 이미지 ν™˜κ²½μ—μ„œ 닀쀑 μ•Œμ•½μ„ νƒμ§€ν•˜κ³ , ν˜•μƒΒ·μƒ‰μƒΒ·κ°μΈΒ·λΆ„ν• μ„  λ“± 닀쀑 μ‹œκ° νŠΉμ§•μ„ λΆ„μ„ν•˜μ—¬ κ²½κ΅¬μ•½μ œλ₯Ό μžλ™ μ‹λ³„ν•˜λŠ” μ‹œμŠ€ν…œ

파일 ꡬ쑰

pillDetection/
β”œβ”€β”€ images/                               # ν…ŒμŠ€νŠΈμš© μ•Œμ•½ 이미지 폴더
β”œβ”€β”€ output/                               # μ‹œκ°ν™”Β·κ²°κ³Ό μ €μž₯ 폴더
β”œβ”€β”€ utils/                                # ν•™μŠ΅/μ „μ²˜λ¦¬ κ΄€λ ¨ μœ ν‹Έ λ…ΈνŠΈλΆ
β”‚   β”œβ”€β”€ merge_coco_to_yolo.ipynb          # COCO β†’ YOLO 포맷 λ³€ν™˜
β”‚   β”œβ”€β”€ resnet_training.ipynb             # ResNet-50 ν˜•μƒΒ·μƒ‰μƒ λΆ„λ₯˜ ν•™μŠ΅
β”‚   └── YOLO augmentation.ipynb           # YOLO ν•™μŠ΅μš© 데이터 증강
β”œβ”€β”€ weights/                              # ν•™μŠ΅λœ λͺ¨λΈ κ°€μ€‘μΉ˜
β”‚   β”œβ”€β”€ best.pt                           # YOLO μ΅œμ’…(best) κ°€μ€‘μΉ˜
β”‚   β”œβ”€β”€ last.pt                           # YOLO λ§ˆμ§€λ§‰ 에폭 κ°€μ€‘μΉ˜
β”‚   β”œβ”€β”€ pill_shape_color_resnet50_improved_best_color.pth  # 색상 λΆ„λ₯˜κΈ°
β”‚   └── pill_shape_color_resnet50_improved_best_shape.pth  # ν˜•μƒ λΆ„λ₯˜κΈ°
β”œβ”€β”€ .gitignore                            # Git λ¬΄μ‹œ 파일 μ„€μ •
β”œβ”€β”€ demo.ipynb                            # 톡합 μ•Œμ•½ 탐지·식별 데λͺ¨ λ…ΈνŠΈλΆ
β”œβ”€β”€ drug_info_unique_drug_id_final.csv    # μ•½ν’ˆ 메타데이터 DB
β”œβ”€β”€ pill_matching_results.csv             # λ§€μΉ­ κ²°κ³Ό
β”œβ”€β”€ pill_matching_results_final.xlsx      # λ§€μΉ­ κ²°κ³Ό(μ—‘μ…€ 버전, λ³΄κ³ μ„œ κΈ°μ€€)
β”œβ”€β”€ README.md                             # ν”„λ‘œμ νŠΈ μ‚¬μš© μ„€λͺ…
β”œβ”€β”€ requirements.txt                      # 의쑴 라이브러리 λͺ©λ‘
└── team8_presentation.pdf                # νŒ€ λ°œν‘œ 자료 PDF

μ‹œμŠ€ν…œ ꡬ성

  1. YOLO 기반 닀쀑 μ•Œμ•½ 탐지: YOLOv12n으둜 이미지 λ‚΄ μ•Œμ•½ ROI κ²€μΆœ
  2. ResNet-50 νŠΉμ§• μΆ”μΆœ: ν˜•μƒ(4 클래슀), 색상(7 클래슀) λΆ„λ₯˜
  3. OCR 각인 인식: EasyOCR + Google Vision API
  4. 닀쀑 νŠΉμ§• λ§€μΉ­: κ°€μ€‘μΉ˜ 기반 μ΅œμ’… μ•½ν’ˆ 식별

μ„±λŠ₯

λͺ¨λΈ μ§€ν‘œ μ„±λŠ₯
YOLO mAP50 0.971
YOLO Recall 0.934
ResNet-50 (ν˜•μƒ) Accuracy 0.9070
ResNet-50 (색상) Accuracy 0.7907
μ΅œμ’… λ§€μΉ­ Top-5 Accuracy 44.68% (4023μ’… λŒ€μƒ)

데이터셋

  • ν•œκ΅­μ§€λŠ₯μ •λ³΄μ‚¬νšŒμ§„ν₯원 제곡 "κ²½κ΅¬μ•½μ œ 이미지 데이터" ν™œμš©
  • Roboflow Universe의 곡개 데이터셋인 Roboflow 100 pills'와 'seblful Pills Detection'을 ν™œμš©

μ‹€ν–‰ ν™˜κ²½

  • Python 3.x
  • PyTorch
  • Ultralytics YOLO
  • EasyOCR
  • demo.ipynb μ½”λ“œμ—μ„œ ## 6️⃣ νŒŒμ΄ν”„λΌμΈ μ΄ˆκΈ°ν™” λΆ€λΆ„μ—μ„œ, Google Vision API keyλ₯Ό λ„£μ–΄μ•Ό OCR Fallback이 μ‹€ν–‰λ©λ‹ˆλ‹€.

About

πŸš€ 2025-2 컴퓨터비전 λ ˆν¬μ§€ν† λ¦¬

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 100.0%