Skip to content

ramanakshay/hierarchical-geoclip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hierarchical GeoCLIP

The project implements GeoCLIP, a CLIP-inspired image geolocation model. Hierarchical GeoCLIP is an improved inference method that leverages hierarchical feature clustering at multiple geographical scales. By organizing the GPS gallery into a tree structure, we drastically reduce the search space and achieve comparable performance while being ~100x more efficient.

Instructions to run

  1. Clone the repository and go to the project folder.
git clone https://github.com/ramanakshay/hierarchical-geoclip
cd hierarchical-geoclip
  1. Install dependencies from requirements file. Make sure to create a virtual environment before running this command.
pip install -r requirements.txt
  1. Download dataset from scripts inside the data folder. Run main.py to train the model
python main.py

Requirements

  • pytorch (An open source deep learning platform)
  • hydra (A framework for configuring complex applications)
  • sklearn (For clustering algorithms)
  • datasets (Hugging Face Datasets)

Folder Structure

├──  model              - this folder contains all code (models, networks) of the agent
│   ├── classifier.py
│   ├── network.py
│   └── layers.py
│
│
├── data                - this folder contains code relevant to the data
│   ├── preprocessing.py         - run this script to download the data   
│   └── dataset.py             - dataset classes

│
│
├── algorithm             - this folder contains different algorithms of your project
│   └── train.py
│
│
├──  config
│    └── config.yaml  - YAML config file for project
│
│
├──  clustering            - this folder contains code for clustering the GPS gallery
│    └── cluster.py        - build JSON file from list of GPS coordinates and pre-trained model
│
│
└── main.py           - entry point of the project

License

This project is licensed under the MIT License. See LICENSE for more details.

About

Hierarchical image geolocation prediction using GeoCLIP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published