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.
To get started with GeoMaster, follow these steps:
First, clone the GeoMaster repository to your local machine:
git clone https://github.com/hugoycj/GeoMaster.git
cd GeoMaster
Install the necessary Python packages specified in the requirements.txt
file:
pip install -r requirements.txt
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
Next, install nvdiffrast
by cloning its repository and running the installation command:
git clone https://github.com/NVlabs/nvdiffrast
cd nvdiffrast
pip install .
cd ..
Finally, install gaustudio
from its GitHub repository:
pip install git+https://github.com/GAP-LAB-CUHK-SZ/gaustudio
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.
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.
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
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
.
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.
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:
- Culling with minimum weights:
gm-cull-mesh -s examples/glt/ -m examples/glt.ply --min_weights 1
- Culling with masking:
gm-cull-mesh -s examples/glt/ -m examples/glt.ply --use_mask
- 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
.
Feel free to contribute to GeoMaster by submitting issues or pull requests on our GitHub repository.
Happy Modeling with GeoMaster!