LukasHaas / PIGEON

Code for the CVPR 2024 paper highlight and demo "PIGEON: Predicting Image Geolocations".
https://lukashaas.github.io/PIGEON-CVPR24/
Other
112 stars 10 forks source link

KeyError when run evaluate #5

Open yingjun-zhang opened 4 months ago

yingjun-zhang commented 4 months ago

Hello, amazing job, I trained on my own data and want to run an evaluate, but an error occurs when loading geocells:

lla_coords = torch.tensor(geo_df[['lng', 'lat']].values) KeyError: "None of [Index(['lng', 'lat' ], dtype='object')] are in the [columns]"

I guess it is because the geocell generated by my run has only 6 columns: name, admin_1, country, size, num_polygons, geometry, I made my geocells.csv using dataset_creation/geocell/geocell_creation.py So what might have gone wrong?

Chris1nexus commented 3 months ago

you can see why in the cell_collection.py file: it only selects the GEOCELL_COLUMNS = ['name', 'admin_1', 'country', 'size', 'num_polygons', 'geometry'] hence you're missing the lat lon coordinates. Still, you can get them from the geometry object

uloma07 commented 2 months ago

Hi @Chris1nexus, I have the same problem with my geocells only having the same 6 columns. Can you please explain how I can get the lat lon? I'm not very familiar with this field.