GithubHelp home page GithubHelp logo

joancoco / sketchreconstruction Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12.34 MB

Code repository for our inverse-rendering-based 3D reconstruction system for drawings and sketches presented at WSCG 2023.

License: MIT License

Python 100.00%

sketchreconstruction's Introduction

Reconstruction from Multi-view Sketches: an Inverse Rendering Approach

Code repository for our inverse-rendering-based 3D reconstruction system for drawings and sketches presented at WSCG 2023.

Abstract

Reconstruction from real images has evolved very differently from reconstruction from sketches. Even though both present similarities, the latter aims to surpass the subjectivity that drawings present, increasing the task's uncertainty and complexity. In this work, we draw inspiration from reconstruction over real multi-view images and adapt it to work over sketches. We leverage inverse rendering as a refinement process for 3D colored meshes while proposing modifications for the domain of drawings. Compared to previous methods for sketches, our proposal recovers not only shape but color, offering an optimization system that does not require previous training. Through the results, we evaluate how different quality factors in sketches affect the reconstruction and report how our proposal adapts to them compared to directly applying existing inverse rendering systems for real images.

Implementation

This repository contains the implementation of our reconstruction system. It was developed using Python 3.9 using the following packages:

Please, note that we used a modified version of pyredner with support for mesh color materials. This version can be found at JoanCoCo/mesh-colors-redner.

Initial mesh estimation

The initial mesh required for the reconstruction can be generated using generate_initial_mesh.py from a subset of views. Optionally, the scaling-down factor for the sketches before the projection can be also especified through --reduction, being the default value 15.

Example: generate_initial_mesh.py --cameras data/plane/views/reference_views.json --output data/plane/meshes/init.obj

Reconstruction

Given the drawings (with alpha channel masks), initial mesh and the viewpoints, the reconstruction can be run using either train.py or guardian.py. The data folder contains references that can be used for generating example reconstructions, and the config folder contains examples of training configurations that can be run through guardian.py.

Example: guardian.py --config configs/plane_r.json

Evaluation

Once the reconstruction is finished, it can be evaluated from a set of evaluation images and a reference 3D model using validation.py.

sketchreconstruction's People

Contributors

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