OpenStreetView-5M の公式 PyTorch 実装: グローバルな視覚的地理位置情報への多くの道。
最初の著者: Guillaume Astruc、Nicolas Dufour、Ioannis Siglidis
二人目の著者: Constantin Aronssohn、Nacim Bouia、Stephanie Fu、Romain Loiseau、Van Nguyen Nguyen、Charles Raude、Elliot Vincent、Lintao XU、Hongyu Zhou
最終著者:ロイック・ランドリュー
研究機関:イマジン、 LIGM、エコール デ ポン、ギュスターヴ エッフェル大学、CNRS、マルヌ ラ ヴァレ、フランス
OpenStreetView-5M は、ストリートビュー画像の大規模なオープン地理位置情報ベンチマークです。
ベンチマークの難易度を把握するには、デモをプレイしてください。
当社のデータセットは広範なベンチマークで使用され、そのベンチマークの中で最良のモデルが提供されています。
詳細と結果については、論文とプロジェクトのページをご覧ください。
OpenStreetView-5M は、huggingface/datasets/osv5m/osv5m でホストされています。ダウンロードして解凍するには、次のコマンドを実行します。
python scripts/download-dataset.py
データセットをインポートするさまざまな方法については、DATASET.md を参照してください。
OSV-5M の最高のモデルは、huggingface にも掲載されています。
from PIL import Image
from models . huggingface import Geolocalizer
geolocalizer = Geolocalizer . from_pretrained ( 'osv5m/baseline' )
img = Image . open ( '.media/examples/img1.jpeg' )
x = geolocalizer . transform ( img ). unsqueeze ( 0 ) # transform the image using our dedicated transformer
gps = geolocalizer ( x ) # B, 2 (lat, lon - tensor in rad)
ハグフェイスのモデルの結果を再現するには、次を実行します。
python evaluation.py exp=eval_best_model dataset.global_batch_size=1024
論文のすべての実験を再現するために、
scripts/experiments
で専用のスクリプトを提供します。
conda 環境をインストールするには、次を実行します。
conda env create -f environment.yaml
conda activate osv5m
ほとんどのメソッドを実行するには、まず QuadTree を事前計算する必要があります (約 10 分)。
python scripts/preprocessing/preprocess.py data_dir=datasets do_split=1000 # You will need to run this code with other splitting/depth arguments if you want to use different quadtree arguments
configs/exp フォルダーを使用して、必要な実験を選択します。ぜひ探索してみてください。論文で評価されたすべてのモデルには専用の構成ファイルがあります
# Using more workers in the dataloader
computer.num_workers=20
# Change number of devices available
computer.devices=1
# Change batch_size distributed to all devices
dataset.global_batch_size=2
# Changing mode train or eval, default is train
mode=eval
# All these parameters and more can be changed from the config file!
# train best model
python train.py exp=best_model computer.devices=1 computer.num_workers=16 dataset.global_batch_size=2
@article { osv5m ,
title = { {OpenStreetView-5M}: {T}he Many Roads to Global Visual Geolocation } ,
author = { Astruc, Guillaume and Dufour, Nicolas and Siglidis, Ioannis
and Aronssohn, Constantin and Bouia, Nacim and Fu, Stephanie and Loiseau, Romain
and Nguyen, Van Nguyen and Raude, Charles and Vincent, Elliot and Xu, Lintao
and Zhou, Hongyu and Landrieu, Loic } ,
journal = { CVPR } ,
year = { 2024 } ,
}