Source code for "Interactive All-Hex Meshing via Cuboid Decomposition [SIGGRAPH Asia 2021]".

Overview

Interactive All-Hex Meshing via Cuboid Decomposition

teaser Video demonstration

This repository contains an interactive software to the PolyCube-based hex-meshing problem. You can solve hex meshing by playing minecraft!

Features include:

  • a 4-stage interactive pipeline that can robustly generate high-quality hex meshes from an input tetrahedral mesh;
  • extensive user control over each stage, such as editing the voxelized PolyCube, positioning surface vertices, and exploring the trade-off among competing quality metrics;
  • automatic alternatives based on GPU-powered continuous optimization that can run at interactive speed.

It is the original implementation of the SIGGRAPH Asia 2021 paper "Interactive All-Hex Meshing via Cuboid Decomposition" by Lingxiao Li, Paul Zhang, Dmitriy Smirnov, Mazdak Abulnaga, Justin Solomon. Check out our paper for a complete description of our pipeline!

Organization

There are three main components of the project.

  • The geomlib folder contains a standalone C++ library with GPU-based geometric operations including point-triangle projection (in arbitrary dimensions), point-tetrahedron projection (in arbitrary dimensions), point-in-tet-mesh inclusion testing, sampling on a triangular mesh, capable of handling tens of thousands of point queries on large meshes in milliseconds.
  • The vkoo folder contains a standalone object-oriented Vulkan graphics engine that is built based on the official Vulkan samples code with a lot of simplification and modification for the purpose of this project.
  • The hex folder contains the application-specific code for our interactive PolyCube-based hex meshing software, and should be most relevant for learning about the implementation details of our paper.

In addition,

  • results.zip contains the *.h5 project file and the *.mesh output hex mesh file for each model in the Table 2 of the paper. The *.h5 project files can be loaded in our software using File > Open.
  • The assets folder contains a small number of tetrahedral meshes to test on, but you can include your own meshes easily (if you only have triangular meshes, try using TetGen or this to mesh the interior first).
  • The external folder contains additional dependencies that are included in the repo.

Dependencies

Main dependencies that are not included in the repo and should be installed first:

  • CMake
  • CUDA (tested with 11.2, 11.3, 11.4, 11.5) and cuDNN
  • Pytorch C++ frontend (tested with 1.7, 1.8, 1.9, 1.10)
  • Vulkan SDK
  • Python3
  • HDF5

There are additional dependencies in external and should be built correctly with the provided CMake hierarchy:

  • Eigen
  • glfw
  • glm
  • glslang
  • imgui
  • spdlog
  • spirv-cross
  • stb
  • yaml-cpp

Linux Instruction

The instruction is slightly different on various Linux distributions. We have tested on Arch Linux and Ubuntu 20.04. First install all dependencies above using the respective package manager. Then download and unzip Pytorch C++ frontend for Linux (tested with cxx11 ABI) -- it should be under the tab Libtorch > C++/Java > CUDA 11.x. Add Torch_DIR=<unzipped folder> to your environment variable lists (or add your unzipped folder to CMAKE_PREFIX_PATH). Then clone the repo (be sure to use --recursive to clone the submodules as well). Next run the usual cmake/make commands to build target hex in Debug or Release mode:

mkdir -p build/Release
cd build/Release
cmake ../.. -DCMAKE_BUILD_TYPE=Release
make hex -j

This should generate an executable named hex under bin/Release/hex which can be run directly. See CMakeLists.txt for more information.

Windows Instruction

