• Stars
    star
    191
  • Rank 202,877 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OSMDeepOD - OpenStreetMap (OSM) and Machine Learning (Deep Learning) based Object Detection from Aerial Imagery (Formerly also known as "OSM-Crosswalk-Detection").

MIT License Codacy Badge Build Status Stories in Ready

OSMDeepOD - OSM and Deep Learning based Object Detection from Aerial Imagery

OSMDeepOD is a project about object detection from aerial imagery using open data from OpenStreetMap (OSM). The project uses the open source software library TensorFlow, with a retrained Inception V3 neuronal network.

This work started as part of a semester thesis autumn 2015 at Geometa Lab, University of Applied Sciences Rapperswil (HSR). See Twitter hashtag #OSMDeepOD for news.

Material and Publications

Overview

Detection-Example1

Process

Detection-Example1

Getting Started

The simplest way to use the detection process is to clone the repository and build/start the docker container.

git clone https://github.com/geometalab/OSMDeepOD.git
cd OSMDeepOD/docker/
sudo docker build . -t osmdeepod
sudo docker run -it --name osmdeepod -v ./:/objects osmdeepod bash

After the previous shell commands you have started a standalone instance of OSMDeepOD and you are connected to it. If you have a nvida GPU and nvidia-docker installed, you could use the "nvidia-docker" command to run the container for automatically usage of the GPU1.

To start the detection process use the src/role/main.py2 script.

  1. Use the manger option to select the detection area and start the detection with the --standalone parameter.
python3 main.py --config ./config.ini --standalone manager 9.345101 47.090794 9.355947 47.097288

After the detection process has finished a "detected_nodes.json" file will appear with the results. If you like to use OSMDeepOD in a more parallel and distributed way have a look at the https://github.com/geometalab/OSMDeepOD-Visualize repository. There you have got the ability to use redis as a message queue and you can run many OSMDeepOD instances as workers.

Configuration

The configuration works with an INI file. The file looks like the following:

[DETECTION]
Network = /path/to/the/trained/convnet
Labels = /path/to/the/label/file/of/the/convnet
Barrier = 0.99
Word = crosswalk
Key = highway
Value = crossing
ZoomLevel = 19
Compare = yes
Orthofoto = other
FollowStreets = yes
StepWidth = 0.66

[REDIS]
Server = 127.0.0.1
Port = 40001
Password = crosswalks

[JOB]
BboxSize = 2000
Timeout = 5400

Some hints to the config file:

  • "Word" is the key value of the labels file
  • "Key" and "Value" builds the search Tag for OSM
  • "Compare" means compared to OSM tagged Nodes
  • "StepWidth" regulates the distance between the cut out images
  • The section REDIS should be self explanatory, this is not necessary in the standalone mode
  • "BboxSize" is the size in meters of the split large Bbox
  • "Timeout" after the expired time the job does fail

Own Orthofotos

To use your own Orthofotos you have to do the following steps:

  1. Add a new directory to src/data/orthofoto
  2. Add a new module to the directory with the name: <your_new_directory>_api.py
  3. Create a class in the module with the name: <Your_new_directory>Api (First letter needs to be uppercase)
  4. Implement the function def get_image(self, bbox): and returns a pillow image of the bbox
  5. After that you can use your api with the parameter --orthofots <your_new_directory>

If you have problems with the implementation have a look at the wms or other example.

Dataset

During this work, we have collected our own dataset with swiss crosswalks and non-crosswalks. The pictures have a size of 50x50 pixels and are available by request.

Crosswalk Examples

Picture 3: Crosswalk Examples

No-Crosswalk Examples

Picture 4: No Crosswalk Examples

Prerequisites

  • Python

    At the moment, we support python 3.5

  • Docker

    In order to use volumes, I recommend using docker >= 1.9.x

  • Bounding Box of area to analyze

    To start the extraction of crosswalks within a given area, the bounding box of this area is required as arguments for the manager. To get the bounding box the desired area, you can use https://www.openstreetmap.org/export to select the area and copy paste the corresponding coordinates. Use the values in the following order when used as positional arguments to manager: left bottom right top

Links

Notes

  • 1: The crosswalk_detection container is based on the nvidia/cuda:7.5-cudnn4-devel-ubuntu14.04 image, may you have to change the base image for your GPU.
  • 2: For more information about the main.py use the -h option.

Keywords

Big Data; Data Science; Data Engineering; Machine Learning; Artificial Intelligence; Neuronal Nets; Imagery; Volunteered Geographic Information; Crowdsourcing; Geographic Information Systems; Infrastructure; Parallel Programming.

More Repositories

1

Vector-Tiles-Reader-QGIS-Plugin

Vector Tiles Reader QGIS-Plugin - QGIS Python plugin which reads Mapbox Vector Tiles from a server, a local MBTiles file or a directory
Python
148
star
2

pyGeoTile

Python package to handle tiles and points of different projections, in particular WGS 84 (Latitude, Longitude), Spherical Mercator (Meters), Pixel Pyramid and Tiles (TMS, Google, QuadTree)
Python
99
star
3

geojson2vt

Converts GeoJSON to vector tiles ✂️ 🌎
Python
43
star
4

GeoPythonConf2018-QGIS-Processing-Workshop

This is the repo for the Workshop on "QGIS Processing Framework: Automating Tasks with Python" at GeoPython 2018
Python
33
star
5

ArcGISConnector-QGIS-Plugin

