๐Ÿ‘€ Computer Vision

๐Ÿ‘€ Computer Vision

[CV] Google Open Image Dataset

Google Open Image Dataset ์†Œ๊ฐœGoogle Open Images Dataset์€ ๊ตฌ๊ธ€์—์„œ ๊ณต๊ฐœํ•œ ๋Œ€๊ทœ๋ชจ์˜ ๊ณต๊ฐœ ์ด๋ฏธ์ง€ ๋ฐ์ดํ„ฐ์…‹์œผ๋กœ, ์ปดํ“จํ„ฐ ๋น„์ „ ๋ฐ ๋จธ์‹ ๋Ÿฌ๋‹ ์—ฐ๊ตฌ์— ๋„๋ฆฌ ํ™œ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ฐ์ดํ„ฐ์…‹์€ ๋‹ค์–‘ํ•œ ์ฃผ์ œ์™€ ์ƒํ™ฉ์„ ๋‹ด์€ ์•ฝ 9๋ฐฑ๋งŒ ์žฅ ์ด์ƒ์˜ ์ด๋ฏธ์ง€๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๊ฐ ์ด๋ฏธ์ง€์—๋Š” ํ’๋ถ€ํ•œ ๋ ˆ์ด๋ธ” ์ •๋ณด๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.์ฃผ์š” ํŠน์ง•๋ฐฉ๋Œ€ํ•œ ๊ทœ๋ชจ: ์•ฝ 9๋ฐฑ๋งŒ ์žฅ ์ด์ƒ์˜ ์ด๋ฏธ์ง€์™€ 6์ฒœ์—ฌ ๊ฐœ์˜ ํด๋ž˜์Šค ๋ ˆ์ด๋ธ”์„ ํฌํ•จํ•˜๊ณ  ์žˆ์–ด, ๋Œ€๊ทœ๋ชจ ๋ชจ๋ธ ํ•™์Šต์— ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.๋‹ค์–‘ํ•œ ๋ ˆ์ด๋ธ” ์ข…๋ฅ˜:์ด๋ฏธ์ง€ ๋ ˆ๋ฒจ ๋ ˆ์ด๋ธ”: ์ด๋ฏธ์ง€ ์ „์ฒด์— ๋Œ€ํ•œ ์ผ๋ฐ˜์ ์ธ ๋ถ„๋ฅ˜ ์ •๋ณด.๋ฐ”์šด๋”ฉ ๋ฐ•์Šค: ์ด๋ฏธ์ง€ ๋‚ด ๊ฐ์ฒด์˜ ์œ„์น˜์™€ ํฌ๊ธฐ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ขŒํ‘œ ์ •๋ณด.์ด๋ฏธ์ง€ ์„ธ๊ทธ๋ฉ˜ํ…Œ์ด์…˜ ๋งˆ์Šคํฌ: ํ”ฝ์…€ ๋‹จ์œ„๋กœ ๊ฐ์ฒด์˜ ์˜์—ญ์„ ํ‘œ์‹œ.๊ด€๊ณ„ ๋ ˆ์ด๋ธ”: ๊ฐ์ฒด ๊ฐ„์˜..

๐Ÿ‘€ Computer Vision

[CV] Keras YOLO๋กœ Raccoon Dataset์„ ์ด์šฉํ•œ Object Detection

Raccoon Dataset์„ YOLO V3 Model๋กœ ํ•™์Šต์‹œ์ผœ์„œ Image & Video์— Object Detection์„ ํ•œ๋ฒˆ ์ˆ˜ํ–‰ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.Dataset GitHub - experiencor/keras-yolo3: Training and Detecting Objects with YOLO3Training and Detecting Objects with YOLO3. Contribute to experiencor/keras-yolo3 development by creating an account on GitHub.github.comLibrary DownloadObject Detection ํ•™์Šต์„ ์œ„ํ•œ Library๋ฅผ ๋‹ค์šด๋กœ๋“œ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.!pwd!rm -rf DLCV!git clone https://..

๐Ÿ‘€ Computer Vision

