미식가의 개발 일기

얼굴 인식을 위한 딥러닝 모델: YOLO vs YOLO-CLS 본문

ML, DL

얼굴 인식을 위한 딥러닝 모델: YOLO vs YOLO-CLS

대체불가 핫걸 2024. 11. 2. 16:30
- YOLO와 YOLO-CLS는 Ultralytics라는 회사에서 개발한 이미지 학습 모델
- YOLO객체 탐지, YOLO-CLS이미지 분류를 위한 모델로 서로 다른 기능을 수행
- 학습 전 각 모델이 요구하는 데이터셋 구조를 적절히 준비하는 것이 중요
 

Home

Discover Ultralytics YOLO - the latest in real-time object detection and image segmentation. Learn its features and maximize its potential in your projects.

docs.ultralytics.com

Ultralytics 홈페이지 바로가기

 

 

YOLO

YOLO: You Only Look Once
실시간 다중 객체 탐지 모델(클래스, 위치 동시 반환) 
 

Detect

Learn about object detection with YOLO11. Explore pretrained models, training, validation, prediction, and export details for efficient object recognition.

docs.ultralytics.com

→ YOLO 모델 홈페이지

 

 

주요기능

  • Bounding Box 예측: 객체의 위치를 나타내는 경계 상자를 출력
  • 다중 클래스 탐지: 여러 객체의 종류를 한 번에 탐지
  • 실시간 처리: 이미지 전체를 한 번에 분석하여 빠르게 탐지

 

데이터 셋 구조

출처: Ultralytics

  • data.yaml 파일: 데이터 셋 구성 정의
train: path/train/images
val: path/val/images
test: path/test/images  # (optional)

nc: 클래스 개수

names:
  - class1
  - class2 
  - class3
  ...

 

  • hyp.yaml 파일: 하이퍼파라미터 정의
 

ultralytics/docs/en/guides/hyperparameter-tuning.md at main · ultralytics/ultralytics

Ultralytics YOLO11 🚀. Contribute to ultralytics/ultralytics development by creating an account on GitHub.

github.com

 

  • 이미지 파일: 학습 데이터용, 검증 데이터용 이미지
  • 라벨 파일: 학습 데이터에 대한 라벨, 검증 데이터에 대한 라벨 → Bounding Box 정보
<클래스 ID> <중심 X> <중심 Y> <너비> <높이>

 

 

YOLO-CLS

이미지 분류 모델
→ YOLO처럼 이미지 내에 있는 여러 객체를 탐지하는 것이 아니라 각 이미지를 하나의 클래스에 할당
 

Classify

Master image classification using YOLO11. Learn to train, validate, predict, and export models efficiently.

docs.ultralytics.com

→ YOLO-CLS 모델 홈페이지

 

 

데이터 셋 구조

|-- train/
|   |-- img1/
|   |-- img2/
|   |-- img3/
|   ...
|-- test/
|   |-- img1/
|   |-- img2/
|   |-- img3/
|   ...
|-- val/ (optional)
|   |-- img1/
|   |-- img2/
|   |-- img3/
|   ...

 

 

반응형