s t u d y . . ๐Ÿง 44

[Transfer Learning] ์ „์ดํ•™์Šต ๊ฐœ๋…

Transfer Learning ํ•™์Šต ๋ฐ์ดํ„ฐ๊ฐ€ ๋ถ€์กฑํ•œ ๋ถ„์•ผ์˜ ๋ชจ๋ธ ๊ตฌ์ถ•์„ ์œ„ํ•ด ๋ฐ์ดํ„ฐ๊ฐ€ ํ’๋ถ€ํ•œ ๋ถ„์•ผ์—์„œ ํ›ˆ๋ จ๋œ ๋ชจ๋ธ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ํ•™์Šต ๊ธฐ๋ฒ• Imagenet(๋Œ€๊ทœ๋ชจ ๋ฐ์ดํ„ฐ์…‹) ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์‚ฌ์ „ํ•™์Šต๋œ(pre-trained) ๋ชจ๋ธ์˜ ๊ฐ€์ค‘์น˜๋ฅผ ๊ฐ€์ง€๊ณ  ์™€์„œ ์šฐ๋ฆฌ๊ฐ€ ํ•ด๊ฒฐํ•˜๊ณ ์ž ํ•˜๋Š” ๊ณผ์ œ์— ๋งž๊ฒŒ ์žฌ๋ณด์ •ํ•ด์„œ ์‚ฌ์šฉ ๋น„๊ต์  ์ ์€ ์ˆ˜์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ ๋„ ์šฐ๋ฆฌ๊ฐ€ ์›ํ•˜๋Š” ๊ณผ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ํ›ˆ๋ จ → pre-trained model์˜ weights๋ฅผ ์•ฝ๊ฐ„์”ฉ ๋ณ€ํ™”์‹œ์ผœ ์ ์€ ๋ฐ์ดํ„ฐ์…‹์—์„œ task์— ๋งž๊ฒŒ ์žฌ์‚ฌ์šฉ → pre-trained model์˜ classifier๋Š” ์‚ญ์ œํ•˜๊ณ  ๋ชฉ์ ์— ๋งž๋Š” ์ƒˆ๋กœ์šด classifier ์ถ”๊ฐ€ ⇒ ์ƒˆ๋กญ๊ฒŒ ๋งŒ๋“ค์–ด์ง„ ๋ชจ๋ธ fine tuning ์ง„ํ–‰ (strategy 3๊ฐœ ์ค‘ 1๊ฐœ ์„ ํƒํ•ด..

[YOLOv5] ํ•™์Šต๋œ ๋ชจ๋ธ๋กœ ์ด๋ฏธ์ง€ test ํ›„ ํ•œ ํŒŒ์ผ์— ์ €์žฅํ•˜๊ธฐ

detect.py ํŒŒ์ผ์—์„œ test ํ•  ๋•Œ๋งˆ๋‹ค runs/detect/exp~ ๊ฒฝ๋กœ๋กœ ์ƒˆ๋กœ์šด ํŒŒ์ผ์„ ๊ณ„์† ์ƒ์„ฑํ•ด์ฃผ๊ธธ๋ž˜ test ํ•œ ๊ฒฐ๊ณผ๋ฅผ ํ•œ ํŒŒ์ผ๋กœ ๋ชจ์„ ์ˆ˜ ์žˆ๋„๋ก ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ–ˆ๋‹ค # Directories save_dir = Path(project)/'result' save_dir.mkdir(parents=True, exist_ok=True) #save_dir = increment_path(Path(project) / name, exist_ok=exist_ok) # increment run #(save_dir / 'labels').mkdir(parents=True, exist_ok=True) # make dir ๋”๋ณด๊ธฐ ๋‚ด๊ฐ€ ์ฐธ๊ณ ํ•œ ๊ธ€ ! YOLO V5 ํ™˜๊ฒฝ ์…‹ํŒ… ๋ฐ ๋ชจ๋ธ ์•„ํ‚คํ…์ณ ๋ถ„์„ํ•˜๊ธฐ ์ž‘์„ฑ์ž : ํ•œ์–‘๋Œ€..

[YOLOv5] YOLOv5 ์‚ฌ์šฉ๋ฒ•

YOLOv5 ์„ค์น˜ YOLOv5 Documentation Introduction To get started right now check out the Quick Start Guide What is YOLOv5 YOLO an acronym for 'You only look once', is an object detection algorithm that divides images into a grid system. Each cell in the grid is responsible for detecting objec docs.ultralytics.com 1. ๊นƒํ—™ ํด๋ก  GitHub - ultralytics/yolov5: YOLOv5 ๐Ÿš€ in PyTorch > ONNX > CoreML > TFLite YOLOv5..

[YOLOv5] Custom Dataset์œผ๋กœ Pothole detection

YOLOv5 Training 1. YOLOv5 git clone git clone # clone cd yolov5 pip install -r requirements.txt # ํ•„์š”ํ•œ ํŒจํ‚ค์ง€ ์„ค์น˜ 2. dataset roboflow์—์„œ image์™€ label์ด ์ด๋ฏธ ์žˆ์–ด์„œ ๋‹ค์šด๋ฐ›์•„์คฌ๋‹ค yolo v5 pothole detection median blur Object Detection Dataset by Parth Choksi 817 open source potholes images. yolo v5 pothole detection median blur dataset by Parth Choksi universe.roboflow.com images labels 3. coco128.yaml ํŒŒ์ผ ์ˆ˜์ • train: ..

[CNN] Custom Dataset์œผ๋กœ Pothole detection

์บ๊ธ€์—์„œ ๋ฐ์ดํ„ฐ์…‹์„ ๋‹ค์šด ๋ฐ›์•˜๋‹ค Pothole Detection Dataset Labelled image dataset containing 300+ images of roads containing potholes www.kaggle.com ๋‹ค๋ฅธ ๋ถ„๋“ค์ด CNN์œผ๋กœ ํฌํŠธํ™€ ํƒ์ง€ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์˜ฌ๋ ค์ฃผ์…”์„œ ๋ณด๋ฉด์„œ ๋”ฐ๋ผํ–ˆ๋‹ค ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค import ! import numpy as np import pandas as pd import tensorflow as tf import cv2 import matplotlib.pyplot as plt from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing import image ์‚ฌ์ง„..

[YOLOv3] Object Detection๊ณผ Bounding Box

์ผ๋‹จ ํ•„์š”ํ•œ ๋ชจ๋“ˆ๋“ค import ํ•ด์ฃผ๊ธฐ ! import cv2 import numpy as np from matplotlib import pyplot as plt YOLO ๋กœ๋“œ net = cv2.dnn.readNet("yolov3.weights", "yolov3.cfg") classes = [] with open("coco.names", "rt",encoding = "UTF8") as f: classes = [line.strip() for line in f.readlines()] layer_names = net.getLayerNames() output_layers = [layer_names[i-1] for i in net.getUnconnectedOutLayers()] colors = np.random...

[DARKNET] ๋‹คํฌ๋„ท์œผ๋กœ YOLOV3 ๋Œ๋ฆฌ๋Š” ๋ฒ•

1. ํ•„์š”ํ•œ ํŒŒ์ผ ๋‹ค์šด name cfg weight 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. darknet ๊นƒํ—™ ํด๋ก  + make git clone https://github.com/pjreddie/dark..

[YOLOv3] Object detection

ํฌํŠธํ™€์„ ํƒ์ง€ํ•  ๋•Œ ์–ด๋–ป๊ฒŒ ์ฝ”๋“œ๋ฅผ ์งค์ง€ ๊ณต๋ถ€๋ฅผ ํ•˜๋Š” ์ค‘์ด๋‹ค ๋‚ด๊ฐ€ ์ฐธ๊ณ ํ•œ ๋งํฌ ! YOLO object detection using Opencv with Python - Pysource We’re going to learn in this tutorial YOLO object detection. Yolo is a deep learning algorythm which came out on may 2016... pysource.com YOLO + OpenCV you only look once : object detection์„ ์œ„ํ•œ CNN ๊ธฐ๋ฐ˜์˜ ๋ฌผ์ฒด์ธ์‹ ์•Œ๊ณ ๋ฆฌ์ฆ˜ YOLO ์„ค์น˜ ํŒŒ์ผ : YOLO: Real-Time Object Detection YOLO: Real-Time Object Detection YOLO..

[OpenCV] ์‹ค์‹œ๊ฐ„ ์˜์ƒ์ฒ˜๋ฆฌ

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์˜ ์นด๋ฉ”๋ผ๋ฅผ ์ด์šฉํ•ด์„œ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์˜์ƒ์ฒ˜๋ฆฌํ•ด์„œ ๋จธ์‹ ๋Ÿฌ๋‹์„ ๋Œ๋ฆฌ๊ธฐ ์œ„ํ•ด ์„œ์น˜ํ•ด๋ณด๊ณ  ์ •๋ฆฌํ•œ ๋‚ด์šฉ๋“ค์ด๋‹ค ์ผ๋‹จ ์ด๋ฒˆ ๊ธ€์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์˜์ƒ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๊ธฐ ์œ„ํ•ด์„œ openCV์˜ ์ฝ”๋“œ๋ฅผ ์ •๋ฆฌ๋ฅผ ํ•ด๋ณด์•˜๋‹ค OpenCV cap = cv2.VideoCapture(path or ์นด๋ฉ”๋ผ์žฅ์น˜๋ฒˆํ˜ธ) cap = cv2.VideoCapture("์˜์ƒ ๊ฒฝ๋กœ" or 0: ์นด๋ฉ”๋ผ์žฅ์น˜๋ฒˆํ˜ธ) ์ฒซ ํ”„๋ ˆ์ž„ ์ฝ์–ด cap ๊ฐ์ฒด์— ์ €์žฅ cap.isOpen() if cap.isOpened(): cap์ด ์ง€์ •ํ•œ ํ”„๋ ˆ์ž„์œผ๋กœ ์ œ๋Œ€๋กœ ์ดˆ๊ธฐํ™”๋˜์—ˆ๋Š”์ง€ ํ™•์ธ cap.read() ret, img = cap.read() # ๋ฌดํ•œ๋ฐ˜๋ณต ์—ฐ์†์œผ๋กœ ํ”„๋ ˆ์ž„ ์ฝ๊ธฐ (์˜์ƒ ์ •๋ณด ์ฝ๊ธฐ) ret : true or false / img : ํ”„๋ ˆ์ž„ ์ด๋ฏธ์ง€ or None cap.get..

[OpenCV] ์‹ค์‹œ๊ฐ„ ์˜์ƒ ์ฒ˜๋ฆฌ : ๊ธฐ๋ณธ ํ•จ์ˆ˜ ์ •๋ฆฌ

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์˜ ์นด๋ฉ”๋ผ ์˜์ƒ์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ธ๊ณต์ง€๋Šฅ ๋ชจ๋ธ์„ ๋Œ๋ ค์„œ ๊ฐ์ง€๋ฅผ ํ•ด์•ผํ•˜๊ธฐ ๋•Œ๋ฌธ์— OpenCV ์ฝ”๋“œ๋ฅผ ์‚ดํŽด๋ณด์•˜๋‹ค! ๐Ÿ’ก ์˜์ƒ์„ ์ธ๊ณต์ง€๋Šฅ ๋ชจ๋ธ์— ๋Œ๋ฆฌ๋Š” ๋ฒ• ์ด๋ฏธ์ง€ ์‚ฌ์šฉํ•œ ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ ์ƒ์„ฑ ๋™์˜์ƒ ํ”„๋ ˆ์ž„ → ์ด๋ฏธ์ง€ (opencv ์‚ฌ์šฉ) 2๋ฒˆ์˜ ์ด๋ฏธ์ง€๋ฅผ 1๋ฒˆ์˜ ๋ชจ๋ธ์— ๋„ฃ๊ธฐ → ํ™•๋ฅ  ํ™•๋ฅ  ํ‰๊ท  → ํŒ๋ณ„ OpenCV cap = cv2.VideoCapture(path or ์นด๋ฉ”๋ผ์žฅ์น˜๋ฒˆํ˜ธ) cap = cv2.VideoCapture("์˜์ƒ ๊ฒฝ๋กœ" or 0: ์นด๋ฉ”๋ผ์žฅ์น˜๋ฒˆํ˜ธ) ์ฒซ ํ”„๋ ˆ์ž„ ์ฝ์–ด cap ๊ฐ์ฒด์— ์ €์žฅ cap.isOpen() if cap.isOpened(): cap์ด ์ง€์ •ํ•œ ํ”„๋ ˆ์ž„์œผ๋กœ ์ œ๋Œ€๋กœ ์ดˆ๊ธฐํ™”๋˜์—ˆ๋Š”์ง€ ํ™•์ธ cap.read() ret, img = cap.read() # ๋ฌดํ•œ๋ฐ˜๋ณต ์—ฐ์†์œผ๋กœ ํ”„๋ ˆ์ž„ ์ฝ๊ธฐ (์˜์ƒ ..