[CV] Object Detection Model Training์‹œ ์œ ์˜์‚ฌํ•ญ

Object Detection Model Traning์‹œ ์œ ์˜ํ•ด์•ผํ•  ์‚ฌํ•ญ๋“ค์— ๋ฐํ•˜์—ฌ ํ•œ๋ฒˆ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.๋Œ€๋Ÿ‰์˜ ์ด๋ฏธ์ง€ ํ•™์Šต์‹œ Memory ๋ฌธ์ œ๋Œ€๋Ÿ‰์˜ ์ด๋ฏธ์ง€ ํ•™์Šต ์‹œ, ์ด๋ฏธ์ง€๋ฅผ ๋„คํŠธ์›Œํฌ์— ์ž…๋ ฅํ•˜๊ธฐ ์œ„ํ•ด ๋ฐฐ์น˜๋กœ ๋ณ€ํ™˜๋˜๋ฉฐ, ์ด๋กœ ์ธํ•ด ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์ด ์ฆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.๋ฐ˜๋ณต์ ์ธ ํ•™์Šต ๊ณผ์ •์—์„œ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์€ ๋” ์ปค์ง€๊ฒŒ ๋˜๊ณ , ์ด๋กœ ์ธํ•ด ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ จ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฆ‰, ์ด๋ฏธ์ง€์˜ ๊ฐœ์ˆ˜๊ฐ€ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์˜ ๋Œ€๋ถ€๋ถ„์„ ์ขŒ์šฐํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.Keras fit_generator()๋ฅผ ์ด์šฉํ•œ ํ•™์ŠตKeras์˜ fit_generator()๋ฅผ ์ด์šฉํ•œ ํ•™์Šต์„ ํ• ๋•Œ, ๋งŒ์•ฝ ๋ฐ์ดํ„ฐ๊ฐ€ ๋„ˆ๋ฌด ํฌ๋ฉด Memory์— ๋ชจ๋‘ ์˜ฌ๋ฆฌ์ง€ ์•Š๊ณ , Batch ๋‹จ์œ„๋กœ Data Generator(๋ฐ์ดํ„ฐ ์ƒ์„ฑ๊ธฐ)๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ณต๊ธ‰ํ•˜๋ฉฐ ํ•™์Šต์„ ์ง„ํ–‰ํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ..

๐Ÿ‘€ Computer Vision

[CV] Keras ๊ธฐ๋ฐ˜ YOLO Open Source Package & Object Detection

์ •์‹ ์ด ์—†์–ด์„œ ์ด์–ด์„œ ์“ฐ๋Š”๊ฑธ ๊นŒ๋จน์—ˆ๋„ค์š”.. ์—ด์‹ฌํžˆ ์จ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ใ… Keras YOLO Open source Package ํŠน์ง•๋” ์‰ฌ์šด ํ™˜๊ฒฝ ์„ค์ •Keras ๊ธฐ๋ฐ˜์˜ YOLO ํŒจํ‚ค์ง€๋Š” Darknet YOLO ํ”„๋ ˆ์ž„์›Œํฌ์— ๋น„ํ•ด ํ™˜๊ฒฝ ์„ค์ •์ด ๋” ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. Keras๋Š” Python์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ ๋”ฅ๋Ÿฌ๋‹ ์›Œํฌํ”Œ๋กœ์šฐ์™€ ์ž˜ ํ†ตํ•ฉ๋˜๋ฉฐ, ๋” ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์‚ฌ์šฉ์ž๊ฐ€ ์ ‘๊ทผํ•˜๊ธฐ ์‰ฝ์Šต๋‹ˆ๋‹ค.Keras์˜ Callbacks, TensorBoard, Preprocessing ๊ธฐ๋Šฅ ํ™œ์šฉKeras๋Š” Callbacks ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ํ•™์Šต ๊ณผ์ • ์ค‘์— ๋™์ ์œผ๋กœ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ  ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์กฐ๊ธฐ ์ข…๋ฃŒ(early stopping)๋‚˜ ํ•™์Šต ์†๋„ ์Šค์ผ€์ค„๋ง(learning rate scheduling) ๋“ฑ..

