mli0603 / BlenderNeuralangelo

Blender addon to inspect and preprocess COLMAP data for Neuralangelo (CVPR 2023)
308 stars 22 forks source link

Bounding Box is Massive and Cant be Scaled down Enough #17

Closed ceeparsons closed 1 year ago

ceeparsons commented 1 year ago

Hey there, thanks for creating this tool, it's been a really exciting one to start working with.

I've been trying to create a tight bounding box for a head but I'm having problems making it happen. After running the COLMAP but before generating the JSON file for data loading, I loaded up my COLMAP data in blender and the bounding box seemed reasonably well sized (as seen in the photo below).

Screenshot 2023-09-21 104142

The moment I try to change it's size though it becomes massive and no matter how much I scale it down it's still way too big for my model.

Screenshot 2023-09-21 104216

I've also noticed a few of my point clouds are very unaligned with my camera, I've included those below for reference. Please let me know if this is a glitch or if there may be a way to make this work!

Screenshot 2023-09-21 104038 Screenshot 2023-09-21 104058 Screenshot 2023-09-21 104108

Thanks :)

mli0603 commented 1 year ago

Hi @ceeparsons

For the offset issue, I want to check with you if you enabled single camera COLMAP by using --ImageReader.single_camera=true. This is the only case that I can think of where you will have an offset.

I have not encountered the zoom-in error you mentioned. I think this may be a bug in the code. Can you try making the 50 value a larger one (such as 100) in this line and see if it fixes it? https://github.com/mli0603/BlenderNeuralangelo/blob/3d87fb75d6f4a73dcd9a6ba49386922fa048f100/neuralangelo_addon.py#L1009

ceeparsons commented 1 year ago

I never specifically enabled it, but upon checking my run_colmap.sh file I found that it was indeed already enabled.

colmap feature_extractor ![Screenshot 2023-09-22 090549](https://github.com/mli0603/BlenderNeuralangelo/assets/145613370/831c61d8-afde-4af7-82df-4d6ce9c95d37) --image_path=${1}/images_raw \ --ImageReader.camera_model=SIMPLE_RADIAL \ --ImageReader.single_camera=true \

After that, I tried making max=100, and still had the same problem, before making it max=150, which seemed to fix it! It looks like the smaller bounding box it was trying to start with had values above 50 in almost all directions.

Screenshot 2023-09-22 090220

After having these larger values I was able to properly scale the bounding box! Thanks :)

Screenshot 2023-09-22 090549