Skip to content

Commit d5613b0

Browse files
Adding environment requirements
1 parent 7497842 commit d5613b0

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

KITTI/trainer.py

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
import datasets
2828

29-
from IPython import embed
30-
3129

3230
class Trainer:
3331
def __init__(self, options):

NYUv2/model.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ def __init__(self, opts):
3535
self.use_sparse = False
3636

3737
if opts.use_wavelets:
38-
if opts.use_sparse:
39-
self.use_sparse = True
40-
if opts.use_224:
41-
raise NotImplementedError
38+
try:
39+
if opts.use_sparse:
40+
self.use_sparse = True
41+
if opts.use_224:
42+
raise NotImplementedError
43+
except AttributeError:
44+
opts.use_sparse = False
45+
self.use_sparse = False
4246

47+
if opts.use_sparse:
4348
self.decoder = SparseDecoderWave(enc_features=self.encoder.num_ch_enc, decoder_width=decoder_width)
4449
else:
4550
if opts.use_224:

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,24 @@ are then replaced with **sparse** ones.
3838

3939
This is because the network first needs to learn to predict sparse wavelet coefficients before we can use sparse convolutions.
4040

41+
## 🗂 Environment Requirements 🗂 ##
42+
43+
We recommend creating a new Anaconda environment to use WaveletMonoDepth. Use the following to setup a new environment:
44+
45+
```
46+
conda env create -f environment.yml
47+
conda activate wavelet-mdp
48+
```
49+
50+
Our work uses [Pytorch Wavelets](https://github.com/fbcotter/pytorch_wavelets), a great package from Fergal Cotter
51+
which implements the Inverse Discrete Wavelet Transform (IDWT) used in our work, and a lot more!
52+
To install Pytorch Wavelets, simply run:
53+
```
54+
git clone https://github.com/fbcotter/pytorch_wavelets
55+
cd pytorch_wavelets
56+
pip install .
57+
```
58+
4159
## 🚗🚦 KITTI 🌳🛣
4260
[Depth Hints](https://github.com/nianticlabs/depth-hints) was used as a baseline for KITTI.
4361

environment.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: wavelet-mdp
2+
channels:
3+
- default
4+
- pytorch
5+
- conda-forge
6+
dependencies:
7+
- opencv=3.4.2
8+
- matplotlib=3.1.2
9+
- numpy=1.19.5
10+
- scikit-learn=0.24.2
11+
- pip
12+
- pip:
13+
- Pillow==6.2.1
14+
- tensorboardX==1.5
15+
- scikit-image==0.16.2
16+
- torch==1.7.1
17+
- torchvision==0.8.2

0 commit comments

Comments
 (0)