8000 GitHub - royalmo/street-view-gan: A Google Street View Generative Adversarial Network (GAN)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

royalmo/street-view-gan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Street View GAN

A Google Street View Generative Adversarial Network (GAN).

gifmaker_me(1)


This repository contains the source code of the final project of the Advanced DL Modes course thaught at EPSEM-UPC in the MSc on ML and Cybersecurity for Internet-Connected Systems (more info).

Made by Eric Roy. Licensed under GPL3.

Disclaimer: One requirement of the project was to finish it in 8 hours of work. This means that this project has a lot of open and easy follow-ups. In other words, it is incomplete.

Overview

This repository contains all the code needed to train and play with a GAN that generates Street-View images. It can be trained to generate generic images or from specific coordinates (e.g. France).

I also include some already trained models to just rush into the test part. The models are trained using Pau Chambaz's Google Street View Dataset.

You will also find the report (pdf) that I submitted for the MSc course, where I wrote all the juicy details.

Install steps

First, get yourself with a copy of the repository. You can download the latest release (link) in order to get the trained models and builded PDF report.

Once inside, the first time only, setup venv and install the required packages. Make sure you have the GPU drivers for Tensorflow (install steps).

python3 -m venv tf
source tf/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

Then, everytime, before running the code, activate the virtual environment.

source tf/bin/activate

Train the models (optional)

If you don't want to use the models I pre-trained for you, perform the following steps to be able to retreive the data, prepare it, train the GAN, and store the model.

python3 src/make_models.py
python3 src/make_models.py --region france --epochs 25
# Assuming models/world_{generator,discriminator}_epoch_5.h5 exists
python3 src/make_models.py --region world --epochs 10 --start-at 5

The models are stored in /models (only every 10 and 25).

Play with a model

Once the model is trained (or downloaded) you can play with it on a CLI-script, so it's easier to run it on a remote server.

python3 src/test_models.py world_generator_epoch_50

This will generate 16 images with seed 42 and store them in /images.

About

A Google Street View Generative Adversarial Network (GAN)

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0