Git Product home page Git Product logo

cross-modal-bridge's Introduction

X-Bridge

An addition of a novel X-Bridge method into existing framework for training pix2pix and CycleGan in PyTorch. X-Bridge was developed as a cross-modal bridge method for img2sketch and sketch2img translation in heterogeneous face recognition tasks within my dissertation work Heteroheneous Face Recognition from Facial Sketches.

Method overview

X-Bridge is supervised method (i.e. needs image pairs for the training) based on Generative Adversarial Networks for image-to-image translation. The main goal of the method is to bridge the differences between two different modalities (image, sketch) in the heterogeneous face recognition task. It is combining ideas from both older approaches - pix2pix and UNIT. To be more specific, the usage of L1 loss and conditional discriminator from Pix2pix, and the idea of shared-latent space from UNIT. By combining these ideas and by adding of a reconstruction path, it was reached very realistic and precise results in image-to-sketch and sketch-to-image translation tasks. In these tasks, the X-Bridge method provides better generalization comparing to Pix2pix and also better detail generation comparing to UNIT.

X-Bridge pipeline. E = encoder, G1;G2 = generators, D1;D2 = discriminators, z = latent space. Dotted line indicates L1 loss. xr is real input from the first domain, x^f is reconstructed fake image from the first domain, x^f is translated fake image from the second domain, x^r is corresponding real image from the second domain. The translation path is on the left, whereas, the reconstruction path on the right.

XBridge

Exemplary results

Used dataset - CUFSF

Real-to-sketch translation real2sketch1 real2sketch1

Sketch-to-real translation sketch2real1 sketch2real2

Glasses and non-frontal pose translation glasses rotation rotation2

Real-world image translation

me

Training

python train.py --dataroot ./datasets/feret_sketch_highres --name feret_sketch_my --model XBridge --direction AtoB

Switch AtoB to BtoA to train translation in opposite direction.

Testing

python test.py --dataroot ./datasets/feret_sketch_highres --name feret_sketch_my --model XBridge --direction AtoB

Acknowledgement

Most of the project codes are based on https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix

Contact

[Ivan Gruber]([email protected])

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.