Skip to content

YangPanHZAU/E2EVAP

Repository files navigation

E2EVAP: End-to-end vectorization of smallholder agricultural parcel boundaries from high-resolution remote sensing imagery

by Yang Pan,Xingyu Wang,Yanfei Zhong, and Liangpei Zhang

introduction This is an official implementation of E2EVAP in our ISPRS 2023 paper E2EVAP: End-to-end vectorization of smallholder agricultural parcel boundaries from high-resolution remote sensing imagery


Citation

If you use E2EVAP in your research, please cite the following paper:

@article{PAN2023246,
title = {E2EVAP: End-to-end vectorization of smallholder agricultural parcel boundaries from high-resolution remote sensing imagery},
journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
volume = {203},
pages = {246-264},
year = {2023},
issn = {0924-2716},
doi = {https://doi.org/10.1016/j.isprsjprs.2023.08.001},
url = {https://www.sciencedirect.com/science/article/pii/S0924271623002162},
author = {Yang Pan and Xinyu Wang and Liangpei Zhang and Yanfei Zhong},
}

Getting Started

Environment reference:E2EC

Prepare iflytek parcel Dataset

  • Dataset download

All images can be download from the top1 solution from iFLYTEK Challenge 2021

  • Dataset split

for training/valiate dataset, we follow cropping and split strategy from top1 solution from iFLYTEK Challenge 2021

for test dataset, we use same cropping strategy as for training but the images smaller than 512*512 are dropped.

python scripts/pre_for_train.py
python scripts/pre_for_test.py

Evaluate Model

1. download pretrained weight in this link

2. test the model

python test.py dla34_e2evap_ifly_parcel_test --checkpoint /xxxx/ckpt_ifly.pth --eval segm --device 0

3. overlapped inference on large size remote sensing imagery

we follow the similar strategy from top1 solution from iFLYTEK Challenge 2021

step1:clipping the large size imagery

python overlap_infer/cut_patch.py

The parameters patch size and stride can be adjusted according to the extraction result.

step2:infer the cutted images

add the metadata information about the cutted images in dataset/info.py

infer the cutted images

python overlap_infer/overlap_infer.py e2evap_ifly_parcel_test_CGDZ_8_768 --checkpoint /xxxx/ckpt_ifly.pth --with_nms True --eval segm --device 0

step3:merge the cutted results and converted them into shp format.

python overlap_infer/merge2shp.py

It is necessary to specify the inferred JSON path(segm_json), which is different from the original JSON path(poi_json_path). The main parameters for post-processing are: score_thr, nms_mode,NMS_iou_thr Result path: shp_single_path

Training your Model

preparing the edge of gt

python coco2_edge_mask.py

training the model

python train_net.py dla34_e2evap_ifly_parcel --device 2

Find the best number of epoches on the validation set to evaluate your model.

Visualization

visualization of ground truth

python vis_coco_gt.py

visualization of predicted result

python vis_coco_pred.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published