{"slug": "netryx-find-where-a-street-photo-was-taken-to-the-block-offline", "title": "Netryx – Find where a street photo was taken, to the block, offline", "summary": "Netryx released Astra V2, an open-source geolocation system that matches a single street photo against a database of street-view panoramas to return GPS coordinates accurate to within a few meters, running offline. The V2 pipeline replaces the original nine-stage design with three stages: MegaLoc (CVPR 2025, a DINOv2 ViT-B/14 model producing 8448-dim descriptors PCA-reduced to 1024) retrieves the top 500 candidate locations, MASt3R (ECCV 2024) performs dense 3D matching to confirm the exact spot, and spatial consensus picks the most trustworthy cluster of matches. Netryx says the rebuild drops the earlier CosPlace, DISK, LightGlue, LoFTR and RANSAC stack, improves matching on partial or heavily cropped images, and adds index sharing through a Community Hub on Hugging Face plus offline .netryx bundles.", "body_md": "**State-of-the-art AI geolocation from a single image.**\n\n[The Idea](#the-idea) •\n    [How It Works](#how-it-works) •\n    [Getting Started](#getting-started) •\n    [Community Hub](#community-hub) •\n    [Installation](#installation)\n\nYou have a photograph. Maybe it's a screenshot from a video. Maybe it's a cropped, blurry phone photo someone posted online. Maybe it shows just a storefront, a stretch of road, or the corner of a building. You want to know *exactly* where it was taken.\n\nNetryx Astra V2 answers that question.\n\nIt's an open-source geolocation system that takes a single image and finds the precise GPS coordinates by matching it against a database of street-view panoramas. Upload your photo, and within minutes it tells you the street, the city, the coordinates — down to a few meters.\n\nWhat makes V2 different from the original Netryx (and from other tools out there) is the matching pipeline. We rebuilt everything from the ground up using two models that didn't exist when we started this project:\n\n- \n**MegaLoc** (CVPR 2025) — the most accurate image retrieval model for place recognition, trained across six datasets covering indoor, outdoor, day, night, and seasonal variations. It finds the right neighborhood.\n- \n**MASt3R** (ECCV 2024) — a 3D-aware dense matcher that understands the geometry of scenes, not just pixel patterns. It confirms the exact location, even from partial or heavily cropped photos that would break traditional matchers.\n\nThe result is a three-step pipeline that's both simpler and more accurate than the nine-stage system it replaced.\n\nThe original Netryx used CosPlace for retrieval and a stack of DISK + LightGlue + LoFTR + RANSAC + descriptor hopping + neighborhood expansion for verification. It worked, but it was fragile — lots of heuristics layered on top of each other, each one a workaround for a limitation in the previous stage.\n\nV2 threw all of that away. Here's what replaced what:\n\n|  | V1 (Original) | V2 (Astra) | \n|---|---|---|\n| **Finding candidates** | CosPlace (ResNet-50, 512-dim) | MegaLoc (DINOv2 ViT-B/14, 8448-dim → PCA 1024) | \n| **Confirming matches** | DISK + LightGlue + RANSAC | MASt3R dense 3D matching | \n| **Handling edge cases** | LoFTR fallback, descriptor hopping, neighborhood expansion, Ultra Mode | Spatial consensus — that's it | \n| **Total pipeline stages** | 9+ | 3 | \n| **Partial image matching** | Weak — sparse keypoints fail on small overlaps | Strong — MASt3R finds dense correspondences in tiny regions | \n| **Sharing indexes** | Not possible | Community Hub via Hugging Face + offline `.netryx` bundles | \n\nThe simplification isn't just aesthetic. Fewer stages means fewer places for things to go wrong, faster searches, and code that's actually maintainable.\n\nThe pipeline has three stages. That's not an oversimplification — it's genuinely just three stages.\n\n```\nQuery Image\n     │\n     ▼\n┌─────────────┐\n│   MegaLoc   │  \"Where in the city could this be?\"\n│  Retrieval  │  \n└─────┬───────┘\n      │  Top 500 candidates\n      ▼\n┌─────────────┐\n│   MASt3R    │  \"Is this actually the same place?\"\n│   Matching  │  \n└─────┬───────┘\n      │  Scored candidates\n      ▼\n┌─────────────┐\n│   Spatial   │  \"Which cluster of matches is most trustworthy?\"\n│  Consensus  │  \n└─────┬───────┘\n      │\n      ▼\n  📍 GPS Coordinates\n```\n\nYour query image gets converted into a compact descriptor — a 8448-dimensional vector that captures the visual essence of the scene. This gets PCA-reduced to 1024 dimensions, then compared against every indexed location via dot-product similarity.\n\nWe also extract a descriptor for a slightly zoomed-in center crop and for a horizontally flipped version of the query, then merge the results. This handles cases where the query is at a different zoom level or facing the opposite direction from the indexed view.\n\nThe output is the top 500 candidate locations from the index, ranked by visual similarity.\n\nMegaLoc is from Gabriele Berton's lab (the same group that made CosPlace and EigenPlaces). It's the latest in their line of work, trained on SF-XL, GSV-Cities, MSLS, and landmark retrieval data simultaneously. No other retrieval model consistently beats it across every benchmark — indoor, outdoor, urban, rural, day, night.\n\nFor each of those 500 candidates, we download the corresponding street-view panorama, crop it at the indexed heading angle, and run MASt3R to find dense pixel correspondences between the query and the crop.\n\nThis is where the magic happens for difficult queries. Traditional matchers like SuperPoint + LightGlue extract maybe 500-2000 sparse keypoints and try to match them. If your query image only overlaps 20% with the database image, there might only be 50 co-visible keypoints — not enough for a reliable match.\n\nMASt3R works completely differently. It treats matching as a 3D reconstruction problem, predicting dense point maps and local feature descriptors for every pixel. Even a small overlapping region produces hundreds of reliable correspondences, because it understands the 3D structure of the scene, not just 2D pixel patterns.\n\nOn the Map-free localization benchmark (single reference image, viewpoint changes up to 180°), MASt3R beats previous methods by 30%. That's not an incremental improvement — it's a generational leap.\n\nHere's the problem with just picking the candidate with the highest match score: false positives exist. Two identical chain restaurants 5km apart will both produce high MASt3R scores. A row of Soviet-era apartment blocks all look the same.\n\nSpatial consensus solves this. We divide the search area into ~50-meter grid cells and cluster all the good matches geographically. Each cell gets a score based on the combined evidence from all matches in that cell and its neighbors.\n\nA single outlier with 200 inliers at the wrong location gets outscored by a cluster of 5 matches with 80-150 inliers each at the right location. The winning cluster's best match becomes the final answer.\n\nThis is why accuracy holds up even at larger search radii where there are more look-alike locations.\n\n[We can observe in this picture, there is absolutely nothing to go on, it is just a small cropped part. Conventional OSINT would absolutely fail here. Yet Netryx Astra geolocated it down to its exact coordinates with no metadta whatsoever or clues beforehand running compltely locally.](https://private-user-images.githubusercontent.com/110723606/567640357-c7670e64-aff7-4ee7-b686-165245a4b5b6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI3MzgwNTIsIm5iZiI6MTc5MjczNzc1MiwicGF0aCI6Ii8xMTA3MjM2MDYvNTY3NjQwMzU3LWM3NjcwZTY0LWFmZjctNGVlNy1iNjg2LTE2NTI0NWE0YjViNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMDIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTAyM1QwNjQyMzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lN2Q2NDlmNTU5MjI3ZWI0MDcwMzA3M2FkYmY1MWY5MjQ4NDhhNGU2YzJmN2NlYWVlMWM0MzAwZDA5MzFhMzQyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.p6KEjlmniX5G2hmwn7MKSxuai-1LUc9Mp9G0Eucf1nc)\n\n[A small cropped picture of a building, that's all it took to find it's location in a 1km radius in Moscow.](https://private-user-images.githubusercontent.com/110723606/567644805-33e50df3-8784-4206-a401-666bc92aba07.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI3MzgwNTIsIm5iZiI6MTc5MjczNzc1MiwicGF0aCI6Ii8xMTA3MjM2MDYvNTY3NjQ0ODA1LTMzZTUwZGYzLTg3ODQtNDIwNi1hNDAxLTY2NmJjOTJhYmEwNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMDIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTAyM1QwNjQyMzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYjAwNDI4MGU3OWEwZDNmMmQ5ZjY0MDBmNjVkYjJiMzQzYjkyNmQ0MGM3NDdhNjAwYjk1MTIwYzAzMTI5ZDljJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.QmmrNxsE6VT9k-VGqs0tOsBUB8C6ffjmAvlSmHTW6_M)\n\nThis is the part we're most excited about.\n\nIndexing a city takes hours of compute time. It's wasteful for every user to independently index the same city. So we built a sharing system: one person indexes Moscow, uploads the result, and everyone else downloads it in minutes.\n\nThe fastest way. Someone else already did the indexing work — you just download their pre-built index.\n\nSet mode to **Search**, click **Run Search**, and select your query image. The map coordinates and search radius auto-populate from the index metadata. This feature only works if the community contributes and supports each other, if you index a region, we will all be greatful if you upload it.\n\nIMPORTANT NOTE: if application freezes due to running out of application memory while fitting PCA, use this command in terminal! python3 -c \"from test_super import build_compact_index; build_compact_index()\"\n\nWant to index a city or area that nobody's done yet? The app handles everything — downloading panoramas, extracting descriptors, building the search index.\n\n```\npython test_super.py\n```\n\n1. Set mode to **Create**\n2. Enter the center coordinates (latitude, longitude) and radius in km\n3. Click **Create Index**\n4. Wait. For 1km radius, expect ~20-30 minutes. For 5km, a few hours. For 10km, overnight.\n\nWhat's happening under the hood: the app generates a grid of points within the radius, finds all available panorama locations, downloads each panorama as tiles and stitches them, crops each panorama at multiple heading angles, extracts MegaLoc descriptors for each crop, fits PCA on all descriptors, and builds a compact search index.\n\nGot a `.netryx` file from a friend, a Discord server, or a download link? Just click **📥 Import Index** in the app, select the file, and you're ready to search. No account needed, no internet needed — it's a fully offline workflow.\n\nIndexes are hosted on [Hugging Face Hub](https://huggingface.co/netryx-hub) as public datasets. Anyone can download without an account. Contributing (uploading) requires a free Hugging Face account.\n\n**From the GUI:** Click the **🌐 Community Hub** button to browse, search, and download available indexes. Click **⬆ Upload Current Index** to share yours.\n\nIndex bundles use the `.netryx` format — a ZIP archive containing:\n\n- PCA-reduced MegaLoc descriptors (the actual search vectors)\n- Coordinate metadata (lat/lon/heading/panoid for every entry)\n- The fitted PCA model (needed to transform query descriptors at search time)\n- A manifest with coverage info (center, radius, entry count, creator, etc.)\n\nWhen you export, geographic filtering happens automatically. If your index contains Moscow + Paris + Tokyo but you export \"Moscow 1km\", only the Moscow entries get included. You can slice specific regions from a larger index without any manual work.\n\nDon't want to use Hugging Face? Just export and share the file however you want:\n\n```\n# Export\npython netryx_hub.py export \\\n  --index-dir ./netryx_data/index \\\n  -o moscow_1km.netryx \\\n  --city moscow --radius 1 --lat 55.75 --lon 37.62\n\n# Send the file via Discord, email, Google Drive, whatever\n\n# Other person imports\npython netryx_hub.py import moscow_1km.netryx -o ./netryx_data/index\n```\n\n**Mac / Linux:**\n\n```\ngit clone https://github.com/sparkyniner/Netryx-Astra-V2-Geolocation-Tool.git\ncd Netryx-Astra-V2-Geolocation-Tool\n./setup.sh\n```\n\nThen start Netryx with **`./run.sh`**, or on a Mac just double-click **` Netryx.command`** in the folder.\n\n**Windows:** install [Python 3.12](https://www.python.org/downloads/windows/) and [Git](https://git-scm.com) first, then:\n\n```\ngit clone https://github.com/sparkyniner/Netryx-Astra-V2-Geolocation-Tool.git\ncd Netryx-Astra-V2-Geolocation-Tool\n```\n\nDouble-click **`setup.bat`** to install everything. When it finishes, double-click **` run.bat`** to start Netryx.\n\nThat's it. Setup finds a suitable Python on your computer (3.10–3.12, even if your default is newer), creates a virtual environment, installs the dependencies, downloads MASt3R next to the repo and pre-downloads the model weights. It's safe to run again: finished steps are skipped. If anything is missing, it tells you exactly what to install.\n\nWhen Netryx opens, press **Try the demo** at the top of the sidebar. It downloads a small sample index of central Moscow (about 180 MB, once) and loads a sample photo taken there. Press **Run Search** and watch it find the spot. The guided tour (**Help & tour**) explains every part of the window.\n\n- **Python 3.10, 3.11 or 3.12** with Tk (the python.org installers include it)\n- **macOS** (Apple Silicon via MPS),\n- **Linux** (NVIDIA GPU via CUDA, AMD GPU via ROCM), or\n- **Windows** (NVIDIA GPU via CUDA)\n- **8GB+ RAM** for searching (16GB+ recommended for indexing large areas)\n- **~2GB disk** per city index\n\nMASt3R weights download automatically from Hugging Face on first run.\n\nYour folder structure should look like this:\n\n```\nsome_folder/\n├── Netryx-Astra-V2-Geolocation-Tool/   # This repo\n│   ├── test_super.py\n│   ├── megaloc_utils.py\n│   ├── mast3r_utils.py\n│   ├── netryx_hub.py\n│   └── ...\n└── mast3r/                # Cloned separately\n    ├── mast3r/\n    ├── dust3r/\n    └── ...\n```\n\n`mast3r_utils.py` automatically finds and imports the adjacent `mast3r/` directory at runtime. No path configuration needed.\n\nEverything runs on Apple Silicon out of the box. The code handles MPS quirks automatically — CPU fallback for unimplemented ops, monkey-patching of `.view()` → `.reshape()` for non-contiguous tensors, and MPS cache cleanup during long indexing runs.\n\nIf you have an M1/M2/M3/M4 Mac, it'll use GPU acceleration automatically. No configuration needed.\n\nYou will need to install rocm/pytorch for your specific device manually to the venv after running the install script.\n\nUse TheRock pytorch builds for your device:\n[https://github.com/ROCm/TheRock/blob/main/RELEASES.md#installing-pytorch-python-packages](https://github.com/ROCm/TheRock/blob/main/RELEASES.md#installing-pytorch-python-packages)\n\nTo install for example, for RX7xxx series cards:\n\n```\npip install --index-url https://rocm.nightlies.amd.com/v2/gfx110X-all/ torch torchaudio torchvision\n```\n\nNOTE: ensure the user is part of the render group:\n\n```\nsudo usermod -aG render <userid>\n```\n\nand the base driver is installed:\n[https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html#amd-gpu-driver-installation](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html#amd-gpu-driver-installation)\n\n```\nNetryx-Astra-V2-Geolocation-Tool/\n├── test_super.py          # Main application — GUI, pipeline, everything\n├── megaloc_utils.py       # MegaLoc model loading, descriptor extraction, PCA\n├── megaloc_model.py       # Self-contained MegaLoc architecture (fallback if torch.hub fails)\n├── mast3r_utils.py        # MASt3R loading and dense matching\n├── netryx_hub.py          # Community Hub — upload, download, export, import\n├── README.md\n├── LICENSE\n└── requirements.txt\n\n# Created at runtime (not committed to git):\nnetryx_data/\n├── megaloc_parts/         # Raw 8448-dim descriptor chunks (created during indexing)\n└── index/                 # The compact search index\n    ├── megaloc_descriptors.npy   # PCA-reduced descriptors\n    ├── metadata.npz              # Coordinates, headings, panoid IDs\n    ├── megaloc_pca.pkl           # PCA model for query-time transformation\n    └── manifest.json             # Present if downloaded from Community Hub\n\n# External dependency (cloned separately, NOT inside this repo):\n../mast3r/                 # https://github.com/naver/mast3r\n```\n\nYou can tune these parameters in `test_super.py` if needed. The defaults work well for most use cases.\n\n| Parameter | Default | What it does | \n|---|---|---|\n| `INDEX_TARGET_DIM` | 1024 | PCA output dimension. 512 = smaller index, slightly less accurate. 1024 = good balance. | \n| `MAX_PANOID_WORKERS` | 16 | How many panoramas to download in parallel during indexing | \n| `MAX_DOWNLOAD_WORKERS` | 100 | Concurrent tile download connections (each pano = 8 tiles) | \n| `EARLY_EXIT_INLIER_THRESHOLD` | 450 | If MASt3R finds this many dense matches, stop searching early — it's a confident hit | \n| `MAST3R_STAGE2_TOP_N` | 500 | How many MegaLoc candidates to run through MASt3R | \n\nThe main thing you might want to adjust is `INDEX_TARGET_DIM` — dropping to 512 halves your index size with only ~2-3% accuracy loss.\n\nWe believe in being upfront about what this tool can and can't do.\n\n**It only finds places that are in the index.** If a location hasn't been indexed by you or downloaded from the community, it won't be found. No model, no matter how advanced, can match against data that doesn't exist. The accuracy ceiling is set by coverage, not by the models.\n\n**Repetitive architecture causes false positives.** Chain stores, suburban housing developments, rows of identical apartment blocks — these genuinely look the same from street level. Spatial consensus helps (a cluster of nearby matches beats a single isolated outlier), but it's not bulletproof, especially at large search radii (10km+) where there are more look-alike candidates. This is an unsolved problem in the field, not a limitation specific to Netryx.\n\n**Coverage gaps exist in some areas.** Rural areas, developing countries, newly built neighborhoods, and indoor spaces may have limited or no street-level imagery available for indexing.\n\n**This is not a real-time system.** Running MASt3R on 500 candidates takes several minutes on a consumer GPU. This is designed for forensic analysis — investigative journalism, human rights documentation, OSINT research, insurance fraud investigation — not for navigation or live tracking.\n\n**Indexing requires meaningful compute.** MegaLoc's DINOv2 backbone is ~5x heavier than the CosPlace backbone used in V1. Indexing a 1km radius takes ~20-30 minutes. A full city (10km+) is an overnight job. That's why the Community Hub exists — so this cost is paid once and shared. Also the match with most inliners isnt neccsarily the correct match that's why it returns multiple results which you can cross check yourself.\n\nIf you use Netryx Astra V2 in your research or work, we'd appreciate a citation:\n\n```\n@software{netryx_astra_v2,\n  title={Netryx Astra V2: State-of-the-Art AI Geolocation},\n  author={Sairaj Balaji},\n  year={2026},\n  url={https://github.com/sparkyniner/Netryx-Astra-V2-Geolocation-Tool}\n}\n```\n\nMIT License. See [LICENSE](https://github.com/sparkyniner/Netryx-Astra-V2-Geolocation-Tool/blob/main/LICENSE) for details.\n\nMegaLoc weights are MIT licensed. MASt3R is Apache 2.0 licensed. DINOv2 is Apache 2.0 licensed. Community-shared indexes are CC-BY-4.0.\n\n**Built by [Sairaj Balaji](https://www.linkedin.com/in/sairaj-balaji-7295b2246/)**\n\nAlso built PrismX featured in [Fast Company](https://www.fastcompany.com/91340556/this-ai-scans-reddit-for-extremist-terms-and-plots-bot-led-intervention) · [404 Media](https://www.fastcompany.com/91340556/this-ai-scans-reddit-for-extremist-terms-and-plots-bot-led-intervention) · [Deutsche Welle](https://youtube.com/shorts/cU6_T7Qi6hM?si=Q8rkKqwDYfamBmKK)", "url": "https://wpnews.pro/news/netryx-find-where-a-street-photo-was-taken-to-the-block-offline", "canonical_source": "https://github.com/sparkyniner/Netryx-Astra-V2-Geolocation-Tool", "published_at": "2026-10-23 06:36:43+00:00", "updated_at": "2026-10-23 06:42:36.146302+00:00", "lang": "en", "topics": ["computer-vision", "artificial-intelligence", "ai-tools", "ai-research"], "entities": ["Netryx", "Netryx Astra V2", "MegaLoc", "MASt3R", "CosPlace", "Hugging Face", "Gabriele Berton"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/netryx-find-where-a-street-photo-was-taken-to-the-block-offline", "markdown": "https://wpnews.pro/news/netryx-find-where-a-street-photo-was-taken-to-the-block-offline.md", "text": "https://wpnews.pro/news/netryx-find-where-a-street-photo-was-taken-to-the-block-offline.txt", "jsonld": "https://wpnews.pro/news/netryx-find-where-a-street-photo-was-taken-to-the-block-offline.jsonld"}}