Coder Social home page Coder Social logo

lsheiba / gan-image-similarity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcbelmont/gan-image-similarity

1.0 2.0 1.0 1.4 MB

InfoGAN inspired neural network trained on zap50k images (using Tensorflow + tf-slim). Intermediate layers of the discriminator network are used to do image similarity.

License: GNU General Public License v3.0

Python 6.03% Jupyter Notebook 93.97%

gan-image-similarity's Introduction

gan-image-similarity

InfoGAN inspired network trained on images from zap50k. This network is using continuous latent codes + noise as input to the generator. For the image similarity part, I extract the features of last layer before the classification layer of the discriminator for all images and calculate the l2 distances.

Installation

This project is using the following python packages:

tensorflow==0.11.0rc0
scipy==0.18.1

You will also need zap50k dataset:

wget http://vision.cs.utexas.edu/projects/finegrained/utzap50k/ut-zap50k-images.zip

Training

To train the network on all the images: python main.py --logdir=logs/exp1 --batch_size=128 --file_pattern="ut-zap50k-images/*/*/*/*.jpg"

To generate the intermediate features of all the images and calculate similarity for randomly picked images: python main.py --similarity --batch_size=128 --logdir=logs/exp1 --file_pattern="ut-zap50k-images/*/*/*/*.jpg"

To get images from the generator: python main.py --logdir=logs/exp1 --sampledir=samples

Results

For each line, the first image is the seed and the rest are most similar images according to l2 distance of the intermediate features. similarity

Samples from the generator after a coulpe of epochs. similarity

gan-image-similarity's People

Contributors

lsheiba avatar marcbelmont avatar

Stargazers

Mostafa avatar

Watchers

James Cloos avatar  avatar

Forkers

santimto

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.