Code Monkey home page Code Monkey logo

locate-traffic-lights's Introduction

Locate Traffic Lights

Locate Traffic Lights detects traffic lights and their locations from images using computer vision.

Features

The results is a map with junctions having traffic lights. A list of identified traffic lights in a structured format is also generated.

Main features:

  • Detect traffic lights from images, for example taken by mobile phone.
  • Locate the location based on image's Exif properties
  • Create a map with locations having traffic lights (HTML format)
  • Create a summary of locations with traffic lights and their confidence levels (CSV and JSON formats)

Sample

Sample images are found under samples/images.

An example map and summary from a test run are available in samples/results.

Prerequisites

The following prerequisites apply to images to be analyzed:

  • Location services must be enabled before taking the photos.
  • WiFi must be enabled before taking the photos. Nearby WiFi stations may improve the location accuracy.
  • Images must be placed to a directory.
  • Images must be in JPG or PNG format.

Limitations

The following limitations exist when detecting objects from images:

  • All the GPS features may not be available in all the mobile phone models. For example GPS direction or GPS positioning error included in the image properties are not always present in the image's Exif details.
  • Accuracy of the location depends on several factors such as GPS signal, vicinity of operator's base stations, nearby buildings etc.
  • Images taken without active SIM card will get more inaccurate location.

Installation

Verify the following prerequisites:

The scripts use the following machine learning libraries:

Install required Python packages:

pip3 install -r requirements.txt

Usage

Update directory paths and other settings in config.ini file.

Place the images to be analyzed to the directory specified in config.ini.

Run the following command to analyze the images.

python3 analyze-images.py

The analysis results will be created in the directory as specified in config.ini.

Note! During the first run, loading the computer vision library can take several minutes. The initialization of the library happens only once so subsequent processing will be faster.

Roadmap

Roadmap includes the following items.

  • Identify different types of traffic lights - Identify different types of traffic lights: vehicle vs. tram vs. cyclist vs. arrow traffic lights
  • Blur images to comply to GDPR requirements - All persons and vehicle licence plates detected on the images must be blurred.
  • More accurate image clustering - The same objects might appear on multiple images. Improve the clustering mechanism to remove duplicate images from the results.

Questions and feedback

Feature requests and issues can be provided via the project's issue tracker.

Contributing

Anyone is welcome to contribute to this repository. If you would like to make a change, open a pull request for the repository.

Credits

The scripts were developed by Aavista during UrbanSense 5G Edge pilot. The pilot was part of UrbanSense 5G Innovation Platform from Forum Virium Helsinki.

locate-traffic-lights's People

Contributors

merjakaj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.