farmland-instance-segmentation
instance segmentation in IFLYTEK farmland challenges based on mmdetection
https://github.com/wangzehui20/farmland-instance-segmentation
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Keywords
Repository
instance segmentation in IFLYTEK farmland challenges based on mmdetection
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Farmland Segmentation on IFLYTEK challenge
In this Farmland Segmentation Challenge, I only use Mask RCNN + FPN on MMDetection to achieve rank 3
My code is mainly located in experiment_farmland folder
Introduction
This competition aims to extract farmland segmentation from large remote-sensing images, so i will introduce my plan explicitly later
MMDetection is the most convenient and useful open source framework to learn deep learning, you could achieve better scores easily from most projects and study its poetical code. Appreciating to the contributors of MMDetection!
### Installation
Firstly, you need to configure MMDetection environment
- I recommend you to follow official guide
- and also refer to requirements from
experiment_farmland/requirements.txt -
conda install gdal
Custom dataset
Competition official gives large remote-sensing images that needs to be clipped into the small images and MMDetection requires COCO dataset format and so on
I implement above content by sliding window overlapping clipping in experiment_farmland\mask_rcnn\1024_256\dataset, image size is 1024 and overlap is 256 pixels
Your dataset transformed to coco dataset after that soft linked experiment_farmland\mask_rcnn\data_1024_256
Then, replace classes with your classes before training:
mmdet/datasets/coco.py
CoCoDataset(CustomDataset): CLASSES = ('farm_land')
mmdet/core/evaluation/class_names.py
def coco_classes(): return ['farm_land']
experiment_farmland\mask_rcnn\1024_256\code\mask_rcnn_res50\coco_instance.py
classes=('farm_land')
Train and Test
experiment_farmland\mask_rcnn
```
Train
bash dist_train.sh
Test
bash dist_test.sh ```
Tricks
- GIoU Loss
- Soft NMS
Post process
Q: Segmentation exist overlapping which may generate from inferior inference results and resume origin remote-sensing image from small clipped images.
A: My solution is that union IoU > 0.5 or intersection/polygon(low score) > 0.7 which help me improve score approximately 5 points in semi-finals
Demo
`experiment_farmland\mask_rcnn\1024_256\demo\demo.py
It could generate gt, pred, pred after post process images to analysis problem
- pred and gt, better in regular farmland

- pred and predpost

Also, above demo contrast tools refers to my another work, BatchLabelCrop
:smile::stuckouttonguewinkingeye: :kissingsmilingeyes:
Owner
- Login: wangzehui20
- Kind: user
- Company: University of Chinese Academy of Sciences
- Repositories: 1
- Profile: https://github.com/wangzehui20
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - name: "MMDetection Contributors" title: "OpenMMLab Detection Toolbox and Benchmark" date-released: 2018-08-22 url: "https://github.com/open-mmlab/mmdetection" license: Apache-2.0
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- codecov/codecov-action v1.0.10 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
- pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
- Shapely ==1.7.1
- imgaug ==0.4.0
- matplotlib ==3.4.0
- mmcv ==1.3.14
- mmcv_full ==1.3.8
- mmdet ==2.16.0
- numpy ==1.19.2
- opencv_python ==4.5.1.48
- osgeo ==0.0.1
- pycocotools ==2.0
- pygdal ==2.2.3.5
- pyshp ==2.1.3
- scikit_image ==0.18.1
- skimage ==0.0
- tabulate ==0.8.9
- torch ==1.7.0
- tqdm ==4.46.0
- cython *
- numpy *
- recommonmark *
- sphinx *
- sphinx_markdown_tables *
- sphinx_rtd_theme *
- mmcv-full >=1.3.8
- albumentations >=0.3.2
- cityscapesscripts *
- imagecorruptions *
- scipy *
- sklearn *
- mmcv *
- torch *
- torchvision *
- matplotlib *
- numpy *
- pycocotools *
- pycocotools-windows *
- six *
- terminaltables *
- asynctest * test
- codecov * test
- flake8 * test
- interrogate * test
- isort ==4.3.21 test
- kwarray * test
- onnx ==1.7.0 test
- onnxruntime ==1.5.1 test
- pytest * test
- ubelt * test
- xdoctest >=0.10.0 test
- yapf * test