Calgary-Campinas challenge

Calgary-Campinas challenge#

This folder contains the training code specific for the Calgary Campinas challenge.

Training#

The standard training command direct train can be used. Training model configurations can be found in the configs/ folder.

After downloading the training and validation data to <training_data_directory> and <validation_data_directory> a command such as the one below is used to train a <model_name>:

direct train <output_folder> \
         --training-root <training_data_directory> \
         --validation-root <validation_data_directory>  \
         --name <name> \
         --cfg projects/calgary_campinas/configs/base_<model_name>.yaml \
         --num-gpus <number_of_gpus> \
         --num-workers <number_of_workers> \
         [--resume]

For further information see training.

The validation volumes can be computed using predict_val.py (see Validation).

During training, training loss, validation metrics and validation image predictions are logged. Additionally, Tensorboard allows for visualization of the above.

For our submissions in the challenge we used base_rim.yaml and base_recurrentvarnet.yaml as the model configurations. As of writing (January 2022) these are among the top results in both Track 1 and Track 2.

Inference#

Validation#

To make predictions on validation data a command such as the one below is used to perform inference on dataset with index <dataset_validation_index> as various datasets can be defined in the training configuration file.

cd projects/
python3 predict_val.py <output_directory> \
                 --checkpoint <path_or_url_to_checkpoint> \
                 --cfg projects/calgary_campinas/configs/base_<model_name>.yaml \
                 --data-root <val_data_root> \
                 --validation-index <dataset_validation_index> \
                 --num-gpus <number_of_gpus> \
                 --num-workers <number_of_workers> \

Test#

The masks are not provided for the test set, and need to be pre-computed using compute_masks.py. These masks should be passed to the --masks parameter of predict_test.py.