Winning code of Eye In The Sky Satellite image segmentation Competition as a part of Inter-IIT tech meet hosted by IIT Bombay.
torch
tensorboardX
tensorflow
scikit-image
scikit-learn
tifffile
skimage
numpy
argparse
gflags
Basic dependencies stated in requirements.txt
To install dependencies: pip install -r requirements.txt
1.aug.py - applies augmentation to the training data and saves it in a folder named image
python aug.py --path=[train folder] --dest=[dest folder]
- Patches.py creates patches of the given shape and saves them to a specified location
python patches.py --source=[source folder] --dest=[destiantion folder] --height=256 --width=256 --stride=0.5 --mode=train
- train.py - trains model
python train.py --id=[experiment id] --epochs=25 --resume=[restart training(true/false)] --batch_size=16 --lr=0.001 --tag=[tag for tensorboard runs] --gpu=[true/false]
.
├── train # Contains original sat and gt files
├── image # contains images after augmentation
├── data # contains patches
.
.
└── README.md
process:
python aug.py
python channel9.py
python patches.py
python train.py --id=[] --tag=[]
python predict.py --id=[] --sub_id=[]
python stitch.py --id=[] --su_id=[]
- Copy test folder as given
2. Run python patches.py --mode='test'
3. Then python predict.py --id=1 --sub_id=1
4. Then python stitch.py --id=1 --sub_id=1
Final Predictions will be saved in TestStichedid_1
Note - Copy given dataset folder as The-Eye-in-the-sky-dataset, The-Eye-in-the-sky-test-dataset in the Binary folder
1. python patches.py
2. python create_binary_mask.py
3. python train.py --id=[]
4. python predict.py --id=[] --sub_id=[]
5. python stich_mask.py --id=[] --su_id=[]