Coder Social home page Coder Social logo

3d-gan's Introduction

Fine-scale Synthetic Shape Generation with Upsampling Network

airplane_merged

This repository contains the code implementation of the 3D-GAN and the up-convolutional network that are used to generate synthetic samples and upsample low-resolution samples, respectively.

Root

  • train_3D_GAN.py: trains 3D-GAN used to generate synthetic shape samples
  • train_upscaler.py: trains the proposed up-convolutonal network to upsample low-resolution shape samples
  • main.py: generates low-resolution synthetic samples, upsample them and output 3D voxel plots of the original and upsampled shape samples
  • main_128.py: generates high-resolution synthetic samples and output their 3D voxel plots
  • main_real.py: plots real low and high-resolution shape samples used to train the 3D-GAN and the up-convolutional network
  • main_real_ups.py: upsamples real low-resolution shape samples and output their 3D voxel plots

Subfolders

The repository contains two subfolders, obj_to_voxel and src.

obj_to_voxel

  • binvox: program that converts a mesh (.obj) file in into an occupancy grid (.binvox)
  • voxelize_obj.py: converts all the mesh files in a folder into .binvox files. it should be able to convert meshes in any formats that binvox supports.
  • Dockerfile: A script to build a docker image that can run binvox and voxelize_obj.py

src

  • binvox_rw.py: A Python script that reads .binvox files as arrays (numpy)
  • GAN.py: The source code of the 3D-GAN used to generate shape samples
  • upscaler.py: The source code of the up-convolutional network used to upsample shape samples

You will need an NVIDIA GPU that supports CUDA with at least 4GB of RAM to run the low-res 3D-GAN or the up-convolutional network, and 8GB of VRAM to run the high-resolution 3D-GAN.

The docker image used to train and test can be found here. For voxelisation of mesh files, please use the Dockerfile in the subfolder.

References

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.