Offline Dataset preprocessing
Make sure the data you have satisfies following conditions
- Data
-- imgs
-- all train images
-- masks
-- all masks (file names should be same as train images)
`utils\\resize_and_img_format.py
fileutils\\convert_to_binary.py
fileFlood Area dataset
I have used all the offline dataset preprocessing for this kaggle dataset
unzip data.zip
Installation
pip install -r requirements
Training
python train.py --epochs 100 --batch-size 16
Prediction
Visuvalize - python predict.py --model ./checkpoints/checkpoint_epoch100.pth -i ./data/imgs/0.jpg --viz --output ./0_OUT.jpg
You can use utils/blending.py to create blended image
Image and mask
Blended Segmentation :
Colab NoteBook
Credits