Giter Site home page Giter Site logo

brule's Introduction

BRULE

Implementation of Barycenter-Regularized Unsupervised Landmark Extraction in PyTorch

Main requirements

  • PyTorch 1.5.0
  • CUDA 10.0+
  • GPU 16Gb

Principal diagram of the model

Model

Usage

Download datasets CelebA (http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html) and 300-W (https://ibug.doc.ic.ac.uk/resources/300-W). Set the required paths to the datasets in file ./parameters/path.py.

  • DefaultPath.ausland - path to the dataset.
  • DefaultPath.homa - path to tensorboard logs folder.
  • output model will be saved in path: "DefaultPath.ausland + "/saved_models"".

Compile cuda extensions of stylegan2:

python3 ./gans_pytorch/gan/nn/stylegan/op/setup.py install

Start tensorboard:

tensorboard --logdir=runs

  • runs (path in DefaultPath.homa), like "/home/brule_logs/"

Train BRULE model with accuracy test on 300-W:

python 3 ./examples/stylegan_train_unsupervised.py

components:

  1. main:
  • Create BRULE model.
  1. Train part:
  • Initialize g_transforms (transforms for geometric regularizer R_t), calculate barycenter.
  • Create R_t (geom. reg.), R_b (barycenter reg.) regularizers.
  • Train part before gan, after that train part with gan.
  1. Logger.
  • Send losses, metrics and pictures to tensorboard.

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.