graphdeco-inria / hierarchical-3d-gaussians

Official implementation of the SIGGRAPH 2024 paper "A Hierarchical 3D Gaussian Representation for Real-Time Rendering of Very Large Datasets"
Other
847 stars 76 forks source link

Error while running generate_colmap.py on my own dataset #2

Closed projan-shakya closed 2 weeks ago

projan-shakya commented 1 month ago

When i run the code with the path of the dataset being the example_dataset u provided it works completely fine

but when i run it with my dataset with the folder structure same as that of example_dataset it shows this error

Error reading image cam1\output_0001.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 56390 | dc 46 | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

ValueError occurred during unpack operation:

56390 is not a valid TiffByteOrder
Error reading image cam1\output_0002.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 14822 | 39 e6 | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

ValueError occurred during unpack operation:

14822 is not a valid TiffByteOrder
Error reading image cam1\output_0003.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 41667 | a2 c3 | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

ValueError occurred during unpack operation:

41667 is not a valid TiffByteOrder
Error reading image cam1\output_0004.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 45628 | b2 3c | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

ValueError occurred during unpack operation:

45628 is not a valid TiffByteOrder
Error reading image cam1\output_0005.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 52049 | cb 51 | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

ValueError occurred during unpack operation:

52049 is not a valid TiffByteOrder
Error reading image cam1\output_0006.png:

+--------+------------+-------+-------+------------------------+
| Offset | Access     | Value | Bytes | Format                 |
+--------+------------+-------+-------+------------------------+
|        |            |       |       | TiffHeader (Structure) |
| 0      | byte_order | 28687 | 70 0f | tiff_byte_order        |
+--------+------------+-------+-------+------------------------+

this error goes long end terminates with this text


Merging clusters
==============================================================================
Error executing colmap hierarchical_mapper: Command '['colmap.bat', 'hierarchical_mapper', '--database_path', 'novel_view/camera_calibration/unrectified/database.db', '--image_path', 'novel_view\\inputs/images', '--output_path', 'novel_view/camera_calibration/unrectified/sparse', '--Mapper.ba_global_function_tolerance', '0.000001']' returned non-zero exit status 3221226505.```
ameuleman commented 1 month ago

Hi, would it be possible for you to share one of these images? Could you please let us know your OS?

projan-shakya commented 1 month ago

output_0001

im running on windows 11

ameuleman commented 1 month ago

This might be a COLMAP issue. Did all the steps before COLMAP's hierarchical_mapper in generate_colmap.py run smoothly?

projan-shakya commented 1 month ago

oh im sorry!! This error was on generate_colmap.py i mistyped to .py file my bad

ameuleman commented 1 month ago

Could you please run generate_colmap.py and check that feature_extractor, make_colmap_custom_matcher.py and matches_importer run smoothly? running generate_colmap.py with a debugger might help

projan-shakya commented 1 month ago

i changed the dataset from .png to .jpg and the file seem to have created colmap file but while running train_full.py it showed that --alpha_masks/-a expected one argument is it necessary to create masked images?

the full error



usage: train_coarse.py [-h] [--sh_degree SH_DEGREE] [--source_path SOURCE_PATH] [--model_path MODEL_PATH]
                       [--exp_name EXP_NAME] [--images IMAGES] [--alpha_masks ALPHA_MASKS] [--depths DEPTHS]
                       [--resolution RESOLUTION] [--white_background] [--train_test_exp]
                       [--data_device DATA_DEVICE] [--eval] [--skip_scale_big_gauss] [--hierarchy HIERARCHY]
                       [--pretrained PRETRAINED] [--skybox_num SKYBOX_NUM] [--scaffold_file SCAFFOLD_FILE]
                       [--bounds_file BOUNDS_FILE] [--skybox_locked] [--iterations ITERATIONS]
                       [--position_lr_init POSITION_LR_INIT] [--position_lr_final POSITION_LR_FINAL]
                       [--position_lr_delay_mult POSITION_LR_DELAY_MULT]
                       [--position_lr_max_steps POSITION_LR_MAX_STEPS] [--feature_lr FEATURE_LR]
                       [--opacity_lr OPACITY_LR] [--scaling_lr SCALING_LR] [--rotation_lr ROTATION_LR]
                       [--exposure_lr_init EXPOSURE_LR_INIT] [--exposure_lr_final EXPOSURE_LR_FINAL]
                       [--exposure_lr_delay_steps EXPOSURE_LR_DELAY_STEPS]
                       [--exposure_lr_delay_mult EXPOSURE_LR_DELAY_MULT] [--percent_dense PERCENT_DENSE]
                       [--lambda_dssim LAMBDA_DSSIM] [--densification_interval DENSIFICATION_INTERVAL]
                       [--opacity_reset_interval OPACITY_RESET_INTERVAL] [--densify_from_iter DENSIFY_FROM_ITER]
                       [--densify_until_iter DENSIFY_UNTIL_ITER]
                       [--densify_grad_threshold DENSIFY_GRAD_THRESHOLD]
                       [--depth_l1_weight_init DEPTH_L1_WEIGHT_INIT]
                       [--depth_l1_weight_final DEPTH_L1_WEIGHT_FINAL] [--convert_SHs_python]
                       [--compute_cov3D_python] [--debug] [--ip IP] [--port PORT] [--debug_from DEBUG_FROM]
                       [--detect_anomaly] [--save_iterations SAVE_ITERATIONS [SAVE_ITERATIONS ...]] [--quiet]
                       [--checkpoint_iterations CHECKPOINT_ITERATIONS [CHECKPOINT_ITERATIONS ...]]
                       [--start_checkpoint START_CHECKPOINT]
train_coarse.py: error: argument --alpha_masks/-a: expected one argument
Error executing train_coarse: Command 'python train_coarse.py -s try\camera_calibration\aligned --save_iterations -1 -i ../rectified/images --skybox_num 100000 --model_path try\output\scaffold --alpha_masks  ' returned non-zero exit status 2.```
ameuleman commented 1 month ago

Hi, I'm glad you managed to calibrate It is a bug, thanks for spotting it. I just pushed a fix. Let me know how it goes

projan-shakya commented 1 month ago

Thanks for the quick update, the training has started Will update on how it goes

projan-shakya commented 1 month ago

Hello @ameuleman sorry for the late response The masking error still exists and it showed this error after training started for a bit image

ameuleman commented 1 month ago

I made a mistake when in the full_train script. It should be fixed now. To avoid retraining coarse, you can pass --skip_if_exists.

projan-shakya commented 1 month ago

It works perfectly fine for me now thank you. However it seems like for Colmap generation we need large dataset of image since it is hierarchical mapper.

ameuleman commented 1 month ago

Hi, Our method focuses on large scene reconstruction (tens of thousands of images). We designed our calibration scripts with this kind datasets in mind

rayflower2020 commented 1 week ago

Error executing colmap hierarchical_mapper: Command '['colmap.bat', 'hierarchical_mapper', '--database_path', python preprocess/generate_colmap.py --project_dir E:\2025GStest001\fengcheData

rayflower2020 commented 1 week ago

Error executing colmap hierarchical_mapper: Command '['colmap.bat', 'hierarchical_mapper', '--database_path', python preprocess/generate_colmap.py --project_dir