naver / dust3r

DUSt3R: Geometric 3D Vision Made Easy

Home Page:https://dust3r.europe.naverlabs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SegFault running the readme example

Ben-Epstein opened this issue · comments

Hey folks, i installed the setup as per the readme, but ran immediately into a segfault when running the inference step.

Code:

from dust3r.inference import inference
from dust3r.model import AsymmetricCroCo3DStereo
from dust3r.utils.image import load_images
from dust3r.image_pairs import make_pairs
from dust3r.cloud_opt import global_aligner, GlobalAlignerMode

device = 'cuda'
batch_size = 1
schedule = 'cosine'
lr = 0.01
niter = 300

model_name = "naver/DUSt3R_ViTLarge_BaseDecoder_512_dpt"
# you can put the path to a local checkpoint in model_name if needed
model = AsymmetricCroCo3DStereo.from_pretrained(model_name).to(device)
# load_images can take a list of images or a directory
images = load_images(['croco/assets/Chateau1.png', 'croco/assets/Chateau2.png'], size=512)
pairs = make_pairs(images, scene_graph='complete', prefilter=None, symmetrize=True)
output = inference(pairs, model, device, batch_size=batch_size)  # seg fault here

Some setup details

nvidia-smi
Wed Jun 12 01:00:04 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.17   Driver Version: 525.105.17   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA L4           Off  | 00000000:00:03.0 Off |                    0 |
| N/A   64C    P0    33W /  72W |      0MiB / 23034MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

Pip list below

pip list
Package                   Version
------------------------- ------------
absl-py                   2.1.0
aiofiles                  23.2.1
altair                    5.3.0
annotated-types           0.7.0
anyio                     4.4.0
attrs                     23.2.0
certifi                   2024.6.2
charset-normalizer        3.3.2
click                     8.1.7
contourpy                 1.2.1
cycler                    0.12.1
dnspython                 2.6.1
einops                    0.8.0
email_validator           2.1.1
exceptiongroup            1.2.1
fastapi                   0.111.0
fastapi-cli               0.0.4
ffmpy                     0.3.2
filelock                  3.14.0
fonttools                 4.53.0
fsspec                    2024.6.0
gradio                    4.36.1
gradio_client             1.0.1
grpcio                    1.64.1
h11                       0.14.0
httpcore                  1.0.5
httptools                 0.6.1
httpx                     0.27.0
huggingface-hub           0.23.3
idna                      3.7
importlib_resources       6.4.0
Jinja2                    3.1.4
jsonschema                4.22.0
jsonschema-specifications 2023.12.1
kiwisolver                1.4.5
Markdown                  3.6
markdown-it-py            3.0.0
MarkupSafe                2.1.5
matplotlib                3.9.0
mdurl                     0.1.2
mpmath                    1.3.0
networkx                  3.3
ninja                     1.11.1.1
numpy                     1.26.4
nvidia-cublas-cu11        11.11.3.6
nvidia-cuda-cupti-cu11    11.8.87
nvidia-cuda-nvrtc-cu11    11.8.89
nvidia-cuda-runtime-cu11  11.8.89
nvidia-cudnn-cu11         8.7.0.84
nvidia-cufft-cu11         10.9.0.58
nvidia-curand-cu11        10.3.0.86
nvidia-cusolver-cu11      11.4.1.48
nvidia-cusparse-cu11      11.7.5.86
nvidia-nccl-cu11          2.20.5
nvidia-nvtx-cu11          11.8.86
opencv-python             4.10.0.82
orjson                    3.10.4
packaging                 24.1
pandas                    2.2.2
pillow                    10.3.0
pillow_heif               0.16.0
pip                       23.0.1
protobuf                  4.25.3
pydantic                  2.7.3
pydantic_core             2.18.4
pydub                     0.25.1
pyglet                    1.5.29
Pygments                  2.18.0
pyparsing                 3.1.2
python-dateutil           2.9.0.post0
python-dotenv             1.0.1
python-multipart          0.0.9
pytz                      2024.1
PyYAML                    6.0.1
referencing               0.35.1
requests                  2.32.3
rich                      13.7.1
roma                      1.5.0
rpds-py                   0.18.1
ruff                      0.4.8
safetensors               0.4.3
scipy                     1.13.1
semantic-version          2.10.0
setuptools                65.5.0
shellingham               1.5.4
six                       1.16.0
sniffio                   1.3.1
starlette                 0.37.2
sympy                     1.12.1
tensorboard               2.17.0
tensorboard-data-server   0.7.2
tomlkit                   0.12.0
toolz                     0.12.1
torch                     2.3.1+cu118
torchvision               0.18.1+cu118
tqdm                      4.66.4
trimesh                   4.4.1
triton                    2.3.1
typer                     0.12.3
typing_extensions         4.12.2
tzdata                    2024.1
ujson                     5.10.0
urllib3                   2.2.1
uvicorn                   0.30.1
uvloop                    0.19.0
watchfiles                0.22.0
websockets                11.0.3
Werkzeug                  3.0.3

Any advice would be really appreciated!