Grad-TransUNet Architecture Figure from Official Paper
- Python 3.6+
pip install -r requirements.txt
- kvasir dataset was used for training.
- First, you should generate the Grad-Cam Images with this github repositorygradcam pytorch
- you can choose differnet models to generate the heatmaps based on them (in my work resenet was the best model in generating heatmaps!)
- Training process can be started with following command.
python main.py --mode train --model_path ./path/to/model --train_path ./path/to/trainset --train_sail_path ./path/to/gradcam-trainset --test_path ./path/to/testset --test_sail_path ./path/to/gradcam-testset
- After model is trained, inference can be run with following command.
python main.py --mode inference --model_path ./path/to/model --image_path ./path/to/image