๐Ÿ‘€ Computer Vision

[CV] OpenCV์—์„œ YOLO๋ฅผ ์ด์šฉํ•œ Object Detection Part.2

์ •์‹ ์ด ์—†์–ด์„œ ์ด์–ด์„œ ์“ฐ๋Š”๊ฑธ ๊นŒ๋จน์—ˆ๋„ค์š”.. ์—ด์‹ฌํžˆ ์จ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ใ… # ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ๋Š” /content์ด๋ฉฐ ์ด ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์‹ค์Šต์ฝ”๋“œ์™€ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค์šด๋กœ๋“œ ํ•ฉ๋‹ˆ๋‹ค. !pwd!rm -rf DLCV!git clone https://github.com/chulminkw/DLCV.git# DLCV ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ Download๋˜๊ณ  DLCV ๋ฐ‘์— Detection๊ณผ Segmentation ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธ!ls -lia !ls -lia DLCVOpenCV Darknet YOLO๋ฅผ ์ด์šฉํ•˜์—ฌ image & ์˜์ƒ Object Detection์—ฌ๊ธฐ์„  YOLO์™€ tiny-yolo๋ฅผ ์ด์šฉํ•˜์—ฌ Object Detection์„ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.import cv2import matplotlib.pyplot as pltimpor..

๐Ÿ‘€ Computer Vision

[CV] OpenCV์—์„œ YOLO๋ฅผ ์ด์šฉํ•œ Object Detection Part.1

OpenCV DNN์œผ๋กœ YOLO Inference ๊ตฌํ˜„์‹œ ์œ ์˜ ์‚ฌํ•ญYOLO ๋ชจ๋ธ ๊ตฌํ˜„์‹œ ์•Œ์•„๋‘์–ด์•ผ ํ•  ์ ์€, OpenCV YOLO Inference Code๋Š” ๊ธฐ์กด OpenCV inference ์ฝ”๋“œ์™€๋Š” ๋‹ค๋ฆ…๋‹ˆ๋‹ค.๋˜ํ•œ Darknet ๊ตฌ์„ฑ ํ™˜๊ฒฝ ๋ฐ YOLO Architecture์— ๋”ฐ๋ผ ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ Object Detection ์ •๋ณด๋ฅผ ์ถ”์ถœํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.Pretrained๋œ inference ๋ชจ๋ธ ๋กœ๋”ฉ ๋ฐฉ๋ฒ•Weight ๋ชจ๋ธ ํŒŒ์ผ๊ณผ config ํŒŒ์ผ์€ Darknet ์‚ฌ์ดํŠธ์— Download๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.cv2.dnn.readNetFromDarknet(config ํŒŒ์ผ, weight ๋ชจ๋ธ ํŒŒ์ผ)์œผ๋กœ pretrained๋œ inference ๋ชจ๋ธ์„ ๋กœ๋”ฉํ•ฉ๋‹ˆ๋‹ค.readNetFromDarket(config ํŒŒ์ผ, w..

๐Ÿ‘€ Computer Vision

[CV] YOLO (You Only Look Once)

YOLO (You Only Look Once) YOLO(You Only Look Once)์€ ์‹ค์‹œ๊ฐ„ ๊ฐ์ฒด ํƒ์ง€ ์‹œ์Šคํ…œ์œผ๋กœ, ์ด๋ฏธ์ง€๋‚˜ ๋น„๋””์˜ค์—์„œ ์—ฌ๋Ÿฌ ๊ฐ์ฒด๋ฅผ ๋™์‹œ์— ํƒ์ง€ํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜๋Š” ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ž…๋‹ˆ๋‹ค. YOLO: Real-Time Object DetectionYOLO: 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 ..

๐Ÿ‘€ Computer Vision

[CV] OpenCV DNN ํŒจํ‚ค์ง€ & SSD ๊ธฐ๋ฐ˜ Object Detection ์ˆ˜ํ–‰

Tensorflow์—์„œ Pretrained ๋œ ๋ชจ๋ธ ํŒŒ์ผ์„ OpenCV์—์„œ ๋กœ๋“œํ•˜์—ฌ ์ด๋ฏธ์ง€์™€ ์˜์ƒ์— ๋Œ€ํ•œ Object Detection์„ ์ˆ˜ํ–‰ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.์ž…๋ ฅ ์ด๋ฏธ์ง€๋กœ ์‚ฌ์šฉ๋  ์ด๋ฏธ์ง€ ๋ณด๊ธฐimport cv2import matplotlib.pyplot as plt%matplotlib inlineimg = cv2.imread('../../data/image/beatles01.jpg')img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)print('image shape:', img.shape)plt.figure(figsize=(12, 12))plt.imshow(img_rgb)image shape: (633, 806, 3)Inference ๋ชจ๋ธ ์ƒ์„ฑTensorflow์—์„œ Pretr..

