Spaces:
Running
Running
Bugfix in Mapillary processing
Browse files
maploc/data/mapillary/prepare.py
CHANGED
@@ -362,6 +362,7 @@ def process_location(
|
|
362 |
else:
|
363 |
logger.info("Downloading pre-generated map tiles.")
|
364 |
download_file(DATA_URL + f"/tiles/{location}.pkl", tiles_path)
|
|
|
365 |
|
366 |
# Visualize the data split
|
367 |
plotter = GeoPlotter()
|
@@ -370,7 +371,9 @@ def process_location(
|
|
370 |
plotter.points(views_latlon[~is_val], "red", view_ids[~is_val], "train")
|
371 |
plotter.points(views_latlon[is_val], "green", view_ids[is_val], "val")
|
372 |
plotter.bbox(bbox, "blue", "query bounding box")
|
373 |
-
plotter.bbox(
|
|
|
|
|
374 |
geo_viz_path = loc_dir / f"split_{location}.html"
|
375 |
plotter.fig.write_html(geo_viz_path)
|
376 |
logger.info("Wrote split visualization to %s.", geo_viz_path)
|
|
|
362 |
else:
|
363 |
logger.info("Downloading pre-generated map tiles.")
|
364 |
download_file(DATA_URL + f"/tiles/{location}.pkl", tiles_path)
|
365 |
+
tile_manager = TileManager.load(tiles_path)
|
366 |
|
367 |
# Visualize the data split
|
368 |
plotter = GeoPlotter()
|
|
|
371 |
plotter.points(views_latlon[~is_val], "red", view_ids[~is_val], "train")
|
372 |
plotter.points(views_latlon[is_val], "green", view_ids[is_val], "val")
|
373 |
plotter.bbox(bbox, "blue", "query bounding box")
|
374 |
+
plotter.bbox(
|
375 |
+
projection.unproject(tile_manager.bbox), "black", "tiling bounding box"
|
376 |
+
)
|
377 |
geo_viz_path = loc_dir / f"split_{location}.html"
|
378 |
plotter.fig.write_html(geo_viz_path)
|
379 |
logger.info("Wrote split visualization to %s.", geo_viz_path)
|