Module for utilizing Detectron 2 to train models on radiological images.
- Requirements to recreate environment.
- Detectron2 0.4 (version relevant to your Cuda version and pytorch version)
- Data should be present as processed .png's in chosen directories specified in flags.
- Example of data directory structure and form.
- Include test_meta.csv if you wish to predict on testset.
- flags_dict has temporarily been shifted to the main script
- Any other changes to be made to Detectron 2 config should be added to Flags class first.
python Detectron2_train/detectron2_train.py
- Some linux servers may require switching off torch.cuda.synchronize calls in Loss Hook and Detectron2 Evaluator
- Change Device flag and directories.
- If left uncommented, after training is completed, metrics.json from output directory will be used to generate loss curves and AP values if validation set is present.
- Predictions on test set in requisite Kaggle submissions format will automatically be generated.
- From the formed csv submission, annotations will be drawn on sample with confidence bounds on BBs.