Git Product home page Git Product logo

deepmaps's Introduction

DeepMaps browser preview

DeepMaps

Browse online maps as if they were hand-drawn in the 16th century!

DeepMaps screenshot

Or train a machine learning CycleGAN model on your own dataset and restyle OpenStreetMap to anything!

What is this?

This is an interactive experience that allows you to browse OpenStreetMap rendered in an alternative style, on-demand by a neural network. The project is composed of 3 main parts:

  • A PyTorch CycleGAN machine learning model
  • A local server that wraps around this model to convert given images and send the generated images back...
  • ...to a Firefox extension that injects the generated tiles in openstreetmap.org.

Demo

Here : https://twitter.com/genekogan/status/1048239707124125699

How to

Install

Clone this repository and follow the instructions by the CycleGAN teams. Additionally, you'll have to side-load the Firefox extension in extensions/maps-replacer.

Get a dataset

Only required if you want to train your own model.

Download my dataset here: Download dataset

Or create your own following the guidelines by the CycleGAN team. I have some additional tips in Preparing datasets.

Train

Download my pre-trained model here: Download model

Or train your own like you would normally with train.py according to the instructions by the CycleGAN team.

Run

Once you've cd server/, you can launch the server+model with:

python servemaps.py --dataroot ./datasets/oldstylemaps --name oldstylemaps_cyclegan

The options available are the same as the one described for the original CycleGAN code for test.py. You can see them all in server/options/. The images will be served from http://localhost:8080.

Enable the extension in Firefox and open openstreetmap.org!

FAQ

Browser compatibility?

Only Firefox is supported, because Chrome doesn't allow to tamper with the content of network requests.

Google Maps support?

Google Maps has a lot of protections, optimizations and features that make it harder to alter their rendered style, so I didn't insist on trying to make it work on their website.

Is it possible to run it on the CPU, without NVidia, CUDA, etc.?

Yes, but it will be even slower. Just pass --gpu_ids -1 when running servemaps.py.

deepmaps's People

Contributors

junyanz avatar taesungp avatar nathanvogel avatar ssnl avatar naruto-sasuke avatar lambdawill avatar iver56 avatar levirve avatar jpmerc avatar andyli avatar alanyee avatar guopzhao avatar layumi avatar tylercarberry avatar tariqahassan avatar simontreu avatar ruotianluo avatar strob avatar phillipi avatar gdlg avatar mengcz13 avatar pertence avatar andersasa avatar

Watchers

James Cloos 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.