Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I try to search with my own data, I want to take my own data set and organize it in that form #4

Closed
jxhoh opened this issue Apr 8, 2024 · 5 comments

Comments

@jxhoh
Copy link

jxhoh commented Apr 8, 2024

self.database_utms = np.array([(path.split("@")[1], path.split("@")[2]) for path in self.database_paths]).astype(np.float)
self.queries_utms = np.array([(path.split("@")[1], path.split("@")[2]) for path in self.queries_paths]).astype(np.float)
I don't understand these two lines of code

@Lu-Feng
Copy link
Owner

Lu-Feng commented Apr 8, 2024

The dataset preparation follows visual geo-localization benchmark. If you want to use it on your own dataset, you'll need to rewrite the image names in this standard format:
@ UTM_east @ UTM_north @ UTM_zone_number @ UTM_zone_letter @ latitude @ longitude @ pano_id @ tile_num @ heading @ pitch @ roll @ height @ timestamp @ note @ extension
where the only indispensable values are UTM coordinates (UTM_east and UTM_north). The character @ is used as the separator. So we can use path.split("@")[1], path.split("@")[2] to get the UTM coordinates, which are further used to calculate geographical distances.

@Lu-Feng
Copy link
Owner

Lu-Feng commented Apr 8, 2024

If your images are labeled by latitude and longitude, you need to convert it to get UTM coordinates. If they are annotated by frame-level correspondence, you can create pseudo UTM coordinates. For example, you can rewrite the name of the i-th image in the Nordland-test dataset to @i@0@@@@@@@@@@@@@.jpg, and set the evaluation parameter val_positive_dist_threshold to 2 (i.e. the threshold is 2 frames).

@jxhoh
Copy link
Author

jxhoh commented Apr 8, 2024

假如我的数据,没有任何标识,我就是想从一大堆图片中找出 最相似的图像呢,虽然这样听起来不像地理定位,但是有时候更多的场景是盲定位吧

@Lu-Feng
Copy link
Owner

Lu-Feng commented Apr 8, 2024

那估计还是得按这个命名格式改一下图片名字,你可以把原来的名字写到@note那个字段,然后开头的UTM坐标的两个值随便给(我不确定不赋值会不会报错,你也可以试一下留成空的),在计算完predictions之后直接输出结果就行,就不再计算Recall@N指标了

@jxhoh
Copy link
Author

jxhoh commented Apr 8, 2024

对,我试过了,不赋值是报错的,对,任何直接计算pre就行,这样就可以用做盲定位了

@Lu-Feng Lu-Feng closed this as completed Apr 12, 2024
@Lu-Feng Lu-Feng mentioned this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants