File size: 3,059 Bytes
61028eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
pipeline_tag: image-to-3d
library_name: pytorch
license: apache-2.0
---

# FLARE: Feed-forward Geometry, Appearance and Camera Estimation from Uncalibrated Sparse Views

[![Website](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://zhanghe3z.github.io/FLARE/)
[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97-Hugging%20Face-yellow)](https://huggingface.co/AntResearch/FLARE)
[![Video](https://img.shields.io/badge/Video-Demo-red)](https://zhanghe3z.github.io/FLARE/videos/teaser_video.mp4)

This repository contains the FLARE model, as presented in [FLARE: Feed-forward Geometry, Appearance and Camera Estimation from Uncalibrated Sparse Views](https://hf.co/papers/2502.12138). FLARE is a feed-forward model that estimates high-quality camera poses, 3D geometry, and appearance from as few as 2-8 uncalibrated images.

Project Page: https://zhanghe3z.github.io/FLARE/

## Run a Demo (Point Cloud and Camera Pose Estimation)

To run a demo, follow these steps:

1. **Install Dependencies:**  Ensure you have PyTorch and other necessary libraries installed as detailed in the [installation instructions](https://github.com/zhanghe3z/FLARE#installation).
2. **Download Checkpoint:** Download the checkpoint from [Hugging Face](https://huggingface.co/AntResearch/FLARE/blob/main/geometry_pose.pth) and place it in the `/checkpoints/geometry_pose.pth` directory.
3. **Run the Script:** Execute the following command, replacing `"Your/Data/Path"` and `"Your/Checkpoint/Path"` with the appropriate paths:

```bash
torchrun --nproc_per_node=1 run_pose_pointcloud.py \
    --test_dataset "1 @ CustomDataset(split='train', ROOT='Your/Data/Path', resolution=(512,384), seed=1, num_views=8, gt_num_image=0, aug_portrait_or_landscape=False, sequential_input=False)" \
    --model "AsymmetricMASt3R(pos_embed='RoPE100', patch_embed_cls='ManyAR_PatchEmbed', img_size=(512, 512), head_type='catmlp+dpt', output_mode='pts3d+desc24', depth_mode=('exp', -inf, inf), conf_mode=('exp', 1, inf), enc_embed_dim=1024, enc_depth=24, enc_num_heads=16, dec_embed_dim=768, dec_depth=12, dec_num_heads=12, two_confs=True, desc_conf_mode=('exp', 0, inf))" \
    --pretrained "Your/Checkpoint/Path" \
    --test_criterion "MeshOutput(sam=False)" --output_dir "log/" --amp 1 --seed 1 --num_workers 0
```

## Visualization

After running the demo, you can visualize the results using the following command:

```bash
sh ./visualizer/vis.sh 
```

This will run a visualization script.  Refer to the Github README for more details on visualization options.

## Citation

```bibtex
@misc{zhang2025flarefeedforwardgeometryappearance,
      title={FLARE: Feed-forward Geometry, Appearance and Camera Estimation from Uncalibrated Sparse Views}, 
      author={Shangzhan Zhang and Jianyuan Wang and Yinghao Xu and Nan Xue and Christian Rupprecht and Xiaowei Zhou and Yujun Shen and Gordon Wetzstein},
      year={2025},
      eprint={2502.12138},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2502.12138}, 
}
```