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
 
(40 versions intermédiaires par un autre utilisateur non affichées)
Ligne 3 : Ligne 3 :
 
<hr />
 
<hr />
 
<p font-size:120%">
 
<p font-size:120%">
Participants needs to complete the 3 following instructions before the tutorial kick off date:
+
Participants MUST complete the 3 following instructions before the tutorial kick off date:
 
* Installations
 
* Installations
 
* Download resources
 
* Download resources
Ligne 10 : Ligne 10 :
  
 
<div>
 
<div>
 
  
 
<h3> Installations </h3><hr>
 
<h3> Installations </h3><hr>
 
There are 2 options:
 
There are 2 options:
# Using personal computer
+
# Using personal computer (alternative)
# Using Google Colab (alternative)
+
# Using Google Colab (preferred choice)
 +
 
 +
<b>NB: </b><i>Colab is the preference for this tutorial (at least after Tutorial 2) due to the need of a powerful GPU.<br> Nevertheless, participants are encouraged to do the installations on their personal computers in the case of unavailability/downtime of Google Colab for all users at the same time.</i>
 
<br><br>
 
<br><br>
  
Ligne 22 : Ligne 23 :
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; 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>
+
# Download and install Anaconda depending on your OS from https://www.anaconda.com/distribution/#download-section (choose Python 3.6 version)
# cd /tmp
 
# curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
 
# sha256sum Anaconda3-2019.03-Linux-x86_64.sh
 
# bash Anaconda3-2019.03-Linux-x86_64.sh
 
# source ~/.bashrc
 
# conda list
 
 
 
<br> <i>Follow the underlisted steps to install Anaconda distribution in Windows</i>:
 
# coming soon ...
 
 
</div></div>
 
</div></div>
  
Ligne 37 : Ligne 29 :
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; 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 this 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
 
</div></div>
 
</div></div>
 +
  
 
C. Install packages
 
C. Install packages
Ligne 46 : Ligne 39 :
 
<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>
# conda install pytorch torchvision cpuonly -c pytorch # for cpu
+
# conda install pytorch torchvision cpuonly -c pytorch # for cpu; if you don't have gpu
 
# conda install -c aaronzs tensorflow=1.10
 
# conda install -c aaronzs tensorflow=1.10
 
 
Or;
 
Or;
 
# conda install pytorch torchvision cudatoolkit=9.2 -c pytorch # for gpu with cuda 9.2
 
# conda install pytorch torchvision cudatoolkit=9.2 -c pytorch # for gpu with cuda 9.2
Ligne 57 : Ligne 49 :
 
# pip install torchsummary
 
# pip install torchsummary
 
# 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 keras
# conda install -c anaconda opencv3
 
# conda install -c anaconda matplotlib
 
 
# conda install -c anaconda pillow
 
# conda install -c anaconda pillow
 
# conda install -c anaconda scikit-learn
 
# conda install -c anaconda scikit-learn
 
# conda install -c anaconda scikit-image
 
# conda install -c anaconda scikit-image
 +
# pip install comet_ml
  
 
<i>For editor, install either jupyter notebook or jupyter lab:</i>
 
<i>For editor, install either jupyter notebook or jupyter lab:</i>
# conda install -c anaconda jupyter   
+
* conda install -c anaconda jupyter   
 
Or;     
 
Or;     
# 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>
 
 
</div></div>
 
</div></div>
 +
<br><br>
 +
 +
 +
<hr/>
 +
 +
 +
<p><font color=blue>For visualization: install any web browser (e.g.: Google chrome, Mozilla Firefox, Microsoft Edge, Apple Safari, etc.,)</font></p>
  
  
<h3> Downloads</h3>
+
 
 +
<h3> Downloads</h3><hr>
 
There are 3 resources to download:
 
There are 3 resources to download:
 
* Codes
 
* Codes
 
* Models
 
* Models
 
* Dataset
 
* Dataset
 +
<hr/>
  
 
A. Codes
 
A. Codes
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; 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>clone the git repository:</i>:
+
# wget --content-disposition "[link expired]"
# git clone https://icube-forge.unistra.fr/CAMMA/misc/dsai_dl_tutorial.git
+
# unzip dsai_dl_tutorial.zip
 
# cd dsai_dl_tutorial
 
# cd dsai_dl_tutorial
 
</div></div>
 
</div></div>
Ligne 95 : Ligne 94 :
 
</div></div>
 
</div></div>
  
B. Dataset
+
C. Dataset
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; 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>Navigate to the dataset directory and run the download.sh bash file:</i>:
 
<i>Navigate to the dataset directory and run the download.sh bash file:</i>:
# cd ../dataset
+
# cd ../datasets
 
# chmod +x download.sh
 
# chmod +x download.sh
 
# ./download.sh
 
# ./download.sh
 
</div></div>
 
</div></div>
  
 +
D. Slides
 +
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 +
<div class="mw-collapsible-content">
 +
<i>Download the presentation slides:</i>:
 +
# wget --content-disposition "[link expired]"
 +
