VIDA-NYU / tile2net

Automated mapping of pedestrian networks from aerial imagery tiles
BSD 3-Clause "New" or "Revised" License
146 stars 22 forks source link

Encountered a shapely error while running the example #62

Closed ruanqizhen closed 3 months ago

ruanqizhen commented 3 months ago
Please enter the output directory:
ou
Tile generation will now begin.
INFO       Using Massachusetts as the source at location=(42.3536483721, -71.0716891532, 42.3555518995, -71.0643742337)
INFO       Using base_tilesize=256 from source
INFO       Stitching 12 tiles...
INFO       96 tiles missing out of 96 total.
           Downloading 96 files...                : 100%|███████████████████████████████████████| 96/96 [00:00<00:00, 38813.69it/s]
           Downloading 96 tiles...                : 100%|██████████████████████████████████████████| 96/96 [00:02<00:00, 43.26it/s]
INFO       All 96 tiles are on disk.
           Stitching 6 tiles...                   : 100%|████████████████████████████████████████████| 6/6 [00:00<00:00, 12.31it/s]
INFO       Dumping to ou/example/tiles/example_256_info.json
INFO       Inferencing. Segmentation results will not be saved.
INFO       Using a single GPU.
INFO       Using Per Image based weighted loss
INFO       Using Cross Entropy Loss
INFO       Loading weights from: checkpoint=/home/qizhen/projects/tile2net/src/tile2net/raster/resources/assets/weights/satellite_2021.pth
INFO       init weights from normal distribution
INFO       loading pretrained model /home/qizhen/projects/tile2net/src/tile2net/raster/resources/assets/weights/hrnetv2_w48_imagenet_pretrained.pth
INFO       Trunk: hrnetv2
INFO       Model params = 72.1M
INFO       Using base_tilesize=256 from source
INFO       Polygons are generated and saved!
INFO       Starting network creation...
100%|████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 3654.57it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:00<00:00, 1368.01it/s]
INFO       ..... creating the processed sidewalk network
/home/qizhen/miniconda3/envs/tile2net/lib/python3.11/site-packages/geopandas/array.py:1459: UserWarning: CRS not set for some of the concatenation inputs. Setting output's CRS as WGS 84 / Pseudo-Mercator (the single non-null crs provided).
  return GeometryArray(data, crs=_get_common_crs(to_concat))
100%|████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:00<00:00, 6885.58it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 14/14 [00:00<00:00, 2681.29it/s]
/home/qizhen/miniconda3/envs/tile2net/lib/python3.11/site-packages/shapely/linear.py:208: RuntimeWarning: invalid value encountered in shortest_line
  return lib.shortest_line(a, b, **kwargs)
0
Mary-h86 commented 3 months ago

Thank you for using Tile2Net.

The messages you observed are warnings, not errors. These are handled in subsequent steps of the processing sequence. The code executed successfully, and the results should be correctly saved in the 'polygon' and 'network' directories. Please check these folders to ensure the results are as expected.

If you have any further questions or need additional support, please don't hesitate to reach out.

ruanqizhen commented 3 months ago

Thank you for using Tile2Net.

The messages you observed are warnings, not errors. These are handled in subsequent steps of the processing sequence. The code executed successfully, and the results should be correctly saved in the 'polygon' and 'network' directories. Please check these folders to ensure the results are as expected.

If you have any further questions or need additional support, please don't hesitate to reach out.

Thank you so much for your help! I noticed that there is also a "segmentation" folder in the output dir, but it is empty, is this expected?

Mary-h86 commented 3 months ago

Yes! That's expected. You can save a portion of your segmentation results in raster format by passing --dump_percent argument to inference, for instance,python -m tile2net inference --dump_percent 10 after you generate your tiles, will save 10% of the results for you in that folder. you can modify example.sh by adding this at the end and see the one image saved as a result.