- Notifications
You must be signed in to change notification settings - Fork127
chrieke/InstanceSegmentation_Sentinel2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This thesis aims to delineate agricultural field parcels from satellite images via deep learninginstance segmentation. Manual delineation is accurate but time consuming, and manyautomated approaches with traditional image segmentation techniques struggle to capturethe variety of possible field appearances. Deep learning has proven to be successful invarious computer vision tasks, and might be a good candidate to enable accurate,performant and generalizable delineation of agricultural fields. Here, a fully convolutionalinstance segmentation architecture (adapted from Li et al., 2016), was trained on Sentinel-2image data and corresponding agricultural field polygons from Denmark. In contrast to manyother approaches, the model operates on raw RGB images without significant pre- andpost-processing. After training, the model proved successful in predicting field boundaries onheld-out image chips. The results generalize across different field sizes, shapes and otherproperties, but show characteristic problems in some cases. In a second experiment, themodel was trained to simultaneously predict the crop type of the field instance. Performancein this setting was significantly worse. Many fields were correctly delineated, but the wrongcrop class was predicted. Overall, the results are promising and prove the validity of the deeplearning approach. Also, the methodology offers many directions for future improvement.
Install the FCIS model and MXNet framework according to the instructions in theFCIS repository. The setup works well with an AWS EC2 P2 instance and the official AWS Deep Learning AMI (Ubuntu). Make sure that the installations were successfull by running the FCIS demo:
> python FCIS/fcis/demo.py
Follow the instructions and run the code in thePreprocessing Jupyter notebook. This will prepare the Denmark LPIS field data and create the image chips and COCO format annotations. When finished, place the preprocessed vector folder.output/preprocessing/annotations
and image folder.output/preprocessing/images
in.FCIS/data/coco
.
Place the configuration file.model/resnet_v1_101_coco_fcis_end2end_ohem.yaml
in.FCIS/experiments/fcis/cfgs
. A more detailed description of the model and training parameters used for the thesis is given in thesis chapter 3.3. Then delete the annotations cache (neccessary each time you change a configuration parameter that could influence the model evaluation or training):
> rm -rf .FCIS/data/coco/annotations_cache/; rm -rf .FCIS/data/cache/COCOMask/
Runs the prediction/model evaluation task via the model trained in the thesis. First move the folder containing the model.model/resnet_v1_101_coco_fcis_end2end_ohem
toFCIS/output/fcis/coco/resnet_v1_101_coco_fcis_end2end_ohem
. Then run the evaluation:
> python experiments/fcis/fcis_end2end_test.py --cfg experiments/fcis/cfgs/resnet_v1_101_coco_fcis_end2end_ohem.yaml --ignore_cache
The resulting instance segmentation and object detection proposals will be saved toFCIS/output/fcis/coco/resnet_v1_101_coco_fcis_end2end_ohem/val2016/detections_val2016_results.json
.
You can carry out your own model training with custom configurations or datasets.
First adjust thePIXEL_MEANS values in the configuration file to the RGB channels means of your dataset (The band means are saved to.output/preprocessed/statistics.json
during the preprocessing).
Delete existing model files:
> rm -rf /home/ubuntu/FCIS/output/fcis/coco/resnet_v1_101_coco_fcis_end2end_ohem/
Finally, run the training task:
> python experiments/fcis/fcis_end2end_train_test.py --cfg experiments/fcis/cfgs/resnet_v1_101_coco_fcis_end2end_ohem.yaml
About
🌱 Deep Learning for Instance Segmentation of Agricultural Fields - Master thesis
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.