SkillAgentSearch skills...

GeoEstimation

This repository contains all necessary meta information, results and source files to reproduce the results in the publication Eric Müller-Budack, Kader Pustu-Iren, Ralph Ewerth: "Geolocation Estimation of Photos using a Hierarchical Model and Scene Classification", In: European Conference on Computer Vision (ECCV), Munich, 2018.

Install / Use

/learn @TIBHannover/GeoEstimation
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center">

Geolocation Estimation of Photos using a Hierarchical Model and Scene Classification

Conference

</div>

This is the official GitHub page for the paper (Link):

Eric Müller-Budack, Kader Pustu-Iren, Ralph Ewerth: "Geolocation Estimation of Photos using a Hierarchical Model and Scene Classification". In: European Conference on Computer Vision (ECCV), Munich, Springer, 2018, 575-592.

Important Notice ⚠️

The source code and trained models previously hosted in this repository have been removed.

This decision was made after careful consideration of the ethical and societal risks associated with image geolocalization technologies, particularly their potential for misuse. In recent years, we observed that our publicly accessible demo https://labs.tib.eu/geoestimation was used in ways that were not aligned with the intended research and educational purposes. As an initial mitigation step, we disabled the analysis of user‑uploaded images. After further reflection, we concluded that withdrawing the implementation entirely is the most responsible course of action.

Our decision is informed by and aligned with concerns raised in recent literature, notably:

Haas, L., Skreta, M., Alberti, S., & Finn, C. (2024).
PIGEON: Predicting Image Geolocations.
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
https://arxiv.org/abs/2307.05845

As discussed by Haas et al., image geolocalization constitutes a dual‑use technology. While such systems enable beneficial applications—including geographic analysis, education, journalism, environmental monitoring, and autonomous navigation—they also pose privacy, surveillance, and military‑use risks, particularly as predictive accuracy improves. These risks warrant careful scrutiny and proactive mitigation by the research community.

In light of these considerations, we have chosen to:

  • Remove all source code and model weights from this repository and its entire commit history
  • Retain the repository solely for documentation and transparency
  • Refrain from further public release of the implementation

We encourage researchers and practitioners to continue engaging in responsible AI development, including explicit discussion of downstream impacts and appropriate safeguards for dual‑use technologies.


Status: This repository is maintained for documentation purposes only.
No executable code or trained models are available.

News

15th December 2025: We decided to delete our models due to ethical concerns that were also pointed out by:

Haas, L., Skreta, M., Alberti, S., & Finn, C. (2024). Pigeon: Predicting image geolocations. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 12893-12902). https://arxiv.org/pdf/2307.05845

12th December 2020 - PyTorch version: We release a PyTorch implementation and provide weights of a pre-trained base(M, f*) model with underlying ResNet50 architecture.

17th February 2020 - original_tf branch: Since our code is not compatible with TensorFlow 2 and relies on a Caffe model for scene classification, we have added a Dockerfile to simplify the installation. In addition, we have modified the inference script. It is now able to automatically generate the reported results in the paper for the testing datasets.

