Data Science and Artificial Intelligence

Différences entre les versions de « Deep Learning Tutorial 2019 installations »

De Data Science and Artificial Intelligence
Aller à la navigation Aller à la recherche
m
m
Ligne 20 : Ligne 20 :
 
<h5><u>Using personal computer </u></h5>
 
<h5><u>Using personal computer </u></h5>
 
A. Download and install Anaconda
 
A. Download and install Anaconda
<div class="toccolours mw-collapsible" style="width:70%; margin-left:70px; overflow:auto;" >
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<i>Follow the underlisted steps to install Anaconda distribution in Linux (Ubuntu):<i>
+
<i>Follow the underlisted steps to install Anaconda distribution in Linux (Ubuntu):</i>
 
# cd /tmp
 
# cd /tmp
 
# curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
 
# curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
Ligne 30 : Ligne 30 :
 
# conda list
 
# conda list
  
<br> <i>Follow the underlisted steps to install Anaconda distribution in Windows<i>:
+
<br> <i>Follow the underlisted steps to install Anaconda distribution in Windows</i>:
 
# coming soon ...
 
# coming soon ...
 
</div></div>
 
</div></div>
  
 
B. Create virtual environment
 
B. Create virtual environment
<div class="toccolours mw-collapsible" style="width:70%; margin-left:70px; overflow:auto;" >
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<i>We will use the name `dsai` for thi purpose (if you choose a different name, endeavour to be consistent</i>:
+
<i>We will use the name `dsai` for thi purpose (if you choose a different name, endeavour to be consistent)</i>:
 
# conda create --name dsai
 
# conda create --name dsai
 
# source activate dsai
 
# source activate dsai
Ligne 43 : Ligne 43 :
  
 
C. Install packages
 
C. Install packages
<div class="toccolours mw-collapsible" style="width:70%; margin-left:70px; overflow:auto;" >
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
<i>Install PyTorch and Tensorflow packages. Depending on your system, you can install either the cpu or gpu version. Do not install both:</i>
 
<i>Install PyTorch and Tensorflow packages. Depending on your system, you can install either the cpu or gpu version. Do not install both:</i>
Ligne 58 : Ligne 58 :
 
# conda install -c anaconda scipy==1.1.0
 
# conda install -c anaconda scipy==1.1.0
 
# conda install -c conda-forge opencv tqdm
 
# conda install -c conda-forge opencv tqdm
 +
# conda install -c anaconda opencv3
 +
# conda install -c anaconda matplotlib
 +
# conda install -c anaconda pillow
 +
# conda install -c anaconda scikit-learn
 +
# conda install -c anaconda scikit-image
  
 
<i>For editor, install either jupyter notebook or jupyter lab:</i>
 
<i>For editor, install either jupyter notebook or jupyter lab:</i>
Ligne 64 : Ligne 69 :
 
# conda install -c conda-forge jupyterlab
 
# conda install -c conda-forge jupyterlab
 
<i> You may need to have other editors like notebook, sublime text, vscode, spyder, etc., if you wish.</i>
 
<i> You may need to have other editors like notebook, sublime text, vscode, spyder, etc., if you wish.</i>
 
<i>Execute check_packages.sh to see any missing package:</i>
 
# chmod +x check_packages.sh
 
# ./check_packages.sh
 
<i>See the output of the bash file to install missing packages.</i>
 
 
</div></div>
 
</div></div>
 
 
 
  
  
 
<h3> Downloads</h3>
 
<h3> Downloads</h3>
 +
There are 3 resources to download:
 +
* Codes
 +
* Models
 +
* Dataset
  
<h3> Configurations </h3>
+
A. Codes
 
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
 
* <b><big>Installation guide</big> </b><hr>
 
Open a terminal and type and execute the following commands:
 
<div class="toccolours mw-collapsible" style="width:90%; overflow:auto;">
 
<div style="font-weight:bold;line-height:1.6;">Anaconda</div>
 
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install Anaconda distribution in Ubuntu:
+
<i>clone the git repository:</i>:
# cd /tmp
+
# git clone https://icube-forge.unistra.fr/CAMMA/misc/dsai_dl_tutorial.git
# curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
+
# cd dsai_dl_tutorial
# sha256sum Anaconda3-2019.03-Linux-x86_64.sh
 
# bash Anaconda3-2019.03-Linux-x86_64.sh
 
# source ~/.bashrc
 
# conda list
 
 
</div></div>
 
</div></div>
  
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
B. Models
<div style="font-weight:bold;line-height:1.6;">Python 3 virtual environment</div>
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install:
+
<i>Navigate to the model directory and run the download.sh bash file:</i>:
# conda create --name dsai python=3
+
# cd models
# conda activate dsai
+
# chmod +x download.sh
 +
# ./download.sh
 
</div></div>
 
</div></div>
  
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
B. Dataset
<div style="font-weight:bold;line-height:1.6;">TensorFlow</div>
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install:
+
<i>Navigate to the dataset directory and run the download.sh bash file:</i>:
# conda install -c aaronzs tensorflow-gpu=1.10
+
# cd ../dataset
# conda update conda
+
# chmod +x download.sh
 +
# ./download.sh
 
</div></div>
 
</div></div>
  
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
 
<div style="font-weight:bold;line-height:1.6;">Jupyter Notebook</div>
 
<div class="mw-collapsible-content">
 
Follow the following steps to install:
 
# conda install -c anaconda jupyter
 
</div></div>
 
  
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
 
<div style="font-weight:bold;line-height:1.6;">Other Libraries</div>
+
<h3> Configurations </h3>
 +
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install:
+
<i>Ensure every installation is completed successfully and every resources downloaded to their appropriate directory:</i>:
# conda install -c anaconda opencv3
+
<i>Execute check_packages.sh to see any missing package:</i>
# conda install -c anaconda matplotlib
+
# cd ..
# conda install -c anaconda pillow
+
# chmod +x check_packages.sh
# conda install -c anaconda scikit-learn
+
# ./check_packages.sh
# conda install -c anaconda scikit-image
+
<i>See the output of the bash file to install missing packages.</i>
</div></div>
 
 
 
  
<br><br>
+
<i>Run either jupyter notebook or jupyter lab to view/run the tutorial notebooks</i>
* <b><big> Tutorial dataset</big></b><hr>
+
#jupyter notebook
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
Or,
<div style="font-weight:bold;line-height:1.6;">Object Recognition</div>
+
#jupyter lab
<div class="mw-collapsible-content">
+
<i>If you completed up to this step, you are ready!</i>
Follow the following steps to install
 
 
</div></div>
 
</div></div>
  
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
<h5><u>Using Google Colab (alternative)</u></h5>
<div style="font-weight:bold;line-height:1.6;">Pose Estimation</div>
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install
+
<i>Navigate to the dataset directory and run the download.sh bash file:</i>:
 +
* Login to your google account; open google drive
 +
* Download this folder: (link will be provided soon)
 +
* unzip the folder and upload to your google drive
 +
* Go to your google drive > dsai_tutorial_2019
 +
* open setup_mount.ipynb; run first and second cell to mount the drive and to create a symlink
 +
* open respective notebooks instructed by the instructors
 
</div></div>
 
</div></div>
  
  
<br><br>
 
* <b><big> Git repository</big></b><hr />
 
  
  

Version du 6 septembre 2019 à 12:16

Instructions


Participants needs to complete the 3 following instructions before the tutorial kick off date:

  • Installations
  • Download resources
  • Configurations



Installations


There are 2 options:

  1. Using personal computer
  2. Using Google Colab (alternative)



Using personal computer

A. Download and install Anaconda

Follow the underlisted steps to install Anaconda distribution in Linux (Ubuntu):

  1. cd /tmp
  2. curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
  3. sha256sum Anaconda3-2019.03-Linux-x86_64.sh
  4. bash Anaconda3-2019.03-Linux-x86_64.sh
  5. source ~/.bashrc
  6. conda list


Follow the underlisted steps to install Anaconda distribution in Windows:

  1. coming soon ...

B. Create virtual environment

We will use the name `dsai` for thi purpose (if you choose a different name, endeavour to be consistent):

  1. conda create --name dsai
  2. source activate dsai

C. Install packages

Install PyTorch and Tensorflow packages. Depending on your system, you can install either the cpu or gpu version. Do not install both:

  1. conda install pytorch torchvision cpuonly -c pytorch # for cpu
  2. conda install -c aaronzs tensorflow=1.10

Or;

  1. conda install pytorch torchvision cudatoolkit=9.2 -c pytorch # for gpu with cuda 9.2
  2. conda install -c aaronzs tensorflow-gpu=1.10

Install python libraries:

  1. conda install numpy matplotlib
  2. pip install torchsummary
  3. conda install -c anaconda scipy==1.1.0
  4. conda install -c conda-forge opencv tqdm
  5. conda install -c anaconda opencv3
  6. conda install -c anaconda matplotlib
  7. conda install -c anaconda pillow
  8. conda install -c anaconda scikit-learn
  9. conda install -c anaconda scikit-image

For editor, install either jupyter notebook or jupyter lab:

  1. conda install -c anaconda jupyter

Or;

  1. conda install -c conda-forge jupyterlab

You may need to have other editors like notebook, sublime text, vscode, spyder, etc., if you wish.


Downloads

There are 3 resources to download:

  • Codes
  • Models
  • Dataset

A. Codes

clone the git repository::

  1. git clone https://icube-forge.unistra.fr/CAMMA/misc/dsai_dl_tutorial.git
  2. cd dsai_dl_tutorial

B. Models

Navigate to the model directory and run the download.sh bash file::

  1. cd models
  2. chmod +x download.sh
  3. ./download.sh

B. Dataset

Navigate to the dataset directory and run the download.sh bash file::

  1. cd ../dataset
  2. chmod +x download.sh
  3. ./download.sh


Configurations

Ensure every installation is completed successfully and every resources downloaded to their appropriate directory:: Execute check_packages.sh to see any missing package:

  1. cd ..
  2. chmod +x check_packages.sh
  3. ./check_packages.sh

See the output of the bash file to install missing packages.

Run either jupyter notebook or jupyter lab to view/run the tutorial notebooks

  1. jupyter notebook

Or,

  1. jupyter lab

If you completed up to this step, you are ready!

Using Google Colab (alternative)

Navigate to the dataset directory and run the download.sh bash file::

  • Login to your google account; open google drive
  • Download this folder: (link will be provided soon)
  • unzip the folder and upload to your google drive
  • Go to your google drive > dsai_tutorial_2019
  • open setup_mount.ipynb; run first and second cell to mount the drive and to create a symlink
  • open respective notebooks instructed by the instructors





  • Reference materials
Lecture Notes and Slides

Follow the following steps to install

Reference papers and web resources

Follow the following steps to install




  • Survey




  • Exercises