Photo2Model is a complete 3D reconstruction pipeline based on COLMAP and PointMVSNet that only requires a set of photos as inputs.
- COLMAP, tested under versions >= 3.6
git clone https://github.com/PKU-VCL-3DV/MVS.git && cd MVS
bash ./install_dependencies.sh
Compile CUDA extensions
bash ./compile.sh
Photos should be placed under ./data/images
. Make sure that photos are named in an ordered {:08d}.png
(or {:08d}.jpg
) format, starting from 00000000.png
(or 00000000.jpg
).
To help rename your photos, EITHER run
python ./renamePhotos.py
OR, to delete the unrenamed photos,
python ./renamePhotos.py -d
This step requires a GPU, so make sure to check the script before you run on the specified GPU. To calibrate the cameras using COLMAP, run
bash ./runCOLMAP.sh
python ./colmap2matrices.py
Remember to adjust the image resolution and the number of virtual planes in ./configs/photo2model.yaml
.
Under the conda environment Photo2Model
, run
python pointmvsnet/test.py --cfg configs/photo2model.yaml TEST.WEIGHT ./model.pth
To convert the depth maps into a complete 3D model, run
python fuse_depthmaps.py