FocusOnDepth icon indicating copy to clipboard operation
FocusOnDepth copied to clipboard

How to specify validation dataset

Open caginozkaya opened this issue 3 years ago • 1 comments

Hello, thanks for the great code. I have a question about the dataset split.

  1. Does the split code generate validation dataset by taking random samples in the ratio which is specified in config.splits?

  2. 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

caginozkaya avatar Mar 29 '22 10:03 caginozkaya

Hi, Thank you very much for your message.

  1. Indeed for now, the split code generate validation dataset by taking random samples in the ratio specified in the config file.
  2. 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_segmentations contains 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,

younesbelkada avatar Mar 29 '22 13:03 younesbelkada