학문과 실천하는 삶/공부, 해야지

[YOLOv3-Darknet] Windows10에서 YOLO v3 실행 해보기 총 정리 (2)

hicetnunc_stella 2020. 1. 14. 16:30

포스팅(1)에서 darknet 빌드를 성공하였다면, 이제 정말 다 끝난거나 다름 없다.

Yolo weight 파일 불러와서 Yolo v3를 테스트 하고자 한다.

1. 다음 홈페이지에서 yolo weight 파일을 다운로드 한다. YOLO : https://pjreddie.com/darknet/yolo/ 

   나는 YOLOv3-320을 다운 받았다.

 

 

YOLO: Real-Time Object Detection

YOLO: Real-Time Object Detection You only look once (YOLO) is a state-of-the-art, real-time object detection system. On a Pascal Titan X it processes images at 30 FPS and has a mAP of 57.9% on COCO test-dev. Comparison to Other Detectors YOLOv3 is extremel

pjreddie.com

 

2. 다운 받은 weight파일을 darknet.exe가 있는 폴더에 옮겨준다.

3. opencv가 있는 파일에서 opencv_world320.dllopencv_ffmpeg320_64.dll 파일을 찾은 뒤에,

  darknet.exe가 있는 폴더에 옮겨준다.

 

4. cmd를 열어서 darknet.exe가 있는 경로로 이동한다.

 

5. 다음 명령어 입력을 통해 YOLO를 테스트 한다.

 

이미지 darknet.exe detector test data/coco.data yolov3.cfg yolov3.weights -ext_output dog.jpg

dog.jpg 파일을 에측하고 출력한다.
동영상 darknet.exe detector demo data/coco.data yolov3.cfg yolov3.weights -thresh 0.25 test.mp4 -output.avi
test.mp4 파일을 테스트 하고, 그 결과를 output.avi로 출력한다.

명령어 의미:

test : 한 장의 이미지를 테스트 하기 위한 명령어

data/coco.data : data폴더의 coco.data 파일을 이용

yolov3.weights : 학습된 가중치(여기서는 coco.data에 대해 미리 학습된 가중치이다.)

thresh : 임계값(0.25는 25%이상 정확도의 물체만 감지한다는 뜻)

 

6. 테스트 결과