Git Product home page Git Product logo

tfm's Introduction

Learning interpretable representations of material appearance

This repository contains the code used during the master thesis of Santiago Jiménez Navarro in the Master Program in Robotics, Graphics and Computer Vision. It builds on top of the original Disentangled VAE and the Disentanglement Lib repositories.

Set up

  1. Install the required packages using the requirements.txt file.
  2. Download the necessary files:
  • The Serrano21 (LDR) dataset. Move the color_chnl folder to data/serrano, rename it to color_chnl_original and execute the script change_shape.py.
  • Background masks. Place them in data/serrano/one_exr_per_geom.
  1. Modify the file hyperparam.ini to make sure that the paths are correct in your machine.

Dataset

Now that we have the original Serrano21 dataset, we can build the subset that we want, for example, executing the get_masked.py script with the option 1 (the variable mode inside the script). This will generate a folder called masked-serrano, which should be the value of the training_dataset variable in the hyperparam.ini file.

Train

Run the training command, specifying all the required parameters, for example:

python main.py factor_serrano_test -d serrano -l factor --lr 0.0005 -b 128 -e 1000 -z 20 -f 500 --lr-disc 0.00001

After the training is complete, two new folders will be created with the results, whose path is defined in the hyperparam.ini file (by default named results and runs).

To check the development of the training, you can use Tensorboard. For example, by running tensorboard --logdir "disentangling-vae-master/runs" and then opening http://localhost:6006/ in a browser, you should see plots similar to these:

tensorboard

Test

Test the trained model, using the main_viz.py script. For example, to generate all the plots, run:

python main_viz.py factor_serrano_test all -r 8 -c 7

This should give a result similar to this:

masked-serrano

tfm's People

Contributors

santiagojn avatar

Watchers

 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.