๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋”ฅ๋Ÿฌ๋‹๐Ÿค–/YOLO, Opencv ๐Ÿข

openCV๋ฅผ ์‚ฌ์šฉํ•œ YOLO ๊ฐ์ฒด ๊ฐ์ง€

by @ENFJ 2022. 4. 1.

๊นƒํ—™์—์„œ ํฅ๋ฏธ๋กœ์šด ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ์–ด ํ•œ๋ฒˆ ์‹คํ–‰ ์‹œ์ผœ๋ณด์•˜๋‹ค.

 

https://github.com/yash42828/YOLO-object-detection-with-OpenCV

 

GitHub - yash42828/YOLO-object-detection-with-OpenCV: Object detection using YOLO object detector

Object detection using YOLO object detector. Contribute to yash42828/YOLO-object-detection-with-OpenCV development by creating an account on GitHub.

github.com

 

๋”ฅ๋Ÿฌ๋‹, OpenCV , python ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€์™€ ๋น„๋””์˜ค์ŠคํŠธ๋ฆผ ๋ชจ๋‘์—์„œ ๊ฐ์ฒด๋ฅผ ํƒ์ง€ํ•˜๋Š” ํ”„๋กœ์ ํŠธ

 

์ด ํ”„๋กœ์ ํŠธ์—์„œ YOLO ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

coco ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ ํ›ˆ๋ จ๋œ YOLO(https://pjreddie.com/darknet/yolo/)๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

- ์‚ฌ๋žŒ, ์ž์ „๊ฑฐ, ์ž๋™์ฐจ/ํŠธ๋Ÿญ, ๋น„ํ–‰๊ธฐ, ๋“ฑ..ํ›ˆ๋ จ๋˜์–ด ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.

์ž์„ธํ•œ ๋‚ด์šฉ์€ ์•„๋ž˜ darknet/data/coco.names์—์„œ ํ™•์ธ ๊ฐ€๋Šฅ(https://github.com/pjreddie/darknet/blob/master/data/coco.names)

 


 

๋”ฅ ๋Ÿฌ๋‹ ๋ฐ OpenCV๋ฅผ ํ†ตํ•œ ์‹ค์‹œ๊ฐ„ ๊ฐ์ฒด ๊ฐ์ง€


์„ค์น˜

  • pip install numpy
  • pip install opencv-python
  • pip install imutils

ํ„ฐ๋ฏธ๋„์— ์œ„ ์„ค์น˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์„ค์น˜ํ•ด์ฃผ๊ณ ,

ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด

  • python real_time_object_detection.py

์œ„ ์‹คํ–‰ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜๊ธฐ์ „์—, ๋ฐ˜๋“œ์‹œ cd.real-time-object-detection ์„ ์ž…๋ ฅํ•˜์—ฌ,

์ด๋™ํ•œ ๋‹ค์Œ python real_time_object_detection.py ์‹คํ–‰ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์•ผํ•œ๋‹ค.

 

<๋งŒ์•ฝ, cd.real- ์ € ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅ ํ•˜์ง€ ์•Š์„์‹œ python: can't open file 'real_time_object_detection.py': [Errno 2] No such file or directory ์˜ค๋ฅ˜๊ฐ€ ๋‚˜์˜ด>

์Šคํฌ๋ฆฐ์ƒท