sarlinpe commited on
Commit
442a6cc
·
1 Parent(s): 213aff4

Bugfix in Mapillary processing

Browse files
Files changed (1) hide show
  1. maploc/data/mapillary/prepare.py +4 -1
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(projection.unproject(bbox_tiling), "black", "tiling bounding box")
 
 
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)