Saturday, March 17, 2018

voxnet and shapenet implementation

System:Ubuntu 16.04
NVIDIA Driver Version:390.30
Theano:0.9
python:2.7
Cuda:8.0
Reference:
https://github.com/dimatura/voxnet.git

First Step:
install NVIDIA DRIVER 
system-setting->software updates -> additional drivers->select nvidia driver->apply ->restart
 
Second Step:
install cuda:https://developer.nvidia.com/cuda-80-ga2-download-archive
 dowload deb in your directory, then
  1. `sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb`
  2. `sudo apt-get update`
  3. `sudo apt-get install cuda-8.0`  
  4. 'sudo apt-get install nvidia-cuda-toolkit'
 Third Step:
install voxelnet and dependencies: 
 
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
sudo pip install 'Theano<0.9.0'
sudo pip install Lasagne
sudo pip install path.py
# You need CUDA, I assume it is inside /usr/local/cuda-8.0/

export PATH=/usr/local/cuda-8.0/bin:$PATH # based on https://github.com/dnouri/kfkd-tutorial/issues/8
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64/:$LD_LIBRARY_PATH
git clone https://github.com/dimatura/voxnet.git
cd voxnet
sudo pip install --editable .
cd scripts
./download_shapenet10.sh
THEANO_FLAGS='floatX=float32' python train.py config/shapenet10.py shapenet10_train.tar
 
Note:
 
export PATH=/usr/local/cuda-9.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64/:$LD_LIBRARY_PATH 
THEANO_FLAGS='floatX=float32' python train.py config/shapenet10.py trauma02_train.tar
 
If you are using sudo:
 
sudo env PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH THEANO_FLAGS='floatX=float32' 
python train.py config/shapenet10.py trauma02_train.tar
 
or
sudo env PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY THEANO_FLAGS='floatX=float32,device=gpu0,lib.cnmem=1' 
python train.py config/shapenet10.py trauma02_train.tar 
 
 
 
Error Analysis
1. cannot import downsample
If you prefer to use the newest version of Theano, you could alternatively upgrade Lasagne to 
the development version via 
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip 
 
If still error try to replace downsample to pool as used in newest version of Theano.
 Or downgrade theano and Lasagne to lower version by sudo pip install "theano<0.8" 

No comments:

Post a Comment