kopia lustrzana https://github.com/lzzcd001/MeshDiffusion
Porównaj commity
3 Commity
0329407873
...
021cddc028
Autor | SHA1 | Data |
---|---|---|
Zhen Liu | 021cddc028 | |
Zhen Liu | 63575b7085 | |
Zhen Liu | 44284179f6 |
|
@ -55,10 +55,11 @@ Later run
|
|||
|
||||
```
|
||||
cd nvdiffrec
|
||||
python eval.py --config $DMTET_CONFIG --out-dir $OUT_DIR --sample-path $SAMPLE_PATH --deform-scale $DEFORM_SCALE [--angle-ind $ANGLE_INDEX]
|
||||
python eval.py --config $DMTET_CONFIG --out-dir $OUT_DIR --sample-path $SAMPLE_PATH \
|
||||
--deform-scale $DEFORM_SCALE [--angle-ind $ANGLE_INDEX] [--num-smoothing-steps $NUM_SMOOTHING_STEPS]
|
||||
```
|
||||
|
||||
where `$SAMPLE_PATH` is the generated sample `.npy` file in `$OUTPUT_PATH`, and `$DEFORM_SCALE` is the scale of deformation of tet vertices set for the DMTet dataset (we use 3.0 for resolution 64 as default; change the value for your own datasets). Change `$ANGLE_INDEX` to some number from 0 to 50 if images rendered from different angles are desired.
|
||||
where `$SAMPLE_PATH` is the generated sample `.npy` file in `$OUTPUT_PATH`, and `$DEFORM_SCALE` is the scale of deformation of tet vertices set for the DMTet dataset (we use 3.0 for resolution 64 as default; change the value for your own datasets). Change `$ANGLE_INDEX` to some number from 0 to 50 if images rendered from different angles are desired. Change `$NUM_SMOOTHING_STEPS` (default value 3) if the Laplacian smoothing during post-processing is too strong. For instance, we recommend setting `$NUM_SMOOTHING_STEPS` to 1 or 2 for the airplane category.
|
||||
|
||||
A mesh file (`.obj`) will be saved to the folder, which can be viewed in tools such as MeshLab. The saved images are rendered from raw meshes without post-processing and thus are used for fast sanity check only.
|
||||
|
||||
|
@ -93,7 +94,8 @@ Now store the completed meshes as `.obj` files in `$SAMPLE_PATH`
|
|||
|
||||
```
|
||||
cd nvdiffrec
|
||||
python eval.py --config $DMTET_CONFIG --sample-path $SAMPLE_PATH --deform-scale $DEFORM_SCALE
|
||||
python eval.py --config $DMTET_CONFIG --sample-path $SAMPLE_PATH \
|
||||
--deform-scale $DEFORM_SCALE [--angle-ind $ANGLE_INDEX] [--num-smoothing-steps $NUM_SMOOTHING_STEPS]
|
||||
```
|
||||
|
||||
Caution: the deformation scale should be consistent for single view fitting and the diffusion model. Check before you run conditional generation.
|
||||
|
|
|
@ -322,6 +322,7 @@ if __name__ == "__main__":
|
|||
parser.add_argument('--unnormalized_sdf', action="store_true")
|
||||
parser.add_argument('--validate', type=bool, default=True)
|
||||
parser.add_argument('--angle-ind', type=int, default=25, help='z-axis rotation of the object, from 0 to 50')
|
||||
parser.add_argument('-ns', '--num-smooth-steps', type=int, default=3, help='number of post-processing Laplacian smoothing steps')
|
||||
|
||||
FLAGS = parser.parse_args()
|
||||
|
||||
|
@ -448,8 +449,8 @@ if __name__ == "__main__":
|
|||
ms = pymeshlab.MeshSet()
|
||||
ms.load_new_mesh(mesh_savepath)
|
||||
ms.meshing_isotropic_explicit_remeshing()
|
||||
ms.apply_coord_laplacian_smoothing(stepsmoothnum=3, cotangentweight=False)
|
||||
ms.apply_coord_laplacian_smoothing(stepsmoothnum=FLAGS.num_smooth_steps, cotangentweight=False)
|
||||
# ms.apply_coord_laplacian_smoothing(stepsmoothnum=3, cotangentweight=True) ## for smoother surface
|
||||
ms.meshing_isotropic_explicit_remeshing()
|
||||
ms.apply_filter_script()
|
||||
ms.save_current_mesh(mesh_savepath)
|
||||
ms.save_current_mesh(mesh_savepath)
|
||||
|
|
Ładowanie…
Reference in New Issue