Skip to content

Latest commit

 

History

History
78 lines (64 loc) · 2.87 KB

README.md

File metadata and controls

78 lines (64 loc) · 2.87 KB

Relative Camera Pose Estimation

1. Angular Metrics

See configs in configs/evaluation/relpose-angular.yaml.

# python relpose/sampling.py  # to generate seq-id-maps under datasets/seq-id-maps, which is provided in this repo
python relpose/eval_angle.py
# torchrun --nnodes=1 --nproc_per_node=8 videodepth/eval_angle_mp.py   # accelerate with multi gpus

Eval World-to-Camera Camera Poses

Assume eval_models only have pi3, eval-angle.py will generate folders like:

recons-eval
├── ...
├── outputs
|   └── relpose-angular
|       ├── hydra (runtime configs)
|       ├── pi3 (tmp folder for multi gpus)
|       |   ├── rError-rank0.npy
|       |   ├── tError-rank0.npy
|       |   ├── rError-rank1.npy
|       |   └── ...
|       ├── CO3Dv2-metric.csv
|       └── Re10K-metric.csv
└── ...

Use Your Own Sampling Strategy

seq-id-map records the mapping from sequence name to image ids of this sequence. Follow VGGT, We randomly choose 10 images in each sequence as model input. To ensure reproducible evaluation results, we precompute seq-id-maps with given random seed.

You can edit configs/data/relpose-angular.yaml and relpose/sampling.py to generate new seq-id-maps under datasets/seq-id-maps. We have provided all necessary seq-id-maps for our evaluation settings.

If you want to use your own sampling strategy, you need to generate seq-id-maps before running eval-angle.py, and specify it in configs/data/relpose-angular.yaml.

2. Distance Metrics

python relpose/eval_dist.py
# torchrun --nnodes=1 --nproc_per_node=8 videodepth/eval_dist_mp.py  # accelerate with multi gpus

Assume eval_models only have pi3, eval-dist.py will generate folders like:

recons-eval
├── ...
├── outputs
|   └── relpose-distance
|       ├── hydra (runtime configs)
|       ├── pi3
|       |   ├── scannetv2
|       |   |   ├── _seq_metrics
|       |   |   |   ├── sequence_1.csv
|       |   |   |   ├── sequence_2.csv
|       |   |   |   └── ...
|       |   |   ├── sequence_1
|       |   |   |   ├── eval_metric.txt
|       |   |   |   ├── pred_intrinsics.json
|       |   |   |   ├── pred_poses.npy
|       |   |   |   ├── pred_traj.txt
|       |   |   |   └── vis_traj_error.png
|       |   |   ├── sequence_2
|       |   |   ├── ...
|       |   |   ├── _seq_metrics.csv
|       |   |   └── error_log.txt
|       |   ├── sintel
|       |   └── tum
|       ├── scannetv2-metric.csv
|       ├── sintel-metric.csv
|       └── tum-metric.csv
└── ...