Compiling on Windows is trickier than on Linux. The following procedure has been tested to work on multiple Windows machines.

  • Download and install Visual Studio 2019
  • Download and install the newest CUDA Toolkit (tested with 11.2)
  • Download and install cuDNN for Windows (this amounts to copying a bunch of dll's to the CUDA path)
  • Download and install the newest Vulkan SDK binary for Windows
  • Download and install Python3
  • Download and unzip Pytorch C++ frontend for Windows. Then add TORCH_DIR=<unzipped folder> to your environment variable lists.
  • Download and install HDF5 for Windows
  • In VS2019, install CMake tools, and then build the project following this This should generate an executable under bin/Debug or bin/Release.
Owner
Lingxiao Li
Lingxiao Li
SARS-Cov-2 Recombinant Finder for fasta sequences

Sc2rf - SARS-Cov-2 Recombinant Finder Pronounced: Scarf What's this? Sc2rf can search genome sequences of SARS-CoV-2 for potential recombinants - new

Lena Schimmel 41 Oct 03, 2022
IEEE Winter Conference on Applications of Computer Vision 2022 Accepted

SSKT(Accepted WACV2022) Concept map Dataset Image dataset CIFAR10 (torchvision) CIFAR100 (torchvision) STL10 (torchvision) Pascal VOC (torchvision) Im

1 Nov 17, 2022
Code for the ICML 2021 paper "Bridging Multi-Task Learning and Meta-Learning: Towards Efficient Training and Effective Adaptation", Haoxiang Wang, Han Zhao, Bo Li.

Bridging Multi-Task Learning and Meta-Learning Code for the ICML 2021 paper "Bridging Multi-Task Learning and Meta-Learning: Towards Efficient Trainin

AI Secure 57 Dec 15, 2022
Code for the Paper: Alexandra Lindt and Emiel Hoogeboom.

Discrete Denoising Flows This repository contains the code for the experiments presented in the paper Discrete Denoising Flows [1]. To give a short ov

Alexandra Lindt 3 Oct 09, 2022
A Python script that creates subtitles of a given length from text paragraphs that can be easily imported into any Video Editing software such as FinalCut Pro for further adjustments.

Text to Subtitles - Python This python file creates subtitles of a given length from text paragraphs that can be easily imported into any Video Editin

Dmytro North 9 Dec 24, 2022
Differentiable scientific computing library

xitorch: differentiable scientific computing library xitorch is a PyTorch-based library of differentiable functions and functionals that can be widely

98 Dec 26, 2022
Contains a bunch of different python programm tasks

py_tasks Contains a bunch of different python programm tasks Armstrong.py - calculate Armsrong numbers in range from 0 to n with / without cache and c

Dmitry Chmerenko 1 Dec 17, 2021
HomeAssitant custom integration for dyson

HomeAssistant Custom Integration for Dyson This custom integration is still under development. This is a HA custom integration for dyson. There are se

Xiaonan Shen 232 Dec 31, 2022
Diverse Branch Block: Building a Convolution as an Inception-like Unit

Diverse Branch Block: Building a Convolution as an Inception-like Unit (PyTorch) (CVPR-2021) DBB is a powerful ConvNet building block to replace regul

253 Dec 24, 2022
U-Net implementation in PyTorch for FLAIR abnormality segmentation in brain MRI

U-Net for brain segmentation U-Net implementation in PyTorch for FLAIR abnormality segmentation in brain MRI based on a deep learning segmentation alg

562 Jan 02, 2023
Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style"

Neural Style Transfer & Neural Doodles Implementation of Neural Style Transfer from the paper A Neural Algorithm of Artistic Style in Keras 2.0+ INetw

Somshubra Majumdar 2.2k Dec 31, 2022
Ladder Variational Autoencoders (LVAE) in PyTorch

Ladder Variational Autoencoders (LVAE) PyTorch implementation of Ladder Variational Autoencoders (LVAE) [1]: where the variational distributions q at

Andrea Dittadi 63 Dec 22, 2022
[WACV 2022] Contextual Gradient Scaling for Few-Shot Learning

CxGrad - Official PyTorch Implementation Contextual Gradient Scaling for Few-Shot Learning Sanghyuk Lee, Seunghyun Lee, and Byung Cheol Song In WACV 2

Sanghyuk Lee 4 Dec 05, 2022
The official repo for CVPR2021——ViPNAS: Efficient Video Pose Estimation via Neural Architecture Search.

ViPNAS: Efficient Video Pose Estimation via Neural Architecture Search [paper] Introduction This is the official implementation of ViPNAS: Efficient V

Lumin 42 Sep 26, 2022
Towards Interpretable Deep Metric Learning with Structural Matching

DIML Created by Wenliang Zhao*, Yongming Rao*, Ziyi Wang, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for paper Towards Interpr

Wenliang Zhao 75 Nov 11, 2022
CLIP2Video: Mastering Video-Text Retrieval via Image CLIP

CLIP2Video: Mastering Video-Text Retrieval via Image CLIP The implementation of paper CLIP2Video: Mastering Video-Text Retrieval via Image CLIP. CLIP2

168 Dec 29, 2022
A pure PyTorch implementation of the loss described in "Online Segment to Segment Neural Transduction"

ssnt-loss ℹ️ This is a WIP project. the implementation is still being tested. A pure PyTorch implementation of the loss described in "Online Segment t

張致強 1 Feb 09, 2022
A motion detection system with RaspberryPi, OpenCV, Python

Human Detection System using Raspberry Pi Functionality Activates a relay on detecting motion. You may need following components to get the expected R

Omal Perera 55 Dec 04, 2022
🔮 Execution time predictions for deep neural network training iterations across different GPUs.

Habitat: A Runtime-Based Computational Performance Predictor for Deep Neural Network Training Habitat is a tool that predicts a deep neural network's

Geoffrey Yu 44 Dec 27, 2022
Self-Supervised CNN-GCN Autoencoder

GCNDepth Self-Supervised CNN-GCN Autoencoder GCNDepth: Self-supervised monocular depth estimation based on graph convolutional network To be published

53 Dec 14, 2022