๐Ÿ‘€ Computer Vision

[CV] SSD - Single Shot (Multibox) Detector

Object Detection Historyํฌ๊ฒŒ 3๊ฐœ์˜ ๋ถ„๋ฅ˜๋กœ ๋‚˜๋ˆ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.1. ์ „ํ†ต์ ์ธ ํƒ์ง€ ๋ฐฉ๋ฒ• (Traditional Detection Methods)VJ Detector (P. Viola et al., 2001):๋น„์˜ฌ๋ผ-์กด์Šค ๊ฐ์ฒด ํƒ์ง€๊ธฐ๋ผ๊ณ ๋„ ๋ถˆ๋ฆฌ๋Š” ์ด ๋ฐฉ๋ฒ•์€ ํŠน์ง• ๊ธฐ๋ฐ˜ ์–ผ๊ตด ํƒ์ง€๋ฅผ ์œ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ๋„๋ฆฌ ์•Œ๋ ค์ ธ ์žˆ์Šต๋‹ˆ๋‹ค.HOG Detector (N. Dalal et al., 2005):Histogram of Oriented Gradients (HOG)๋Š” ์ด๋ฏธ์ง€์˜ ๊ตญ์†Œ์ ์ธ ๋ฐฉํ–ฅ ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ์ฒด๋ฅผ ํƒ์ง€ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.DPM (P. Felzenszwalb et al., 2008):Deformable Part Model (DPM)์€ ๋ฌผ์ฒด๋ฅผ ์ž‘์€ ๋ถ€๋ถ„๋“ค๋กœ ๋ถ„ํ• ํ•˜์—ฌ ๊ฐ ๋ถ€๋ถ„์˜ ์œ„์น˜์™€ ํ˜•ํƒœ๋ฅผ ๋ชจ๋ธ๋งํ•˜..

๐Ÿ‘€ Computer Vision

[CV] OpenCV๋กœ Object Detection ๊ตฌํ˜„ํ•˜๊ธฐ (Part.2)

OpenCV DNN ํŒจํ‚ค์ง€๋ฅผ ์ด์šฉํ•˜์—ฌ SSD๊ธฐ๋ฐ˜ Object Detection ์ˆ˜ํ–‰ Tensorflow ์—์„œ Pretrained ๋œ ๋ชจ๋ธ ํŒŒ์ผ์„ OpenCV์—์„œ ๋กœ๋“œํ•˜์—ฌ ์ด๋ฏธ์ง€์™€ ์˜์ƒ์— ๋Œ€ํ•œ Object Detection์„ ์ˆ˜ํ–‰ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.์ž…๋ ฅ ์ด๋ฏธ์ง€๋กœ ์‚ฌ์šฉ๋  ์ด๋ฏธ์ง€ ๋ณด๊ธฐimport cv2import matplotlib.pyplot as plt%matplotlib inlineimg = cv2.imread('../../data/image/beatles01.jpg')img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)print('image shape:', img.shape)plt.figure(figsize=(12, 12))plt.imshow(img_rgb)Tensorflow์—์„œ..

Bigbread1129
'๐Ÿ‘€ Computer Vision' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก