The dataset should be arranged in this format:
Dataset root folder
└───Class-1
│ image1.png
│ image2.png
│ image3.png
| ...
│
└───Class-2
│ image1.png
│ image2.png
│ image3.png
| ...
|
...
The name of the parent folder of each image is considered the ground truth label for that image. The images must be split into training and validation sets before starting training. The TRAIN_IMAGE_PATHS and VALIDATION_IMAGE_PATHS in the constants.py file must be paths to the pickle file that has the file paths of all the training and validation splits in the form of a list.
all_paths.pkl = ["1/image1.png", "1/image2.png", "1/image3.png", "2/image1.png", "2/image2.png", "2/image3.png", ...]
The TRAIN_IMAGE_PATHS and VALIDATION_IMAGE_PATHS in the cv/constants.py file must be paths to the pickle file that has the file paths of all the training and validation splits in the form of a dictionary for each fold. Example:
all_fold_paths.pkl = {
1: ["1/image1.png", "1/image2.png", "1/image3.png"],
2: ["2/image1.png", "2/image2.png", "2/image3.png"],
...
}
The cross-validation split can be performed using the split_cv_data.py script.
sanyuktaadap/brats-24-inference:latest
sanyuktaadap/brats-25-inference:latest
- In constants.py script, add the following
- Paths to the train and validation data
- Add class names in the order of needed prediction
- Run train.py to start training. Check required input arguments for training hyperparameters.
- In cv/constants.py script, add the following
- Paths to the train and validation data
- Add class names in the order of needed prediction
- Run cv/train.py to start training. Check required input arguments for training hyperparameters.
- Run test.py using the input arguments and the run_id/experiment number used during training.