vye16 / slahmr

MIT License
452 stars 50 forks source link

Project Instructions #2

Closed qiqiApink closed 1 year ago

qiqiApink commented 1 year ago

I want to try your code on my video. Can you provide more detailed instructions? It's hard to run your code.

soyaoki commented 1 year ago

(1) create environment

(2) edit "video.yaml" (https://github.com/vye16/slahmr/blob/main/slahmr/confs/data/video.yaml)

(3) run 'python run_opt.py data=video run_opt=True run_vis=True'

(4) results are output to slahmr\outputs\logs

image

qiqiApink commented 1 year ago

Actually, I want to know how to run launch_phalp.py and launch_slam.py first. Btw, some of the folder name mismatch with your code.

geopavlakos commented 1 year ago

If you want to run on your own RGB video, then the instructions that @soyaoki gave are accurate. After creating the environment, you need to edit the video.yaml file to specify the path of the video. Then you can run the command python run_opt.py data=video run_opt=True run_vis=True, which will take care of running PHALP and DROID-SLAM. Also, the typos in the paths should be fixed now.

ericwang0701 commented 1 year ago

I successfully created the environment and modified the video path in the video.yaml. However, when I run the python run_opt.py data=video run_opt=True run_vis=True, I ran into out-of-memory issue on my PC and I used PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512 to pass it. But then I got a segmentation fault error.

But it seems that some data was generated from Phalp, so I ran python run_opt.py data=video run_opt=True run_vis=True ,again but I encountered the following error

  File "/home/eric-gtxrar/documents/slahmr/third-party/DROID-SLAM/droid_slam/factor_graph.py", line 374, in add_proximity_factors
    ii, jj = torch.as_tensor(es, device=self.device).unbind(dim=-1)
ValueError: not enough values to unpack (expected 2, got 0)

Are there any important attributes in the video.yaml that I need to change? Any suggestions on how to fix it would be really appreciated. Thanks

xangs commented 1 year ago

Hi! I have the following problem when trying to launch: python run_opt.py data=video run_opt=True run_vis=True - But there is no "_DATA/hmar_v2_weights.pth" file on this link

Downloading file: hmar_v2_weights.pth Cached Downloading: _DATA/hmar_v2_weights.pth Access denied with the following error: Cannot retrieve the public link of the file. https://drive.google.com/uc?id=1_wZcPv8MxPoZyEGA9rI5ayXiB7Fhhj4b FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/gdown/tmpi655gyr3/dl' -> '_DATA/hmar_v2_weights.pth'

ericwang0701 commented 1 year ago

@xangs I think I solved that issue by updating the gdown. try this pip install --upgrade gdown