0
$\begingroup$

I saw many persons on YouTube who are making videos, split them into frames and label each object for a custom dataset. Therefore there're many images of a single scene which are very similar to each other.

I thought, it could be bad to have similar images in training and validation set. Also, nobody uses each image to train and test and copies a few of them to a validation set because they would be equal. Is that right?

I am training a yolov5 model to detect persons on single images.

$\endgroup$
5
  • $\begingroup$ You're right, if the validation images are very similar to the training ones you may end up overfitting. But most of the times it is the best you can do so you do it. I didn't understand the second paragraph though, can you reformulate it? $\endgroup$
    – DaSim
    Commented Aug 17, 2022 at 16:29
  • $\begingroup$ Ok, you have for example a 10 seconds video from a running person and you split the video into 20 frames. I thought, it could be bad to take all 20 frames because they are very similar to each other and maybe 16 images would be used for training and 4 for validating. $\endgroup$
    – FennecFly
    Commented Aug 17, 2022 at 16:36
  • $\begingroup$ You can as well take 2000 frames and if they are not so informative w.r.t. each other I don't think it's a big issue. The important part in my opinion would be to take training frames only until a given second, and validation as the remaining frames. $\endgroup$
    – DaSim
    Commented Aug 17, 2022 at 16:57
  • $\begingroup$ I posted a reply so if you feel like your question has been answered you can close it $\endgroup$
    – DaSim
    Commented Aug 17, 2022 at 17:10
  • $\begingroup$ In case of realtime data, its mostly the same.. $\endgroup$
    – kri1804
    Commented Mar 3, 2023 at 20:36

1 Answer 1

1
$\begingroup$

As in the comments:

You're right, if the validation images are very similar to the training ones you may end up overfitting. But most of the times it is the best you can do so you do it.

In a video, the number of used frames is not a problem but of particular importance is to time-separate training and validation datasets.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.