weiyithu / NerfingMVS

[ICCV 2021 Oral] NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo
MIT License
434 stars 58 forks source link

struct .error: unpack requires a buffer of 12 bytes #2

Closed ZERO2ER0 closed 3 years ago

ZERO2ER0 commented 3 years ago

I met some errors when I had a try to run this code. Please help me!

I'm running Ubuntu 18.04.5 LTS Python 3.7 Pytorch 1.9 Cuda 11.1

Depth stats 0.19367019493628088 315.65333461743836 61.20548491109312
Done with imgs2poses
Depths prior training begins !
Found cache /home/xxx/code/NerfingMVS/models/depth_priors/mc.pth
/home/xxx/miniconda2/envs/py37/lib/python3.7/site-packages/torchvision/transforms/transforms.py:281: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
  "Argument interpolation should be of type InterpolationMode instead of int. "
point number: 3922949
Traceback (most recent call last):
  File "run.py", line 19, in <module>
    depth_priors.train(args)
  File "/home/xxx/code/NerfingMVS/src/depth_priors.py", line 70, in train
    args.depth_H, args.depth_W)
  File "/home/xxx/code/NerfingMVS/utils/io_utils.py", line 27, in load_colmap
    ply_masks = read_ply_mask(ply_path)
  File "/home/xxx/code/NerfingMVS/utils/colmap_utils.py", line 52, in read_ply_mask
    load_point_vis(ply_vis_path, masks)
  File "/home/xxx/code/NerfingMVS/utils/colmap_utils.py", line 36, in load_point_vis
    idx, u, v = struct.unpack('<III', f.read(4 * 3))
struct.error: unpack requires a buffer of 12 bytes

Thank you!

weiyithu commented 3 years ago

Hi, do you use our version's COLMAP ? We add sparse depth masks and you will get io errors if you use original COLMAP.

ZERO2ER0 commented 3 years ago

Hi, do you use our version's COLMAP ? We add sparse depth masks and you will get io errors if you use original COLMAP.

I follow the Installation part and the Usage part in the README.md. I think I did use your version's COLMAP. But I still get this problem.

Also, I am looking for some PYTHON packages to visualize the .ply file. Could give me some advice? Thank you!

weiyithu commented 3 years ago

What data did you use ? Your own data or the provided ScanNet datasets ?

As for the visualization, I usually use MeshLab. For python package, you can try mayavi or open3d.

ZERO2ER0 commented 3 years ago

What data did you use ? Your own data or the provided ScanNet datasets ?

As for the visualization, I usually use MeshLab. For python package, you can try mayavi or open3d.

The data is ScanNet datasets.

weiyithu commented 3 years ago
微信图片_20210913171631

Does colmap/src/mvs/fusion.cc have the above code ?

ZERO2ER0 commented 3 years ago
微信图片_20210913171631

Does colmap/src/mvs/fusion.cc have the above code ?

Yes, colmap/src/mvs/fusion.cc have the above code. I am trying to run this code in another 1080ti ubuntu device. But this should not the problem of the device.

ZERO2ER0 commented 3 years ago
微信图片_20210913171631

Does colmap/src/mvs/fusion.cc have the above code ?

Sorry, It's my fault. I solve this problem by check the above code and have another try. Thank you for your patient and kindness. Maybe you could make the step of installing COLMAP more clear. An official installation of COLMAP may make the COLMAP folder been covered.

weiyithu commented 3 years ago

OK, I will polish README. Thanks for your suggestion.

ycj1124 commented 3 years ago
微信图片_20210913171631

Does colmap/src/mvs/fusion.cc have the above code ?

Sorry, It's my fault. I solve this problem by check the above code and have another try. Thank you for your patient and kindness. Maybe you could make the step of installing COLMAP more clear. An official installation of COLMAP may make the COLMAP folder been covered.

sorry ,did you fix the problem by changing the code in "colmap/src/mvs/fusion.cc" as what the author said? I met the same questions as yours and I dont know how to do.thx very much.

ygjwd12345 commented 2 years ago
微信图片_20210913171631

Does colmap/src/mvs/fusion.cc have the above code ?

Sorry, It's my fault. I solve this problem by check the above code and have another try. Thank you for your patient and kindness. Maybe you could make the step of installing COLMAP more clear. An official installation of COLMAP may make the COLMAP folder been covered.

Can you show your full fusion.cc?

nitishkiitk commented 1 year ago

OK, I will polish README. Thanks for your suggestion.

Dear Authors, During the installation of Colmap: When I am running "cmake .. -GNinja" then it asks to set CUDA_ARCHITECTURES then I set it to "set(CMAKE_CUDA_ARCHITECTURES '70')" and installation was successfully done.

But when I am running the demo code for one of the scenes given by you. Then it showed this error error

Ten, according to #2, I changed the code of fusion.cc to the given below

133058119-9397114e-b910-4b4a-b6af-8a5f799cc856

But after that also the error is not fixed, and the same error is showing.

  1. can you clarify the fusion.cc needs to be changed before installation of "ninja" or after ninja installation?
  2. and what should be the CMAKE_CUDA_ARCHITECTURES = '', is it '70', 'native', 'all-range' or something else?
  3. When should be changed to work the code properly? Thanks!