- Dowload DTU dataset. For convenience, can download the preprocessed DTU training data and Depths_raw (both from Original MVSNet), and upzip it as the $MVS_TRANING folder.
├── Cameras
├── Depths
├── Depths_raw
├── Rectified
├── Cameras
- In
train.sh
, setMVS_TRAINING
as $MVS_TRANING - Train CasMVSNet (Multi-GPU training):
export NGPUS=8
export save_results_dir="./checkpoints"
./train.sh $NGPUS $save_results_dir --ndepths "48,32,8" --depth_inter_r "4,2,1" --dlossw "0.5,1.0,2.0" --batch_size 2 --eval_freq 3
If apex is installed, you can enable sync_bn in training:
export NGPUS=8
export $save_results_dir="./checkpoints"
./train.sh $NGPUS $save_results_dir --ndepths "48,32,8" --depth_inter_r "4,2,1" --dlossw "0.5,1.0,2.0" --batch_size 2 --eval_freq 3 --using_apex --sync_bn
- Download the preprocessed test data DTU testing data (from Original MVSNet) and unzip it as the $TESTPATH folder, which should contain one
cams
folder, oneimages
folder and onepair.txt
file. - In
test.sh
, setTESTPATH
as $TESTPATH. - Set
CKPT_FILE
as your checkpoint file, you also can download my pretrained model. - Test CasMVSNet and Fusion(default is provided by MVSNet-pytorch):
export save_results_dir="./outputs"
./test.sh $CKPT_FILE --outdir $save_results_dir --interval_scale 1.06
export save_results_dir="./outputs"
./test.sh $CKPT_FILE --outdir $save_results_dir --interval_scale 1.06 --filter_method gipuma
Acc. | Comp. | Overall. | |
---|---|---|---|
MVSNet(D=256) | 0.396 | 0.527 | 0.462 |
CasMVSNet(D=48,32,8) | 0.325 | 0.385 | 0.355 |
Mean | Family | Francis | Horse | Lighthouse | M60 | Panther | Playground | Train |
---|---|---|---|---|---|---|---|---|
56.42 | 76.36 | 58.45 | 46.20 | 55.53 | 56.11 | 54.02 | 58.17 | 46.56 |
Please refer to leaderboard.
We use a script provided by MVSNet to convert COLMAP SfM result to CasMVSNet input. After recovering SfM result and undistorting all images, COLMAP should generate a dense folder COLMAP/dense/ containing an undistorted image folder COLMAP/dense/images/ and a undistorted camera folder COLMAP/dense/sparse/. Then, you can use the following command to generate the CasMVSNet input and dense point cloud:
export $save_results_dir="outputs/colmap"
python colmap2mvsnet.py --dense_folder COLMAP/dense --save_folder $save_scene_result/casmvsnet
./test.sh $CKPT_FILE --testpath_single_scene $save_results_dir/casmvsnet --testlist all --outdir $save_results_dir/ply --interval_scale 1.06