Contents

  • Web Demo
  • Reproduce Paper Results: A seperate branch (original_tf() where all information and pre-trained models are provided to reproduce the original results of the paper.
  • PyTorch Implementation: A re-implemented version of the base(M, f*) model in PyTorch including code for training, validation, testing, and inference.
  • Citation
  • License

Demo

A graphical demonstration where you can compete against the deep learning approach presented in the publication can be found on: https://labs.tib.eu/geoestimation

This demo additionally supports uploading and analyzing your own images. A simplified offline version is located in this repository: https://tibhannover.github.io/GeoEstimation/

Reproduce Paper Results

We provide the original TensorFlow 1.14 implementation based on a ResNet101 to reproduce the results reported in the paper in the original_tf branch.

PyTorch Implementation

We have updated our code in PyTorch including scripts for training, inference and test. We have retrained the base(M, f*) model using a ResNet50 architecture and it achieved comparable results despite its lower complexity.

Contents

Inference

To use the pre-trained model by default, first download the model checkpoint by running:

mkdir -p models/base_M
wget https://github.com/TIBHannover/GeoEstimation/releases/download/pytorch/epoch.014-val_loss.18.4833.ckpt -O models/base_M/epoch=014-val_loss=18.4833.ckpt
wget https://github.com/TIBHannover/GeoEstimation/releases/download/pytorch/hparams.yaml -O models/base_M/hparams.yaml

Inference with pre-trained model:

python -m classification.inference --image_dir resources/images/im2gps/

Available argparse parameter:

--checkpoint CHECKPOINT
    Checkpoint to already trained model (*.ckpt)
--hparams HPARAMS     
    Path to hparams file (*.yaml) generated during training
--image_dir IMAGE_DIR
    Folder containing images. Supported file extensions: (*.jpg, *.jpeg, *.png)
--gpu                 
    Use GPU for inference if CUDA is available, default to true
--batch_size BATCH_SIZE
--num_workers NUM_WORKERS
    Number of workers for image loading and pre-processing

Example output that is also stored in a CSV file:

img_id                                             p_key      pred_class  pred_lat   pred_lng 
Tokyo_00070_439717934_3d0fd200f1_180_97324495@N00  hierarchy  5367        41.4902    -81.7032
429881745_35a951f032_187_37718182@N00              hierarchy  8009        37.1770    -3.5877
104123223_7410c654ba_19_19355699@N00               hierarchy  7284        32.7337    -117.1520

Reproduce Results

Test on Already Trained Model

The (list of) image files for testing can be found on the following links:

  • Im2GPS: http://graphics.cs.cmu.edu/projects/im2gps/ (can be downloaded automatically)
  • Im2GPS3k: https://github.com/lugiavn/revisiting-im2gps/

Download and extract the two testsets (Im2GPS, Im2GPS3k) in resources/images/<dataset_name> and run the evaluation script with the provided meta data, i.e., the ground-truth coordinate for each image. When using the default paramters, make sure that the pre-trained model is available.

# download im2gps testset
mkdir resources/images/im2gps
wget http://graphics.cs.cmu.edu/projects/im2gps/gps_query_imgs.zip -O resources/images/im2gps.zip
unzip resources/images/im2gps.zip -d resources/images/im2gps/

wget https://raw.githubusercontent.com/TIBHannover/GeoEstimation/original_tf/meta/im2gps_places365.csv -O resources/images/im2gps_places365.csv
wget https://raw.githubusercontent.com/TIBHannover/GeoEstimation/original_tf/meta/im2gps3k_places365.csv -O resources/images/im2gps3k_places365.csv
python -m classification.test

Available argparse paramters:

--checkpoint CHECKPOINT
    Checkpoint to already trained model (*.ckpt)
--hparams HPARAMS     
    Path to hparams file (*.yaml) generated during training
--image_dirs IMAGE_DIRS [IMAGE_DIRS ...]
    Whitespace separated list of image folders to evaluate
--meta_files META_FILES [META_FILES ...]
    Whitespace separated list of respective meta data (ground-truth GPS positions). Required columns: IMG_ID,LAT,LON
--gpu
    Use GPU for inference if CUDA is available, default to True
--precision PRECISION
    Full precision (32), half precision (16)
--batch_size BATCH_SIZE
--num_workers NUM_WORKERS
    Number of workers for image loading and pre-processing

Results on the Im2GPS and Im2GPS3k test sets: The reported accuracies (in percentage) is the fraction of images localized within the given radius (in km) using the GCD distance. Note, that we used the full MP-16 training dataset and all 25600 images for validation, thus the results will differ when not all images are available.

Im2GPS: Model | 1 | 25 | 200 | 750 | 2500 | |:---------------|-----:|-----:|------:|------:|-------: | base(M, c) | 9.3 | 31.6 | 49.8 | 67.1 | 78.9 | | base(M, m) | 13.9 | 34.6 | 48.1 | 68.4 | 79.3 | | base(M, f) | 15.6 | 39.2 | 48.9 | 65.8 | 78.5 | | base(M, f*) | 14.8 | 37.6 | 48.9 | 68.4 | 78.9 | | base(M, f*) (original) | 15.2 | 40.9 | 51.5 | 65.4 | 78.5 |

Im2GPS3k:

| Model | 1 | 25 | 200 | 750 | 2500 | |:---------------|-----:|-----:|------:|------:|-------: | base(M, c) | 6.2 | 24.3 | 36.3 | 51.7 | 67.0 | | base(M, m) | 8.3 | 26.2 | 35.7 | 51.4 | 66.5 | | base(M, f) | 9.9 | 27.3 | 36.2 | 51.2 | 66.4 | | base(M, f*) | 10.1 | 28.0 | 36.9 | 51.1 | 67.0 | | base(M, f*) (original) | 9.7 | 27.0 | 35.6 | 49.2 | 66.0 | | ISN(M, f*, S3) (original) | 10.5 | 28.0 | 36.6 | 49.7 | 66.0 |

Training from Scra

Related Skills

View on GitHub
GitHub Stars156
CategoryEducation
Updated2mo ago
Forks38

Security Score

85/100

Audited on Jan 19, 2026

No findings