Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Readme.md, Edit setup.py and minor update #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ This is not an officially endorsed Google product.
## Installation
1. Clone the repo using the `--recursive` flag
```bash
git clone --recursive https://github.com/eriksandstroem/splat-slam-private.git
git clone --recursive https://github.com/eriksandstroem/splat-slam.git
cd splat-slam-private
```
2. Creating a new conda environment.
```bash
conda create --name splat-slam python=3.10
conda activate splat-slam
```
3. Install CUDA 11.7 using conda and pytorch 1.12
3. Install CUDA 11.7 using conda and pytorch 1.13.1
```bash
conda install conda-forge::cudatoolkit-dev=11.7.0
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
```
> Now make sure that "which python" points to the correct python
executable. Also test that cuda is available
Expand Down
3 changes: 2 additions & 1 deletion configs/Replica/replica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ cam:
W_out: 640

data:
output: /cluster/work/cvl/esandstroem/src/splat-slam/output/Replica
image_dir: /home/lbg030/Documents/Dataset/Replica/orig/Replica
output: /home/lbg030/Desktop/slam/Splat-SLAM
18 changes: 11 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@
ROOT = osp.dirname(osp.abspath(__file__))

setup(
name='droid_backends',
name='g_droid_backends',
ext_modules=[
CUDAExtension('droid_backends',
include_dirs=[osp.join(ROOT, 'thirdparty/eigen')],
CUDAExtension('g_droid_backends',
include_dirs=[osp.join(ROOT, 'thirdparty/lietorch/eigen')],
sources=[
'src/lib/droid.cpp',
'src/lib/droid_kernels.cu',
'src/lib/correlation_kernels.cu',
'src/lib/altcorr_kernel.cu',
# 'src/lib/droid.cpp',
# 'src/lib/droid_kernels.cu',
# 'src/lib/correlation_kernels.cu',
# 'src/lib/altcorr_kernel.cu',
'thirdparty/glorie_slam/lib/droid.cpp',
'thirdparty/glorie_slam/lib/droid_kernels.cu',
'thirdparty/glorie_slam/lib/correlation_kernels.cu',
'thirdparty/glorie_slam/lib/altcorr_kernel.cu',
],
extra_compile_args={
'cxx': ['-O3'],
Expand Down
6 changes: 3 additions & 3 deletions src/utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ def __init__(self, cfg, device='cuda:0'):
cfg['cam']['distortion']) if 'distortion' in cfg['cam'] else None

# retrieve input folder as temporary folder
tmpdir = os.environ.get('TMPDIR')
self.input_folder = tmpdir + '/' + cfg['data']['input_folder']
# tmpdir = os.environ.get('TMPDIR')
img_dir = cfg['data']['image_dir']
self.input_folder = os.path.join(img_dir, cfg['data']['input_folder'])


def __len__(self):
return self.n_img

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/glorie_slam/depth_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np
import torch
import lietorch
import droid_backends
import g_droid_backends as droid_backends
import thirdparty.glorie_slam.geom.ba
from torch.multiprocessing import Value

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/glorie_slam/modules/droid_net/corr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import torch
import torch.nn.functional as F

import droid_backends
import g_droid_backends as droid_backends


class CorrSampler(torch.autograd.Function):
Expand Down