FocusOnDepth
FocusOnDepth copied to clipboard
How to specify validation dataset
Hello, thanks for the great code. I have a question about the dataset split.
-
Does the split code generate validation dataset by taking random samples in the ratio which is specified in config.splits?
-
How can I specifiy the validation dataset itself instead of spliting the whole dataset? For example: trainImages = /path/train/images/...png trainMasks = /path/train/masks/...png validationImages = /path/validation/images/...png validationMasks = /path/validation/masks/...png
Hi, Thank you very much for your message.
- Indeed for now, the split code generate validation dataset by taking random samples in the ratio specified in the config file.
- The feature that you are mentioning is interesting. The solutions that I can see are:
- Adapt the function that gets the image paths when specifying the split, here
- Or, modify the init function on the AutoFocus Dataset, especially this line, and adapt it as you wish. Just make sure that the variables
self.paths_images, self.paths_depths, self.paths_segmentationscontains the full paths to each triplet (or pair) of input images, corresponding depth map, and segmentation mask, in the correct order. I am sure there is a smarter way to get these full paths, so if you have a reliable solution, feel free to submit a pull request and we can review it!
Cheers,