IRI deep learning project example. This repo contains the code structure I use for all my research. I designed it with the purpose of having a generic framework in which new research ideas could be quickly evaluated. For this particular repo, as an example, the framework has been configured to solve object classification.
If you have any doubt do not hesitate to contact me at apumarola@iri.upc.edu
.
Upgrade system:
sudo apt-get update
sudo apt-get upgrade
sudo apt install nvidia-415*
sudo reboot
- Download miniconda from the oficial website. (Recommended: Python 3.* , 64-bits)
- Install miniconda. (Recommended: use predefined paths and answer yes whenever you are asked yes/no)
bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh
- Create and activate conda environment for the project
conda create -n IRI-DL source activate IRI-DL
- Install Pytorch
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
- Install other rand dependencies
conda install matplotlib opencv pillow scikit-learn scikit-image cython tqdm pip install tensorboardX
- Deactivate environment
conda deactivate
- Create and activate conda environment for tensorboard:
conda create -n tensorboard python=3.6 source activate tensorboard
- Install Tensorflow CPU
pip install tensorflow
- Deactivate environment
conda deactivate
Simply clone the repo:
cd /path/to/desired/folder/
git clone https://github.com/albertpumarola/IRI-DL.git
- Install PyCharm Professional from the official website using your academic email.
- Open Project:
Open->path/to/repo/
- Create desktop entry:
Tools->Create Desktop Entry...
- Set interpreter. In
File->Settings->Project: IRI-DL->Project Interpreter->gear->Add->Conda Environment->Existing environment:
set path to the created environment~/miniconda3/envs/IRI-DL/bin/python
.
-
Add configuration. In the top right
Add Configuration...->+->Python
. Introduce:- Name:
train
- Script Path:
path/to/repo/src/train.py
- Parameters:
--exp_dir experiments/model1/basic_settings
- Environment Variables:
PYTHONUNBUFFERED 1
OMP_NUM_THREADS 4
CUDA_VISIBLE_DEVICES 0
- Python Interpreter:
Python 3.7(IRI-DL)
- Working Directory:
path/to/repo/
- Name:
-
To run train simply press play button. If you prefer running in terminal you can launch
. experiments/prepare_session.sh 0
to set environment variables and then run
python src/train.py --exp_dir experiments/model1/basic_settings
-
To visualize. In a new terminal run:
source activate tensorboard tensorboard --logdir path/to/repo/experiments/model1/basic_settings/
-
To run other experiments simply change the experiment dir (e.g.
experiments/model1/with_vgg_lower_lr
)
- Add configuration. In the top right
Add Configuration...->+->Python
. Introduce:- Name:
test
- Script Path:
path/to/repo/src/test.py
- Parameters:
--exp_dir experiments/model1/basic_settings
- Environment Variables:
PYTHONUNBUFFERED 1
OMP_NUM_THREADS 1
CUDA_VISIBLE_DEVICES 0
- Python Interpreter:
Python 3.7(IRI-DL)
- Working Directory:
path/to/repo/
- Name:
- To run test simply press play button. If you prefer running in terminal you can launch
to set environment variables and then run
. experiments/prepare_session.sh 0
results will be store inpython src/test.py --exp_dir experiments/model1/basic_settings
experiments/model1/basic_settings/test
- To test other experiments simply change the experiment dir (e.g.
experiments/model1/with_vgg_lower_lr
)