Yolov1 source code note record

1.coord_mask = target_tensor[..., 4] > 0

Tensor ellipsis (three dots) slice_tensor slice... What does it mean?_swust_fang's Blog-CSDN Blog

Three points automatically determine the dimension

2.noobj_mask = noobj_mask.bool() #Isn't it bool already?

3.bbox_pred = coord_pred[:, :5*B].contiguous().view(-1, 5) #Prevent memory discontinuity from reporting errors

4.image = cv2.imread(image_path)#Some old image processing software uses BGR format, so OpenCV adopts BGR format to be compatible with these software.

img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # assuming the model is trained with RGB images.

5.

Old notes Yolo v1 notes_Rondox's Blog-CSDN Blog

 

Source code explanation link

reference

yolov1-code analysis_哔哩哔哩_bilibili

understand by yourself

Yolov1 source code explains voc.py_Rondox's Blog - CSDN Blog

Yolov1 source code explains loss.py_Rondox's Blog - CSDN Blog

Yolov1 source code explains train.py_Rondox's Blog - CSDN Blog

Yolov1 source code explains detect.py_Rondox's Blog - CSDN Blog

The net part is skipped for the time being

Guess you like

Origin blog.csdn.net/qq_36632604/article/details/130471829