This repository contains code modified from MSCG-Net models (MSCG-Net-50 and MSCG-Net-101) for semantic segmentation in Agriculture-Vision Challenge and Workshop (CVPR 2021). Original readme file can be found here
├── config # config code
├── data # dataset loader and pre-processing code
├── tools # train and test code, ckpt and model_load
├── lib # model block, loss, utils code, etc
└── ckpt # output check point, trained weights, log files, etc
- python 3.7
- pytorch 1.7.1
- opencv
- tensorboardx
- albumentations
- pretrainedmodels
- others (see requirements.txt)
https://drive.google.com/file/d/1oW503NxUfwANfKQZ8zT3gG_XDWSuwwsQ/view?usp=sharing
- change DATASET_ROOT to your dataset path in ./data/AgricultureVision/pre_process.py
DATASET_ROOT = '/your/path/to/Agriculture-Vision'
- keep the dataset structure as the same with the official structure shown as below
Agriculture-Vision
|-- train
| |-- masks
| |-- labels
| |-- boundaries
| |-- images
| | |-- nir
| | |-- rgb
|-- val
| |-- masks
| |-- labels
| |-- boundaries
| |-- images
| | |-- nir
| | |-- rgb
|-- test
| |-- boundaries
| |-- images
| | |-- nir
| | |-- rgb
| |-- masks
python train_R101.py
python test_submission.py
mIoU: 0.464251