YOLO 논문 발표 영상
https://www.youtube.com/watch?v=NM6lrxy0bxs
YOLO 검출 방법
https://www.youtube.com/watch?v=9s_FpMpdYW8&ab_channel=DeepLearningAI
YOLO v1 이해하는 데 도움된 영상
https://www.youtube.com/watch?v=ag3DLKsl2vk&ab_channel=codebasics
anchor box 개념이 어려워서 찾아본 영상
https://www.youtube.com/watch?v=RTlwl2bv0Tg&ab_channel=DeepLearningAI
https://mickael-k.tistory.com/27?category=798520

IoU= A∩B / A∪B
IOU가 높을수록 잘 예측한 모델

예시

[이미지 출처]: https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/
# IoU = Intersection / (A + B − Intersection)
def compute_iou(pred_box, gt_box):
x1 = np.maximum(pred_box[0], gt_box[0])
y1 = np.maximum(pred_box[1], gt_box[1])
x2 = np.minimum(pred_box[2], gt_box[2])
y2 = np.minimum(pred_box[3], gt_box[3])
# w = np.maximum(x2 - x1, 0), h = np.maximim(y2 - y1, 0)
intersection = np.maximum(x2 - x1, 0) * np.maximum(y2 - y1, 0)
pred_box_area = (pred_box[2] - pred_box[0]) * (pred_box[3] - pred_box[1])
gt_box_area = (gt_box[2] - gt_box[0]) * (gt_box[3] - gt_box[1])
union = pred_box_area + gt_box_area - intersection_area
iou = intersection / union
return iou
[이미지 출처]: https://www.pyimagesearch.com/2015/02/16/faster-non-maximum-suppression-python/
import numpy as np
def non_max_suppression_fast(boxes, overlap_thresh):
if len(boxes) == 0:
return []
if boxes.dtype.kind == 'i':
boxes = boxes.astype('float')
pick = []
x1 = boxes[:, 0]
y1 = boxes[:, 1]
x2 = boxes[:, 2]
y2 = boxes[:, 3]
area = (x2 - x1 + 1) * (y2 - y1 + 1)
idxs = np.argsort(y2)
while len(idxs) > 0:
last = len(idxs) - 1
i = idxs[last]
pick.append(i)
xx1 = np.maximum(x1[i], x1[idxs[:last]])
yy1 = np.maximum(y1[i], y1[idxs[:last]])
xx2 = np.maximum(x2[i], x2[idxs[:last]])
yy2 = np.maximum(y2[i], y2[idxs[:last]])
w = np.maximum(0, xx2 - xx1 + 1)
h = np.maximum(0, yy2 - yy1 + 1)
overlap = (w * h) / area[idxs[:last]]
idxs = np.delete(idxs, np.concatenate(([last], np.where(overlap > overlap_thresh)[0])))
return boxes[pick].astype('int')
TPFPFNprecision = TP / (TP + FP)
recall = TP / (TP + FN)
[이미지 출처] : https://www.researchgate.net/figure/a-Example-of-Precision-Recall-curve-with-the-precision-score-on-the-y-axis-and-the_fig1_321672019
[이미지 출처] : https://www.researchgate.net/figure/Evaluation-on-PASCAL-VOC-2007-and-MS-COCO-test-dev_tbl2_328939155

bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
fire hydrant
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
backpack
umbrella
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
sofa
pottedplant
bed
diningtable
toilet
tvmonitor
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
book
clock
vase
scissors
teddy bear
hair drier
toothbrush
[이미지 출처]https://cocodataset.org/#home
[이미지 출처]https://www.researchgate.net/figure/Structure-detail-of-YOLOv3It-uses-Darknet-53-as-the-backbone-network-and-uses-three_fig1_335865923
[이미지 출처]https://kr.mathworks.com/help/vision/ug/getting-started-with-yolo-v2.html