How mohanmanideep/geomatch works
GeoMatch predicts a photo’s latitude/longitude by retrieving the closest match from a bank of labelled training images. Its main workflow transforms an image into three views, encodes global and local visual features, searches a descriptor bank, reranks a shortlist, and returns the best match’s coordinates. Training is a separate two-stage workflow: BYOL backbone pretraining followed by country-aware retrieval fine-tuning. The graph preserves the documented teacher-cache and fold-training capabilities; source excerpts are partial, so some implementation-level connections are omitted.
Main entry points: country_aware_retrieval_finetune.py Country-aware fine-tuning · retrieval_model.py Retrieval heads · teacher_cache Teacher targets · full_data_finetune.py All-data fine-tuning
Components 20
Data and views
- Input photo
- Three-view transform
src/data.py - Training image bank
artifacts/fold_assignments
Visual retrieval
- RegNet encoder
src/model.py - Retrieval heads
src/retrieval_model.py - Search and geo utilities
src/retrieval_common.py - Retrieval losses
src/retrieval_objective.py - Geographic scoring
src/scoring.py
Model training
- BYOL pretraining
src/ssl_pretrain_backbone.py - Fold backbones
artifacts/ssl_backbone - Teacher cache builder
src/build_teacher_cache.py - Teacher targets
artifacts/teacher_cache - Spatial retrieval trainer
src/spatial_retrieval_finetune.py - Country-aware fine-tuning
src/country_aware_retrieval_finetune.py - All-data fine-tuning
src/full_data_finetune.py - Joint geo objective
src/joint_objective.py - EMA and checkpoints
src/training.py
Prediction
- Holdout prediction
src/predict_holdout.py - Coordinate prediction
predictions.csv
Other components
- Photo submitter
Connections 22
- Photo submitter → Input photo: submits
README.md - Input photo → Three-view transform: transformed into views
README.md - Three-view transform → Retrieval heads: encodes views
README.md - RegNet encoder → Retrieval heads: extended by
src/retrieval_model.py - Retrieval heads → Search and geo utilities: produces descriptors for search
README.md - Training image bank → Search and geo utilities: supplies candidate bank
README.md - Search and geo utilities → Geographic scoring: ranks candidates geographically
README.md - Geographic scoring → Holdout prediction: provides best-match coordinate
README.md - Photo submitter → Holdout prediction: requests holdout prediction
README.md - Holdout prediction → Coordinate prediction: writes predictions
README.md - BYOL pretraining → RegNet encoder: pretrains backbone
README.md - BYOL pretraining → Fold backbones: saves fold weights
README.md - Fold backbones → Country-aware fine-tuning: initializes encoder
README.md - Country-aware fine-tuning → Spatial retrieval trainer: uses training components
src/country_aware_retrieval_finetune.py - Country-aware fine-tuning → Retrieval losses: optimizes retrieval losses
README.md - Country-aware fine-tuning → Joint geo objective: uses spatial losses
src/country_aware_retrieval_finetune.py - Teacher cache builder → Teacher targets: builds cached targets
README.md - Teacher targets → Country-aware fine-tuning: provides distillation targets
README.md - Teacher targets → All-data fine-tuning: provides training targets
src/full_data_finetune.py - All-data fine-tuning → Retrieval heads: fine-tunes final model
README.md - Country-aware fine-tuning → EMA and checkpoints: uses EMA and checkpoint utilities
src/country_aware_retrieval_finetune.py - All-data fine-tuning → EMA and checkpoints: uses training utilities
src/full_data_finetune.py