{"id":24555803,"url":"https://github.com/markbakos/geo-guesser","last_synced_at":"2026-04-14T04:02:53.684Z","repository":{"id":272023371,"uuid":"915090174","full_name":"markbakos/geo-guesser","owner":"markbakos","description":"Image location predictor using Deep Learning with CNN Architecture","archived":false,"fork":false,"pushed_at":"2025-02-18T18:46:32.000Z","size":1277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T17:46:28.834Z","etag":null,"topics":["cnn","cnn-model","computer-vision","deep-learning","image-collection","keras","location","neural-network","nextjs","python","react","tensorflow","typescript"],"latest_commit_sha":null,"homepage":"https://locationguesser.vercel.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markbakos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T00:12:42.000Z","updated_at":"2025-02-18T18:46:35.000Z","dependencies_parsed_at":"2025-01-11T14:43:05.561Z","dependency_job_id":"081a6c1e-b57f-497a-b287-38f760c69bb5","html_url":"https://github.com/markbakos/geo-guesser","commit_stats":null,"previous_names":["markbakos/geo-guesser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markbakos/geo-guesser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbakos%2Fgeo-guesser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbakos%2Fgeo-guesser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbakos%2Fgeo-guesser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbakos%2Fgeo-guesser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbakos","download_url":"https://codeload.github.com/markbakos/geo-guesser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbakos%2Fgeo-guesser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","cnn-model","computer-vision","deep-learning","image-collection","keras","location","neural-network","nextjs","python","react","tensorflow","typescript"],"created_at":"2025-01-23T04:32:39.969Z","updated_at":"2026-04-14T04:02:53.669Z","avatar_url":"https://github.com/markbakos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geo Guesser\n\n\u003cimg src=\"https://wakatime.com/badge/user/7a2d5960-3199-4705-8543-83755e2b4d0c/project/c7d384e6-de45-4cc6-b013-bb6fa890bc67.svg\" alt=\"Time spent in project\" title=\"Time spent in project\" /\u003e\n\n## Table of Contents\n\n+ [About](#about)\n+ [Features](#features)\n+ [Requirements](#requirements)\n+ [Installation](#installation)\n+ [Contributing](#contributing)\n+ [Contact](#contact)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThis is a deep learning project that tries to predict where an image was taken. It uses a Convolutional Neural Network to analyze visual features and\ndistinguish between locations based on the unique architectural, environmental and infrastructural elements.\n\nThe project currently focuses on five major capitals (you can set custom cities and locations):\n- **Budapest**\n- **Ottawa**\n- **Tokyo**\n- **Cairo**\n- **Canberra**\n\nThe model performs two key tasks:\n1. **City Classification:** Assigns an image to one of the pre-defined city categories using a softmax-activated output layer.\n2. **Coordinate Regression:** Estimates latitude and longitude values via a linear-activated output layer.\n\nThis project is divided into three main components:\n- **Backend:** A FastAPI server that connects the model with the web interface.\n- **Model:** The EfficientNetV2S-based neural network handling both classification and regression.\n- **Frontend:** A web application built with Next.js, TypeScript and TailwindCSS to easily interact with the model.\n\n\u003cimg src=\"https://github.com/markbakos/geo-guesser/blob/main/images/model.png?raw=true\" alt=\"The model's architecture\"\u003e\n\n## Features \u003ca name = \"features\"\u003e\u003c/a\u003e\n\n**Data Handling:**\n\n- Uses the Mapillary API to collect street-level images and metadata using the Mapillary API.\n- Speeds up data gathering through concurrent API requests.\n- Preprocesses images (resizing to 224x224 pixels) for efficient training.\n\n**Deep Learning Model:**\n\n- Uses the pre-trained EfficientNetV2S network with custom upper layers.\n- Employs fine-tuning where the EfficientNetV2S base is frozen, and only the custom layers are trained with the Adam optimizer.\n- Uses GRAD-CAM to produce heatmaps on request that reveal image regions influencing the model's decisions.\n\n\u003cimg src=\"https://github.com/markbakos/geo-guesser/blob/main/images/heatmap.png?raw=true\" alt=\"Heatmap from the model\"\u003e\n\n**Training and Evaluation:**\n\n- Achieves approximately 83% accuracy in city classification.\n- Saves `best_location_model.keras` as the best validation coordinates accuracy from training.\n- Saves `best_overall_model.keras` as the best overall model based on validation loss from training.\n\n**Frontend UI:**\n- Developed with Next.js, TypeScript and TailwindCSS.\n- Provides an easily usable interface for users to interact with the model.\n- Accessible online at [Location Guesser](https://locationguesser.vercel.app),\n\n## Requirements \u003ca name = \"requirements\"\u003e\u003c/a\u003e\n\n### Prerequisites\n1. **Python 3.10 or higher**: Install from [python.org](https://www.python.org/downloads/).\n2. **pip**: Python package manager (comes with Python installations).\n3. **CUDA Toolkit 12.8** (optional)\n4. **cuDNN 9.7.1** (optional)\n\n### Python Dependencies\n\nInstall the required Python packages from `requirements.txt` found in the root folder.\n\n```\npip install -r requirements.txt\n```\n\n## Installation \u003ca name = \"installation\"\u003e\u003c/a\u003e\n\n1. **Clone the repository**\n```\n https://github.com/markbakos/geo-guesser.git\n cd geo-guesser\n```\n\n2. **Set up environmental variables**\n- In the root folder (geo-guesser), in your .env file:\n```\nMAPILLARY_KEY=[Your API key]\n```\n\n3. **Prepare the dataset**\n\n- Set your desired locations to gather data from, or keep the original 5.\n- Collect images using `mapillary_collection.py`\n\n4. **Using the trained model**\n- **From console**:\n```\npython -m predict path/to/saved/image --generate_heatmap\n```\n\n- **With the UI**:\n  - Use the deployed website: \u003ca target=\"_blank\" href=\"https://locationguesser.vercel.app\"\u003ehttps://locationguesser.vercel.app\u003c/a\u003e\n\u003cbr\u003e\u003cbr\u003e\n- **Start the FastAPI server:**\n```\nuvicorn server:app\n```\n\n## Contributing \u003ca name = \"contributing\"\u003e\u003c/a\u003e\n\nFeel free to fork this repository, make changes, and submit a pull request.\n\n## 📧 Contact \u003ca name = \"contact\"\u003e\u003c/a\u003e\n\nFor any inquiries, feel free to reach out:\n\nEmail: [markbakosss@gmail.com](mailto:markbakosss@gmail.com) \u003cbr\u003e\nGitHub: [markbakos](https://github.com/markbakos)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbakos%2Fgeo-guesser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbakos%2Fgeo-guesser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbakos%2Fgeo-guesser/lists"}