AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.71k stars 7.96k forks source link

Input image size for training #1054

Open shuntos opened 6 years ago

shuntos commented 6 years ago

I have 1000 images of car ,all are of multiple sizes. some of them are 20001000,and some are 600200. What is preferred size size for training . and i have to detect object from cctv footage ,do i have to take cropped image from cctv footage ?

AlexeyAB commented 6 years ago

CCTV - is it Сlosed Circuit Television?

You can use any sizes of images.

Simple rule - to use the same image size and same object size in training and test datasets.

General rule - to use the same relative sizes of objects in training and test datasets: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection

General rule - your training dataset should include such a set of relative sizes of objects that you want to detect - differing by no more than 2 times:

  • train_network_width * train_obj_width / train_image_width ~= detection_network_width * detection_obj_width / detection_image_width

  • train_network_height * train_obj_height / train_image_height ~= detection_network_height * detection_obj_height / detection_image_height