[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72016":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},72016,"dust3r","naver\u002Fdust3r","naver","DUSt3R: Geometric 3D Vision Made Easy","https:\u002F\u002Fdust3r.europe.naverlabs.com\u002F",null,"Python",7186,757,54,133,0,11,42,64.34,"Other",false,"main",true,[],"2026-06-11 04:05:09","![demo](assets\u002Fdust3r.jpg)\n\nOfficial implementation of `DUSt3R: Geometric 3D Vision Made Easy`  \n[[Project page](https:\u002F\u002Fdust3r.europe.naverlabs.com\u002F)], [[DUSt3R arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.14132)]  \n\n> Make sure to also check our other works:  \n> [Grounding Image Matching in 3D with MASt3R](https:\u002F\u002Fgithub.com\u002Fnaver\u002Fmast3r): DUSt3R with a local feature head, metric pointmaps, and a more scalable global alignment!  \n> [Pow3R: Empowering Unconstrained 3D Reconstruction with Camera and Scene Priors](https:\u002F\u002Fgithub.com\u002Fnaver\u002Fpow3r): DUSt3R with known depth \u002F focal length \u002F poses.  \n> [MUSt3R: Multi-view Network for Stereo 3D Reconstruction](https:\u002F\u002Fgithub.com\u002Fnaver\u002Fmust3r): Multi-view predictions (RGB SLAM\u002FSfM) without any global alignment.    \n\n![Example of reconstruction from two images](assets\u002Fpipeline1.jpg)\n\n![High level overview of DUSt3R capabilities](assets\u002Fdust3r_archi.jpg)\n\n```bibtex\n@inproceedings{dust3r_cvpr24,\n      title={DUSt3R: Geometric 3D Vision Made Easy}, \n      author={Shuzhe Wang and Vincent Leroy and Yohann Cabon and Boris Chidlovskii and Jerome Revaud},\n      booktitle = {CVPR},\n      year = {2024}\n}\n\n@misc{dust3r_arxiv23,\n      title={DUSt3R: Geometric 3D Vision Made Easy}, \n      author={Shuzhe Wang and Vincent Leroy and Yohann Cabon and Boris Chidlovskii and Jerome Revaud},\n      year={2023},\n      eprint={2312.14132},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n```\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [License](#license)\n- [Get Started](#get-started)\n  - [Installation](#installation)\n  - [Checkpoints](#checkpoints)\n  - [Interactive demo](#interactive-demo)\n  - [Interactive demo with docker](#interactive-demo-with-docker)\n- [Usage](#usage)\n- [Training](#training)\n  - [Datasets](#datasets)\n  - [Demo](#demo)\n  - [Our Hyperparameters](#our-hyperparameters)\n\n## License\n\nThe code is distributed under the CC BY-NC-SA 4.0 License.\nSee [LICENSE](LICENSE) for more information.\n\n```python\n# Copyright (C) 2024-present Naver Corporation. All rights reserved.\n# Licensed under CC BY-NC-SA 4.0 (non-commercial use only).\n```\n\n## Get Started\n\n### Installation\n\n1. Clone DUSt3R.\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002Fnaver\u002Fdust3r\ncd dust3r\n# if you have already cloned dust3r:\n# git submodule update --init --recursive\n```\n\n2. Create the environment, here we show an example using conda.\n```bash\nconda create -n dust3r python=3.11 cmake=3.14.0\nconda activate dust3r \nconda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia  # use the correct version of cuda for your system\npip install -r requirements.txt\n# Optional: you can also install additional packages to:\n# - add support for HEIC images\n# - add pyrender, used to render depthmap in some datasets preprocessing\n# - add required packages for visloc.py\npip install -r requirements_optional.txt\n```\n\n3. Optional, compile the cuda kernels for RoPE (as in CroCo v2).\n```bash\n# DUST3R relies on RoPE positional embeddings for which you can compile some cuda kernels for faster runtime.\ncd croco\u002Fmodels\u002Fcurope\u002F\npython setup.py build_ext --inplace\ncd ..\u002F..\u002F..\u002F\n```\n\n### Checkpoints\n\nYou can obtain the checkpoints by two ways:\n\n1) You can use our huggingface_hub integration: the models will be downloaded automatically.\n\n2) Otherwise, We provide several pre-trained models:\n\n| Modelname   | Training resolutions | Head | Encoder | Decoder |\n|-------------|----------------------|------|---------|---------|\n| [`DUSt3R_ViTLarge_BaseDecoder_224_linear.pth`](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002FDUSt3R_ViTLarge_BaseDecoder_224_linear.pth) | 224x224 | Linear | ViT-L | ViT-B |\n| [`DUSt3R_ViTLarge_BaseDecoder_512_linear.pth`](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002FDUSt3R_ViTLarge_BaseDecoder_512_linear.pth)   | 512x384, 512x336, 512x288, 512x256, 512x160 | Linear | ViT-L | ViT-B |\n| [`DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth`](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002FDUSt3R_ViTLarge_BaseDecoder_512_dpt.pth) | 512x384, 512x336, 512x288, 512x256, 512x160 | DPT | ViT-L | ViT-B |\n\nYou can check the hyperparameters we used to train these models in the [section: Our Hyperparameters](#our-hyperparameters)\n\nTo download a specific model, for example `DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth`:\n```bash\nmkdir -p checkpoints\u002F\nwget https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002FDUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints\u002F\n```\n\nFor the checkpoints, make sure to agree to the license of all the public training datasets and base checkpoints we used, in addition to CC-BY-NC-SA 4.0. Again, see [section: Our Hyperparameters](#our-hyperparameters) for details.\n\n### Interactive demo\n\nIn this demo, you should be able run DUSt3R on your machine to reconstruct a scene.\nFirst select images that depicts the same scene.\n\nYou can adjust the global alignment schedule and its number of iterations.\n\n> [!NOTE]\n> If you selected one or two images, the global alignment procedure will be skipped (mode=GlobalAlignerMode.PairViewer)\n\nHit \"Run\" and wait.\nWhen the global alignment ends, the reconstruction appears.\nUse the slider \"min_conf_thr\" to show or remove low confidence areas.\n\n```bash\npython3 demo.py --model_name DUSt3R_ViTLarge_BaseDecoder_512_dpt\n\n# Use --weights to load a checkpoint from a local file, eg --weights checkpoints\u002FDUSt3R_ViTLarge_BaseDecoder_512_dpt.pth\n# Use --image_size to select the correct resolution for the selected checkpoint. 512 (default) or 224\n# Use --local_network to make it accessible on the local network, or --server_name to specify the url manually\n# Use --server_port to change the port, by default it will search for an available port starting at 7860\n# Use --device to use a different device, by default it's \"cuda\"\n```\n\n### Interactive demo with docker\n\nTo run DUSt3R using Docker, including with NVIDIA CUDA support, follow these instructions:\n\n1. **Install Docker**: If not already installed, download and install `docker` and `docker compose` from the [Docker website](https:\u002F\u002Fwww.docker.com\u002Fget-started).\n\n2. **Install NVIDIA Docker Toolkit**: For GPU support, install the NVIDIA Docker toolkit from the [Nvidia website](https:\u002F\u002Fdocs.nvidia.com\u002Fdatacenter\u002Fcloud-native\u002Fcontainer-toolkit\u002Flatest\u002Finstall-guide.html).\n\n3. **Build the Docker image and run it**: `cd` into the `.\u002Fdocker` directory and run the following commands: \n\n```bash\ncd docker\nbash run.sh --with-cuda --model_name=\"DUSt3R_ViTLarge_BaseDecoder_512_dpt\"\n```\n\nOr if you want to run the demo without CUDA support, run the following command:\n\n```bash \ncd docker\nbash run.sh --model_name=\"DUSt3R_ViTLarge_BaseDecoder_512_dpt\"\n```\n\nBy default, `demo.py` is lanched with the option `--local_network`.  \nVisit `http:\u002F\u002Flocalhost:7860\u002F` to access the web UI (or replace `localhost` with the machine's name to access it from the network).  \n\n`run.sh` will launch docker-compose using either the [docker-compose-cuda.yml](docker\u002Fdocker-compose-cuda.yml) or [docker-compose-cpu.ym](docker\u002Fdocker-compose-cpu.yml) config file, then it starts the demo using [entrypoint.sh](docker\u002Ffiles\u002Fentrypoint.sh).\n\n\n![demo](assets\u002Fdemo.jpg)\n\n## Usage\n\n```python\nfrom dust3r.inference import inference\nfrom dust3r.model import AsymmetricCroCo3DStereo\nfrom dust3r.utils.image import load_images\nfrom dust3r.image_pairs import make_pairs\nfrom dust3r.cloud_opt import global_aligner, GlobalAlignerMode\n\nif __name__ == '__main__':\n    device = 'cuda'\n    batch_size = 1\n    schedule = 'cosine'\n    lr = 0.01\n    niter = 300\n\n    model_name = \"naver\u002FDUSt3R_ViTLarge_BaseDecoder_512_dpt\"\n    # you can put the path to a local checkpoint in model_name if needed\n    model = AsymmetricCroCo3DStereo.from_pretrained(model_name).to(device)\n    # load_images can take a list of images or a directory\n    images = load_images(['croco\u002Fassets\u002FChateau1.png', 'croco\u002Fassets\u002FChateau2.png'], size=512)\n    pairs = make_pairs(images, scene_graph='complete', prefilter=None, symmetrize=True)\n    output = inference(pairs, model, device, batch_size=batch_size)\n\n    # at this stage, you have the raw dust3r predictions\n    view1, pred1 = output['view1'], output['pred1']\n    view2, pred2 = output['view2'], output['pred2']\n    # here, view1, pred1, view2, pred2 are dicts of lists of len(2)\n    #  -> because we symmetrize we have (im1, im2) and (im2, im1) pairs\n    # in each view you have:\n    # an integer image identifier: view1['idx'] and view2['idx']\n    # the img: view1['img'] and view2['img']\n    # the image shape: view1['true_shape'] and view2['true_shape']\n    # an instance string output by the dataloader: view1['instance'] and view2['instance']\n    # pred1 and pred2 contains the confidence values: pred1['conf'] and pred2['conf']\n    # pred1 contains 3D points for view1['img'] in view1['img'] space: pred1['pts3d']\n    # pred2 contains 3D points for view2['img'] in view1['img'] space: pred2['pts3d_in_other_view']\n\n    # next we'll use the global_aligner to align the predictions\n    # depending on your task, you may be fine with the raw output and not need it\n    # with only two input images, you could use GlobalAlignerMode.PairViewer: it would just convert the output\n    # if using GlobalAlignerMode.PairViewer, no need to run compute_global_alignment\n    scene = global_aligner(output, device=device, mode=GlobalAlignerMode.PointCloudOptimizer)\n    loss = scene.compute_global_alignment(init=\"mst\", niter=niter, schedule=schedule, lr=lr)\n\n    # retrieve useful values from scene:\n    imgs = scene.imgs\n    focals = scene.get_focals()\n    poses = scene.get_im_poses()\n    pts3d = scene.get_pts3d()\n    confidence_masks = scene.get_masks()\n\n    # visualize reconstruction\n    scene.show()\n\n    # find 2D-2D matches between the two images\n    from dust3r.utils.geometry import find_reciprocal_matches, xy_grid\n    pts2d_list, pts3d_list = [], []\n    for i in range(2):\n        conf_i = confidence_masks[i].cpu().numpy()\n        pts2d_list.append(xy_grid(*imgs[i].shape[:2][::-1])[conf_i])  # imgs[i].shape[:2] = (H, W)\n        pts3d_list.append(pts3d[i].detach().cpu().numpy()[conf_i])\n    reciprocal_in_P2, nn2_in_P1, num_matches = find_reciprocal_matches(*pts3d_list)\n    print(f'found {num_matches} matches')\n    matches_im1 = pts2d_list[1][reciprocal_in_P2]\n    matches_im0 = pts2d_list[0][nn2_in_P1][reciprocal_in_P2]\n\n    # visualize a few matches\n    import numpy as np\n    from matplotlib import pyplot as pl\n    n_viz = 10\n    match_idx_to_viz = np.round(np.linspace(0, num_matches-1, n_viz)).astype(int)\n    viz_matches_im0, viz_matches_im1 = matches_im0[match_idx_to_viz], matches_im1[match_idx_to_viz]\n\n    H0, W0, H1, W1 = *imgs[0].shape[:2], *imgs[1].shape[:2]\n    img0 = np.pad(imgs[0], ((0, max(H1 - H0, 0)), (0, 0), (0, 0)), 'constant', constant_values=0)\n    img1 = np.pad(imgs[1], ((0, max(H0 - H1, 0)), (0, 0), (0, 0)), 'constant', constant_values=0)\n    img = np.concatenate((img0, img1), axis=1)\n    pl.figure()\n    pl.imshow(img)\n    cmap = pl.get_cmap('jet')\n    for i in range(n_viz):\n        (x0, y0), (x1, y1) = viz_matches_im0[i].T, viz_matches_im1[i].T\n        pl.plot([x0, x1 + W0], [y0, y1], '-+', color=cmap(i \u002F (n_viz - 1)), scalex=False, scaley=False)\n    pl.show(block=True)\n\n```\n![matching example on croco pair](assets\u002Fmatching.jpg)\n\n## Training\n\nIn this section, we present a short demonstration to get started with training DUSt3R.\n\n### Datasets\nAt this moment, we have added the following training datasets:\n  - [CO3Dv2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco3d) - [Creative Commons Attribution-NonCommercial 4.0 International](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco3d\u002Fblob\u002Fmain\u002FLICENSE)\n  - [ARKitScenes](https:\u002F\u002Fgithub.com\u002Fapple\u002FARKitScenes) - [Creative Commons Attribution-NonCommercial-ShareAlike 4.0](https:\u002F\u002Fgithub.com\u002Fapple\u002FARKitScenes\u002Ftree\u002Fmain?tab=readme-ov-file#license)\n  - [ScanNet++](https:\u002F\u002Fkaldir.vc.in.tum.de\u002Fscannetpp\u002F) - [non-commercial research and educational purposes](https:\u002F\u002Fkaldir.vc.in.tum.de\u002Fscannetpp\u002Fstatic\u002Fscannetpp-terms-of-use.pdf)\n  - [BlendedMVS](https:\u002F\u002Fgithub.com\u002FYoYo000\u002FBlendedMVS) - [Creative Commons Attribution 4.0 International License](https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby\u002F4.0\u002F)\n  - [WayMo Open dataset](https:\u002F\u002Fgithub.com\u002Fwaymo-research\u002Fwaymo-open-dataset) - [Non-Commercial Use](https:\u002F\u002Fwaymo.com\u002Fopen\u002Fterms\u002F)\n  - [Habitat-Sim](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fhabitat-sim\u002Fblob\u002Fmain\u002FDATASETS.md)\n  - [MegaDepth](https:\u002F\u002Fwww.cs.cornell.edu\u002Fprojects\u002Fmegadepth\u002F)\n  - [StaticThings3D](https:\u002F\u002Fgithub.com\u002Flmb-freiburg\u002Frobustmvd\u002Fblob\u002Fmaster\u002Frmvd\u002Fdata\u002FREADME.md#staticthings3d)\n  - [WildRGB-D](https:\u002F\u002Fgithub.com\u002Fwildrgbd\u002Fwildrgbd\u002F)\n\nFor each dataset, we provide a preprocessing script in the `datasets_preprocess` directory and an archive containing the list of pairs when needed.\nYou have to download the datasets yourself from their official sources, agree to their license, download our list of pairs, and run the preprocessing script.\n\nLinks:  \n  \n[ARKitScenes pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Farkitscenes_pairs.zip)  \n[ScanNet++ v1 pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fscannetpp_pairs.zip)  \n[ScanNet++ v2 pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fscannetpp_v2_pairs.zip)  \n[BlendedMVS pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fblendedmvs_pairs.npy)  \n[WayMo Open dataset pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fwaymo_pairs.npz)  \n[Habitat metadata](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fhabitat_5views_v1_512x512_metadata.tar.gz)  \n[MegaDepth pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fmegadepth_pairs.npz)  \n[StaticThings3D pairs](https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FDUSt3R\u002Fstaticthings_pairs.npy)  \n\n> [!NOTE]\n> They are not strictly equivalent to what was used to train DUSt3R, but they should be close enough.\n\n### Demo\nFor this training demo, we're going to download and prepare a subset of [CO3Dv2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco3d) - [Creative Commons Attribution-NonCommercial 4.0 International](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco3d\u002Fblob\u002Fmain\u002FLICENSE) and launch the training code on it.\nThe demo model will be trained for a few epochs on a very small dataset.\nIt will not be very good.\n\n```bash\n# download and prepare the co3d subset\nmkdir -p data\u002Fco3d_subset\ncd data\u002Fco3d_subset\ngit clone https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco3d\ncd co3d\npython3 .\u002Fco3d\u002Fdownload_dataset.py --download_folder ..\u002F --single_sequence_subset\nrm ..\u002F*.zip\ncd ..\u002F..\u002F..\n\npython3 datasets_preprocess\u002Fpreprocess_co3d.py --co3d_dir data\u002Fco3d_subset --output_dir data\u002Fco3d_subset_processed  --single_sequence_subset\n\n# download the pretrained croco v2 checkpoint\nmkdir -p checkpoints\u002F\nwget https:\u002F\u002Fdownload.europe.naverlabs.com\u002FComputerVision\u002FCroCo\u002FCroCo_V2_ViTLarge_BaseDecoder.pth -P checkpoints\u002F\n\n# the training of dust3r is done in 3 steps.\n# for this example we'll do fewer epochs, for the actual hyperparameters we used in the paper, see the next section: \"Our Hyperparameters\"\n# step 1 - train dust3r for 224 resolution\ntorchrun --nproc_per_node=4 train.py \\\n    --train_dataset \"1000 @ Co3d(split='train', ROOT='data\u002Fco3d_subset_processed', aug_crop=16, mask_bg='rand', resolution=224, transform=ColorJitter)\" \\\n    --test_dataset \"100 @ Co3d(split='test', ROOT='data\u002Fco3d_subset_processed', resolution=224, seed=777)\" \\\n    --model \"AsymmetricCroCo3DStereo(pos_embed='RoPE100', img_size=(224, 224), head_type='linear', output_mode='pts3d', 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)\" \\\n    --train_criterion \"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion \"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --pretrained \"checkpoints\u002FCroCo_V2_ViTLarge_BaseDecoder.pth\" \\\n    --lr 0.0001 --min_lr 1e-06 --warmup_epochs 1 --epochs 10 --batch_size 16 --accum_iter 1 \\\n    --save_freq 1 --keep_freq 5 --eval_freq 1 \\\n    --output_dir \"checkpoints\u002Fdust3r_demo_224\"\t  \n\n# step 2 - train dust3r for 512 resolution\ntorchrun --nproc_per_node=4 train.py \\\n    --train_dataset \"1000 @ Co3d(split='train', ROOT='data\u002Fco3d_subset_processed', aug_crop=16, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter)\" \\\n    --test_dataset \"100 @ Co3d(split='test', ROOT='data\u002Fco3d_subset_processed', resolution=(512,384), seed=777)\" \\\n    --model \"AsymmetricCroCo3DStereo(pos_embed='RoPE100', patch_embed_cls='ManyAR_PatchEmbed', img_size=(512, 512), head_type='linear', output_mode='pts3d', 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)\" \\\n    --train_criterion \"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion \"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --pretrained \"checkpoints\u002Fdust3r_demo_224\u002Fcheckpoint-best.pth\" \\\n    --lr 0.0001 --min_lr 1e-06 --warmup_epochs 1 --epochs 10 --batch_size 4 --accum_iter 4 \\\n    --save_freq 1 --keep_freq 5 --eval_freq 1 \\\n    --output_dir \"checkpoints\u002Fdust3r_demo_512\"\n\n# step 3 - train dust3r for 512 resolution with dpt\ntorchrun --nproc_per_node=4 train.py \\\n    --train_dataset \"1000 @ Co3d(split='train', ROOT='data\u002Fco3d_subset_processed', aug_crop=16, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter)\" \\\n    --test_dataset \"100 @ Co3d(split='test', ROOT='data\u002Fco3d_subset_processed', resolution=(512,384), seed=777)\" \\\n    --model \"AsymmetricCroCo3DStereo(pos_embed='RoPE100', patch_embed_cls='ManyAR_PatchEmbed', img_size=(512, 512), head_type='dpt', output_mode='pts3d', 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)\" \\\n    --train_criterion \"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion \"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --pretrained \"checkpoints\u002Fdust3r_demo_512\u002Fcheckpoint-best.pth\" \\\n    --lr 0.0001 --min_lr 1e-06 --warmup_epochs 1 --epochs 10 --batch_size 2 --accum_iter 8 \\\n    --save_freq 1 --keep_freq 5 --eval_freq 1 --disable_cudnn_benchmark \\\n    --output_dir \"checkpoints\u002Fdust3r_demo_512dpt\"\n\n```\n\n### Our Hyperparameters\n\nHere are the commands we used for training the models:\n\n```bash\n# NOTE: ROOT path omitted for datasets\n# 224 linear\ntorchrun --nproc_per_node 8 train.py \\\n    --train_dataset=\" + 100_000 @ Habitat(1_000_000, split='train', aug_crop=16, resolution=224, transform=ColorJitter) + 100_000 @ BlendedMVS(split='train', aug_crop=16, resolution=224, transform=ColorJitter) + 100_000 @ MegaDepth(split='train', aug_crop=16, resolution=224, transform=ColorJitter) + 100_000 @ ARKitScenes(aug_crop=256, resolution=224, transform=ColorJitter) + 100_000 @ Co3d(split='train', aug_crop=16, mask_bg='rand', resolution=224, transform=ColorJitter) + 100_000 @ StaticThings3D(aug_crop=256, mask_bg='rand', resolution=224, transform=ColorJitter) + 100_000 @ ScanNetpp(split='train', aug_crop=256, resolution=224, transform=ColorJitter) + 100_000 @ InternalUnreleasedDataset(aug_crop=128, resolution=224, transform=ColorJitter) \" \\\n    --test_dataset=\" Habitat(1_000, split='val', resolution=224, seed=777) + 1_000 @ BlendedMVS(split='val', resolution=224, seed=777) + 1_000 @ MegaDepth(split='val', resolution=224, seed=777) + 1_000 @ Co3d(split='test', mask_bg='rand', resolution=224, seed=777) \" \\\n    --train_criterion=\"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion=\"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --model=\"AsymmetricCroCo3DStereo(pos_embed='RoPE100', img_size=(224, 224), head_type='linear', output_mode='pts3d', 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)\" \\\n    --pretrained=\"checkpoints\u002FCroCo_V2_ViTLarge_BaseDecoder.pth\" \\\n    --lr=0.0001 --min_lr=1e-06 --warmup_epochs=10 --epochs=100 --batch_size=16 --accum_iter=1 \\\n    --save_freq=5 --keep_freq=10 --eval_freq=1 \\\n    --output_dir=\"checkpoints\u002Fdust3r_224\"\n\n# 512 linear\ntorchrun --nproc_per_node 8 train.py \\\n    --train_dataset=\" + 10_000 @ Habitat(1_000_000, split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ BlendedMVS(split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ MegaDepth(split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ ARKitScenes(aug_crop=256, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ Co3d(split='train', aug_crop=16, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ StaticThings3D(aug_crop=256, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ ScanNetpp(split='train', aug_crop=256, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ InternalUnreleasedDataset(aug_crop=128, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) \" \\\n    --test_dataset=\" Habitat(1_000, split='val', resolution=(512,384), seed=777) + 1_000 @ BlendedMVS(split='val', resolution=(512,384), seed=777) + 1_000 @ MegaDepth(split='val', resolution=(512,336), seed=777) + 1_000 @ Co3d(split='test', resolution=(512,384), seed=777) \" \\\n    --train_criterion=\"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion=\"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --model=\"AsymmetricCroCo3DStereo(pos_embed='RoPE100', patch_embed_cls='ManyAR_PatchEmbed', img_size=(512, 512), head_type='linear', output_mode='pts3d', 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)\" \\\n    --pretrained=\"checkpoints\u002Fdust3r_224\u002Fcheckpoint-best.pth\" \\\n    --lr=0.0001 --min_lr=1e-06 --warmup_epochs=20 --epochs=100 --batch_size=4 --accum_iter=2 \\\n    --save_freq=10 --keep_freq=10 --eval_freq=1 --print_freq=10 \\\n    --output_dir=\"checkpoints\u002Fdust3r_512\"\n\n# 512 dpt\ntorchrun --nproc_per_node 8 train.py \\\n    --train_dataset=\" + 10_000 @ Habitat(1_000_000, split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ BlendedMVS(split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ MegaDepth(split='train', aug_crop=16, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ ARKitScenes(aug_crop=256, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ Co3d(split='train', aug_crop=16, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ StaticThings3D(aug_crop=256, mask_bg='rand', resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ ScanNetpp(split='train', aug_crop=256, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) + 10_000 @ InternalUnreleasedDataset(aug_crop=128, resolution=[(512, 384), (512, 336), (512, 288), (512, 256), (512, 160)], transform=ColorJitter) \" \\\n    --test_dataset=\" Habitat(1_000, split='val', resolution=(512,384), seed=777) + 1_000 @ BlendedMVS(split='val', resolution=(512,384), seed=777) + 1_000 @ MegaDepth(split='val', resolution=(512,336), seed=777) + 1_000 @ Co3d(split='test', resolution=(512,384), seed=777) \" \\\n    --train_criterion=\"ConfLoss(Regr3D(L21, norm_mode='avg_dis'), alpha=0.2)\" \\\n    --test_criterion=\"Regr3D_ScaleShiftInv(L21, gt_scale=True)\" \\\n    --model=\"AsymmetricCroCo3DStereo(pos_embed='RoPE100', patch_embed_cls='ManyAR_PatchEmbed', img_size=(512, 512), head_type='dpt', output_mode='pts3d', 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)\" \\\n    --pretrained=\"checkpoints\u002Fdust3r_512\u002Fcheckpoint-best.pth\" \\\n    --lr=0.0001 --min_lr=1e-06 --warmup_epochs=15 --epochs=90 --batch_size=4 --accum_iter=2 \\\n    --save_freq=5 --keep_freq=10 --eval_freq=1 --print_freq=10 --disable_cudnn_benchmark \\\n    --output_dir=\"checkpoints\u002Fdust3r_512dpt\"\n\n```\n","DUSt3R 是一个简化几何3D视觉处理的工具。它使用Python开发，通过提供易于使用的接口和强大的算法来实现从2D图像到3D重建的过程。该项目的核心功能包括高效的3D重建、基于几何的图像匹配以及支持多种输入格式（如RGB图像）。DUSt3R特别适合于需要快速且准确地从少量图像中生成3D模型的应用场景，例如虚拟现实、增强现实、机器人导航等领域。此外，其模块化设计允许用户根据具体需求选择或扩展功能，比如结合其他项目提供的深度图或相机姿态信息以进一步提升重建质量。",2,"2026-06-11 03:39:59","high_star"]