"ArcGIS REST API Connector" (beta) - a QGIS-Plugin which reads "Feature Service" and "Map Service" - aka WFS- and WMTS-alike services - from ArcGIS Online or ArcGIS Server.
Python
27
star
6

osmaxx

OpenStreetMap Arbitrary Excerpt Export - Get the OpenStreetMap data you want in the file format you need
Jinja
26
star
7

aoi-osm

Areas-of-Interest (AOI) for and with OpenStreetMap.
Jupyter Notebook
24
star
8

OSMTagFinder

Web search engine for OpenStreetMap tags similar to taginfo but simpler.
Python
22
star
9

Vector-Tiles-Reader-QGIS-Plugin_2016

QGIS Python plugin which reads Mapbox vector tiles from a local MBTiles file (Note: Abandoned repo; goto repo Vector-Tiles-Reader-QGIS-Plugin)
Python
18
star
10

Trending-Places-in-OpenStreetMap

Trending Places in OpenStreetMap!
Python
11
star
11

OSMDeepOD-Visualize

A visualization of the found points from the OSMDeepOD detection process.
HTML
7
star
12

geoconverter

Free Online Tool for Conversion of (Vector) Geodata Formats.
Python
7
star
13

retrieve-height-service

Retrieve of Height and Highest Elevation
Python
6
star
14

PhotoUploadApp

Mobile App for uploading Images to Wikimedia Commons. (Future functionality may include different supported media types and different file destinations).
Dart
6
star
15

awesome-apis-for-crowdsourced-data

List of application programming interfaces (APIs) to access crowdsourced data projects with a common open data license, like OpenStreetMap, Wikimedia, Wikipedia or Commons.
4
star
16

OSMstream

Dockerized Kafka pub-sub service which collects the Augmented diffs from OpenStreetMap and publishes them in JSON format.
Python
4
star
17

jGeoTile

Java package to handle tiles and points of different projections, in particular WGS 84 (Latitude, Longitude), Spherical Mercator (Meters), Pixel Pyramid and Tiles (TMS, Google, QuadTree).
Java
4
star
18

GhostAR

Fange die Geister / Catch the ghosts: Experimental augmented reality game for Android mobiles based on Vuforia
C#
4
star
19

Editable-GeoCSV-QGIS-Plugin

Load, edit and save GeoCSV files in order to integrate with programs like LibreOffice/Excel or Kettle. A QGIS plugin (Python) by Geometa Lab. See also GeoCSV spec. (= CSV + WKT).
Python
3
star
20

djangocms-interactiveimage

Interactive Image Plugin for DjangoCMS
Python
2
star
21

docker-gdal-with-FileGDB

GDAL with FileGDB write-support
HTML
2
star
22

MSE-Database-Seminar-GPU-Databases

MSE-Database-Seminar-GPU-Databases
Shell
2
star
23

osmaxx-symbology

Map symbology for OpenStreetMap GIS exports from OSMaxx
Python
2
star
24

OpenStreetMap-Webmap-Examples

Creating and programming of web maps and web apps with OpenStreetMap data and services.
Jupyter Notebook
2
star
25

uep-kt-zh

A clean basemap style to replicate the "Vektor-Übersichtsplan des Kantons Zürich" with OpenStreetMap data. The style uses Mapbox GL JS and is based on the vector tile schema of OpenMapTiles.
2
star
26

fog_app.webapp

Hochnebelkarte Schweiz
JavaScript
1
star
27

QgisStyleKtZH

A QGIS Style, that was recreated from the ground map of Canton Zürich, using OSM data.
1
star
28

Zebrastreifen-Safari

Zebrastreifen-Safari
Java
1
star
29

osmaxx-deploy

Deployment scripts for OSMaxx
Python
1
star
30

Quiz-QGIS-Plugin

A general purpose quizzing plugin for QGIS (Python) which can read GIFT text format
Python
1
star
31

docker-continuous-osm2pgsql

OWD - OSM World Database. Create and maintain a is database with updated world data from OSM.
Shell
1
star
32

megageogame

MegaGeoGame is part of GEOSchool Day. It's a game consisting of outdoor and indoor activities based on mobile phones. See also https://github.com/geometalab/geosummit
HTML
1
star
33

qgis-raster-cutter

Raster Cutter is a QGIS Plugin developed in Python and QT. It allows the user to select a raster layer from his project, set an extent and export the raster data within this extent to a .jpg or .png image file.
Python
1
star
34

Geocoder-Benchmark

Benchmarking some known Geocoder APIs.
Python
1
star
35

geoschoolday

Tages-Event für Schulklassen der Sekundarstufe I+II, der spielerisch in die Welt von GIS einführt. Realisiert von Esri Education Schweiz und vom Geometa Lab der HSR Hochschule für Technik Rapperswil.
HTML
1
star
36

Fiona-Converter-Examples

Programming Fiona in Python to convert geospatial file formats, like Shapefile to GeoPackage.
Python
1
star
37

MSE-Database-Seminar-Triple-Stores

Repository for the MSE Seminar Data Base Systems Spring 17 on Triple Stores
Java
1
star
38

Swiss_PGDay

Responsive static website for info panels and mobiles 2016. See also the official main homepage at http://www.pgday.ch/
HTML
1
star
39

docker-osmboundaries

provides a database with the worldly polygons of water, land and coastlines from osmdata.
Shell
1
star
40

docker-postgis-with-pgtap

postgis enabled docker image with pgtab for sql unit testing
Shell
1
star
41

geosummit

GEOSummit 2016 Timetable
HTML
1
star
42

docker-pandoc

pandoc docker image with latex support for pdf generation
Python
1
star