Setting multiple directories for training and validation in yolo_v4_train_resnet18.txt

Hi I tarin with TAO yolov4
have 3 directories for training and 3 for validation (all set in the docker via .tao_mounts.json)
Now I have noticed that if I set them in the yolo_v4_train_resnet18.txt in the following way I get an error regarding the validation folders only:

dataset_config {
  data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset1/training/label_2"
      image_directory_path: "/workspace/tao-experiments/data/dataset1/training/image_2"
  }
    data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset2/training/label_2"
      image_directory_path: "/workspace/tao-experiments/data/dataset2/training/image_2"
  }
    data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset3/training/label_2"
      image_directory_path: "/workspace/tao-experiments/data/dataset3/training/image_2"
  }
  
  


  include_difficult_in_training: true
  image_extension: "png"
  
  target_class_mapping {
      key: "fff"
      value: "fff"
  }
  target_class_mapping {
      key: "eee"
      value: "eee"
  }
  target_class_mapping {
      key: "ddd"
      value: "ddd"
  }
  target_class_mapping {
      key: "ccc"
      value: "ccc"
  }
  target_class_mapping {
      key: "bbb"
      value: "bbb"
  }
  target_class_mapping {
      key: "aaa"
      value: "aaa"
  }


validation_data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset1/val/label"
      image_directory_path: "/workspace/tao-experiments/data/dataset1/val/image"
      }
      
validation_data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset2/val/label"
      image_directory_path: "/workspace/tao-experiments/data/dataset2/val/image"
      }
      
validation_data_sources: {
      label_directory_path: "/workspace/tao-experiments/data/dataset3/val/label"
      image_directory_path: "/workspace/tao-experiments/data/dataset3/val/image"
      }
               

The only thing helped was to change the validation part like this:

validation_data_sources: [
  {
    label_directory_path: "/workspace/tao-experiments/data/dataset1/val/label"
    image_directory_path: "/workspace/tao-experiments/data/dataset1/val/image"
  },
  {
    label_directory_path: "/workspace/tao-experiments/data/dataset2/val/label"
    image_directory_path: "/workspace/tao-experiments/data/dataset2/val/image"
  },
  {
    label_directory_path: "/workspace/tao-experiments/data/dataset3/val/label"
    image_directory_path: "/workspace/tao-experiments/data/dataset3/val/image"

  }
]

  1. why this happens?
    2)is it ok to format also the training part in the same way as validation for more consistency?

Please refer to YOLOv4

Hi please answer more speciffaclly to what I am asking.

Can you share the error log when you set as above? According to the user guide, seems that it is correct.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

Hi,
I can run with below format.

  validation_data_sources: {
    image_directory_path: "/workspace/tlt-experiments/data/kitti_dataset/val/image"
    label_directory_path: "/workspace/tlt-experiments/data/kitti_dataset/val/label"
  }
  validation_data_sources: {
    image_directory_path: "/workspace/tlt-experiments/data/kitti_dataset/training/image_2"
    label_directory_path: "/workspace/tlt-experiments/data/kitti_dataset/training/label_2"
  }

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.