Network for Swin-Transformer. The pytorch version.
If this works for you, please give me a star, this is very important to me.😊
- Clone this repository.
git clone https://github.com/Runist/Swin-Transformer
- Install code from source.
cd Swin-Transformer
pip install -r requirements.txt
- Download the flower dataset.
- Download pretrain weights, the url in model.py.
- Start train your model.
python train.py --train-data-dir "train-data-path" --val-data-dir "val-data-path --device cuda:0
- Get prediction of model.
python predict.py
- Evaluate model.
python create_confusion_matrix.py --weights './weights/model-9.pth' --val-data-dir "val-data-path --device cuda:0
You need to store your data set like this:
├── train
│ ├── daisy
│ ├── dandelion
│ ├── roses
│ ├── sunflowers
│ └── tulips
└── validation
├── daisy
├── dandelion
├── roses
├── sunflowers
└── tulips
Appreciate the work from the following repositories:
Code and datasets are released for non-commercial and research purposes only. For commercial purposes, please contact the authors.