Giter Site home page Giter Site logo

shadow-removal-code-archive's Introduction

Learning to Remove Soft Shadows - code archive

This repository contains the code for our 2015 ACM Transactions on Graphics paper "Learning to Remove Soft Shadows".

This is mostly for reference - it has been a long while since I ran this and I do not have access to the machine where everything used to be set up. Consequently, it will take quite a bit of work to get things to run, from fixing all the hard-coded paths to compiling the C++ code to generating the training data and figuring out the correct place to put it. While I probably won't be able to help with individual requests, here is the overall structure of how things worked:

  • A complimentary repository shadow_gen contains the code used to generate the training data (shadowed-unshadowed image pairs).
  • PenumbraRemoval is the core algorithm written in C++. It can do either training or evaluation using an already-trained model, depending on the options given. PenumbraDataInspection is a helper library and RandomForest contains an implementation of Mutlivariate Regression Random Forest that's used at the core of our shadow removal algorithm.
  • prem_integration contain a bunch of glue code in Python that actually made things run and launch the compiled binaries described above. A good starting point for looking through it is prem_integration/run.py. A thing to note are the options files, prem_options.txt and local_options.txt, which control how things run (e.g. whether we're training or testing/evaluating), specify learning parameters such as number of trees in the Random Forest, their depth etc., as well as specify paths to where to find things. The paths in prem_options.txt are relative to whatever is defined in local_options.txt.
  • Another interesting thing is a script to automate image inpainting using Adobe Photoshop's "context-aware fill" functionality: prem_integration/inpaint_file.jsx. This JavaScript file was turned into a corresponding .exe, which would then launch Photoshop itself and do the inpainting. If you want more details about this part, the Photoshop JS Scripting Reference is probably a good place to start.
  • experiments is mostly dysfunctional - it was a place, where I evaluated the impact of the size of the training set on the final result; there might be some interesting things there (including some compiled binaries), so I've left it in.
  • Finally, Scribbler contains a small Qt application that was used to create the binary shadow masks by painting over selected images.

I hope this is helpful - thanks for your interest in our work and best of luck in digging through this code and possibly even resurrecting it. If you manage to get something useful out of it - let me know!

shadow-removal-code-archive's People

Contributors

maciejgryka 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.