Skip to content

GeoMaster: Advanced Geometry Enhancement for High-Resolution 3D Modeling

Notifications You must be signed in to change notification settings

Stable-X/GeoMaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoMaster: Advanced Geometry Enhancement for High-Resolution 3D Modeling

GeoMaster is a state-of-the-art tool designed to enhance the geometric details of 3D models, providing high-resolution outputs suitable for various applications such as gaming, virtual reality, and 3D printing.

Installation

To get started with GeoMaster, follow these steps:

Clone the Repository

First, clone the GeoMaster repository to your local machine:

git clone https://github.com/hugoycj/GeoMaster.git
cd GeoMaster

Step 1: Install Requirements

Install the necessary Python packages specified in the requirements.txt file:

pip install -r requirements.txt

Step 2: Install PyTorch

Ensure that your PyTorch version is higher than 1.7.1. You can install the specified version using the following command:

pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

Step 3: Install nvdiffrast

Next, install nvdiffrast by cloning its repository and running the installation command:

git clone https://github.com/NVlabs/nvdiffrast
cd nvdiffrast
pip install .
cd ..

Step 4: Install Gaustudio

Finally, install gaustudio from its GitHub repository:

pip install git+https://github.com/GAP-LAB-CUHK-SZ/gaustudio

Data Preparation

Before running GeoMaster, ensure that your data is organized in the following structure:

data_001/
    images/
    sparse/

Additionally, you should have a reconstructed coarse mesh available.

Usage

Reconstruct Mesh

Step 1: Prepare the data

First, you need to prepare the input data using the gm-prepare-data command:

gm-prepare-data -s ./examples/glt

This command will generate the necessary files and directories for the mesh reconstruction process.

Step 2: Reconstruct the mesh

Next, you can use the gm-process command to reconstruct the mesh from the prepared data:

gm-process -s ./examples/glt -m ./examples/glt/visual_hull.ply

Enhancing Mesh

To enhance the geometric detail of your 3D model using gm-process, use the following command:

gm-process -s ${INPUT_DIR} -m ${MODEL_DIR}/${MODEL_NAME}.ply

Replace:

  • ${INPUT_DIR} with the path to your input data directory
  • ${MODEL_DIR} with the path to your model directory
  • ${MODEL_NAME} with the name of your model file

Example:

gm-process -s examples/glt/ -m examples/glt.ply

The enhanced result will be saved as ${MODEL_DIR}/${MODEL_NAME}.refined.ply.

Making the Mesh Watertight

If you only have the mesh file and do not need to specify an input data directory, you can use the gm-process-mesh command to make the mesh watertight:

gm-process-mesh -m ${MODEL_DIR}/${MODEL_NAME}.ply

Replace:

  • ${MODEL_DIR} with the path to your model directory
  • ${MODEL_NAME} with the name of your model file

Example:

gm-process-mesh -m examples/glt.ply

The watertight result will be saved as ${MODEL_DIR}/${MODEL_NAME}.refined.ply, overwriting the previous refined mesh if it exists.

Cull invisible part

To remove invisible or rarely seen vertices from your model, use the following command:

gm-cull-mesh -s ${INPUT_DIR} -m ${MODEL_DIR}/${MODEL_NAME}.ply [--min_weights VALUE] [--use_mask]

Replace:

  • ${INPUT_DIR} with the path to your input data directory
  • ${MODEL_DIR} with the path to your model directory
  • ${MODEL_NAME} with the name of your model file

Optional parameters:

  • --min_weights VALUE: Set the minimum number of views a vertex must be visible in (default is 5)
  • --use_mask: Apply masking during processing

Examples:

  1. Culling with minimum weights:
gm-cull-mesh -s examples/glt/ -m examples/glt.ply --min_weights 1
  1. Culling with masking:
gm-cull-mesh -s examples/glt/ -m examples/glt.ply --use_mask
  1. Culling with both minimum weights and masking:
gm-cull-mesh -s examples/glt/ -m examples/glt.ply --min_weights 5 --use_mask

The culled result will be saved as ${MODEL_DIR}/${MODEL_NAME}.clean.ply.

Contribution

Feel free to contribute to GeoMaster by submitting issues or pull requests on our GitHub repository.

Happy Modeling with GeoMaster!

About

GeoMaster: Advanced Geometry Enhancement for High-Resolution 3D Modeling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages