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
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
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},
}
Environment reference:E2EC
- 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
1. download pretrained weight in this link
python test.py dla34_e2evap_ifly_parcel_test --checkpoint /xxxx/ckpt_ifly.pth --eval segm --device 0
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
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 of ground truth
python vis_coco_gt.py
visualization of predicted result
python vis_coco_pred.py