Lydorn / Polygonization-by-Frame-Field-Learning

This repository contains the code for our fast polygonal building extraction from overhead images pipeline.
BSD 3-Clause "New" or "Revised" License
294 stars 70 forks source link

eval_coco error ValueError: No Shapely geometry can be created from null value #27

Closed qifei123 closed 3 years ago

qifei123 commented 3 years ago

Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/fei.qi/frame_field_learning/frame_field_attention_learning/eval_coco.py", line 156, in compute_contour_metrics fixed_gt_polygons = polygon_utils.fix_polygons(gt_polygons, buffer=0.0001) # Buffer adds vertices but is needed to repair some geometries File "/home/fei.qi/frame_field_learning/frame_field_attention_learning/lydorn_utils/polygon_utils.py", line 1645, in fix_polygons polygons_geom = shapely.ops.unary_union(polygons) # Fix overlapping polygons File "/opt/conda/lib/python3.7/site-packages/shapely/ops.py", line 161, in unary_union return geom_factory(lgeos.methods'unary_union') File "/opt/conda/lib/python3.7/site-packages/shapely/geometry/base.py", line 73, in geom_factory raise ValueError("No Shapely geometry can be created from null value") ValueError: No Shapely geometry can be created from null value