facebookresearch / OrienterNet

Source Code for Paper "OrienterNet Visual Localization in 2D Public Maps with Neural Matching"
Other
463 stars 48 forks source link

ValueError: Need prior latlon #3

Open ArturFormella opened 1 year ago

ArturFormella commented 1 year ago

Why demo needs exact location in JPG file?

ValueError                                Traceback (most recent call last)

[<ipython-input-3-cf99829e5c30>](https://localhost:8080/#) in <cell line: 20>()
     18 print(f"Using image {image_path} with location prior '{address}'")
     19 
---> 20 image, camera, gravity, proj, bbox, prior_latlon = read_input_image(
     21     image_path,
     22     prior_address=address,

[/content/OrienterNet/maploc/demo.py](https://localhost:8080/#) in read_input_image(image_path, prior_latlon, prior_address, fov, tile_size_meters)
    110             logger.info("Could not find any prior location in EXIF.")
    111     if latlon is None:
--> 112         raise ValueError("Need prior latlon")
    113     latlon = np.array(latlon)
    114 

ValueError: Need prior latlon
sarlinpe commented 1 year ago

OrienterNet needs a coarse location (within ~100-200 meters) to query OpenStreetMap for the right area. This can be inferred automatically from the image EXIF metadata if there is any, but otherwise you need to provide a textual address of the area - for example the name of a building or street or neighborhood. Thanks for reporting this, I will update the documentation.