Giter VIP home page Giter VIP logo

photo-location-finder's Introduction

Photo Location Finder

This Python application detects landmarks, labels, web entities, and other image properties in images using the Google Cloud Vision API. It provides both a command-line interface and a web interface for processing images and retrieving location information.

Features

  • Landmark detection
  • Label detection
  • Web entity detection
  • Image properties analysis (dominant colors)
  • Safe search detection
  • GPS data extraction from EXIF metadata
  • Geolocation using Google Maps API when landmark detection fails
  • Asynchronous processing for improved performance
  • Error handling and retries for API calls
  • Intermediate results saving
  • Web interface for easy image upload and result viewing

Prerequisites

Before running the application, ensure that you have:

  • Python 3.7 or later
  • A valid Google Cloud API key
  • Google Cloud credentials file
  • Google Maps API key

Installation

  1. Clone the repository:

    git clone https://github.com/PierrunoYT/photo-location-finder
    
  2. Navigate to the project directory and install the required packages:

    pip install -r requirements.txt
    
  3. Set up the configuration:

    • Copy config.json.template to config.json
    • Fill in your Google API key, Google Application Credentials file path, and other necessary information in config.json

Usage

Command Line Interface

  1. Ensure your images are in the directory specified in config.json.

  2. Run the script:

    python photolocationfinder.py
    
  3. The script will process the images and generate:

    • A result.json file with the final results
    • intermediate_results_[timestamp].json files for each processed image

Web Interface

  1. Start the web application:

    python web_app.py
    
  2. Open a web browser and go to http://localhost:5000.

  3. Use the interface to upload and process individual images.

Error Handling and Retries

The application uses the tenacity library for error handling and retries. API calls are retried up to 3 times with exponential backoff if they fail.

License

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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

For questions, suggestions, or issues, please open an issue on the GitHub repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.