</div></div>
  
  
<h3> Configurations </h3>
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
 
<div class="mw-collapsible-content">
 
<i>Ensure every installation is completed successfully and every resources downloaded to their appropriate directory:</i>:
 
<i>Execute check_packages.sh to see any missing package:</i>
 
# cd ..
 
# chmod +x check_packages.sh
 
# ./check_packages.sh
 
<i>See the output of the bash file to install missing packages.</i>
 
  
<i>Run either jupyter notebook or jupyter lab to view/run the tutorial notebooks</i>
 
#jupyter notebook
 
Or,
 
#jupyter lab
 
<i>If you completed up to this step, you are ready!</i>
 
</div></div>
 
  
 
<h5><u>Using Google Colab (alternative)</u></h5>
 
<h5><u>Using Google Colab (alternative)</u></h5>
 
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; 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>Navigate to the dataset directory and run the download.sh bash file:</i>:
+
<b>Colab is the preference for this tutorial (at least after Tutorial 2) due to the need of a powerful GPU</b>
* Login to your google account; open google drive
+
* Please make sure you have a working Gmail account with atleast 3GB of free space on your Google Drive.
* Download this folder: (link will be provided soon)
+
* Ensure you have executed correctly the instructions: A, B & C above.
* unzip the folder and upload to your google drive
+
* Upload your '''dsai_dl_tutorial''' folder (''containing the codes, dataset and models'') to your Google drive.
* Go to your google drive > dsai_tutorial_2019
+
* Note the path and update it on the notebook according to instructions provided by the instructor on the tutorial day.
* 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>
  
Ligne 138 : Ligne 127 :
  
  
<br><br>
+
<h3> Configurations </h3><hr>
* <b><big> Reference materials</big></b><hr>
+
<div class="toccolours mw-collapsible" style="width:70%; margin-left:40px; overflow:auto;" >
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
 
<div style="font-weight:bold;line-height:1.6;">Lecture Notes and Slides</div>
 
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Follow the following steps to install  
+
<i>Run check_packages.py to see any missing package. See the output and install any missing packages:</i>
</div></div>
+
* python check_packages.py
<div class="toccolours mw-collapsible mw-collapsed" style="width:90%; overflow:auto;">
+
 
<div style="font-weight:bold;line-height:1.6;">Reference papers and web resources</div>
+
 
<div class="mw-collapsible-content">
+
<i>Run either jupyter notebook or jupyter lab to view/run the tutorial notebooks</i>
Follow the following steps to install
+
* jupyter notebook
</div></div>
+
Or,
 +
* jupyter lab
 +
<i>If you completed up to this step, you are ready!</i>
 +
 
 +
Happy coding... see you soon!
  
  
<br /><br>
+
</div></div>
* <b><big> Survey </big></b><hr />
 
  
  
<br><br>
 
* <b><big> Exercises </big></b><hr>
 
  
 
<br><br>
 
<br><br>
 
</div>
 
</div>

Version actuelle datée du 30 septembre 2019 à 10:34

Instructions


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

  • Installations
  • Download resources
  • Configurations


Installations


There are 2 options:

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

NB: Colab is the preference for this tutorial (at least after Tutorial 2) due to the need of a powerful GPU.
Nevertheless, participants are encouraged to do the installations on their personal computers in the case of unavailability/downtime of Google Colab for all users at the same time.


Using personal computer

A. Download and install Anaconda

  1. Download and install Anaconda depending on your OS from https://www.anaconda.com/distribution/#download-section (choose Python 3.6 version)

B. Create virtual environment

We will use the name `dsai` for this 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; if you don't have gpu
  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 keras
  5. conda install -c anaconda pillow
  6. conda install -c anaconda scikit-learn
  7. conda install -c anaconda scikit-image
  8. pip install comet_ml

For editor, install either jupyter notebook or jupyter lab:

  • conda install -c anaconda jupyter

Or;

  • conda install -c conda-forge jupyterlab






For visualization: install any web browser (e.g.: Google chrome, Mozilla Firefox, Microsoft Edge, Apple Safari, etc.,)


Downloads


There are 3 resources to download:

  • Codes
  • Models
  • Dataset

A. Codes

  1. wget --content-disposition "[link expired]"
  2. unzip dsai_dl_tutorial.zip
  3. 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

C. Dataset

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

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

D. Slides

Download the presentation slides::

  1. wget --content-disposition "[link expired]"



Using Google Colab (alternative)

Colab is the preference for this tutorial (at least after Tutorial 2) due to the need of a powerful GPU

  • Please make sure you have a working Gmail account with atleast 3GB of free space on your Google Drive.
  • Ensure you have executed correctly the instructions: A, B & C above.
  • Upload your dsai_dl_tutorial folder (containing the codes, dataset and models) to your Google drive.
  • Note the path and update it on the notebook according to instructions provided by the instructor on the tutorial day.



Configurations


Run check_packages.py to see any missing package. See the output and install any missing packages:

  • python check_packages.py


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

  • jupyter notebook

Or,

  • jupyter lab

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

Happy coding... see you soon!