AlexeyAB / darknet

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

YOLO Use for random videos #2260

Open buzdarbalooch opened 5 years ago

buzdarbalooch commented 5 years ago

Hi,

i have created a dataset, and YOLO works fine for the video, it is trained for, but what if we have new video with similar objects. will it work.?

duohappy commented 5 years ago

refer to https://github.com/AlexeyAB/darknet

  • General rule - your training dataset should include such a set of relative sizes of objects that you want to detect:
    • 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

I.e. for each object from Test dataset there must be at least 1 object in the Training dataset with the same class_id and about the same relative size:

object width in percent from Training dataset ~= object width in percent from Test dataset

That is, if only objects that occupied 80-90% of the image were present in the training set, then the trained network will not be able to detect objects that occupy 1-10% of the image.

buzdarbalooch commented 5 years ago

@AlexeyAB .. you are aware with my scenario. The car-park video scenario. For example, i made the video (4 mins) annotated it, then gave this video as an input to YOLO. which detetcts objects inside the video. My question is now if a different video from a different car-park is given as input to the system , will it detct objects in the video.

AlexeyAB commented 5 years ago

@buzdarbalooch If cars in the new video will be with approximately the same angle, tilt, size, illumintation, side, as in Training dataset, then yes - it will detct objects in the new video.