0
$\begingroup$

I have a dataset for Object Detection with YOLO format labels, each imagine can have occurences of different classes and multiple occurences of the same class.

How can the dataset be divided into Training, Validation, and Test sets so that each contains about the same percentage of occurences per class?

$\endgroup$

1 Answer 1

0
$\begingroup$

One approach can be to start with splitting the dataset by classes, having the same number of records in each one, because that is your requirement for the final splits. Then split each class part into training, validation and testing. Then finally combine all the splits based on their type not the class, in other words, combine the all the training splits and combine the validation splits and so on. This way you guarantee satisfying your requirement.

$\endgroup$

Your Answer

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

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