Code and data for the summer MR(A)I workshop.
The exercises for this workshop are organized into Jupyter Notebooks which is a way of serving executable Python code on a web page. A local Jupyter server can be run by installing it with Anaconda (or Miniconda), or through the internet using Google's Colaboratory service.
Start by downloading this repository so you have all the code with you: https://github.com/estherpuyol/MRAI_workshop/archive/master.zip
Slides can also be viewed online at https://nbviewer.jupyter.org/github/estherpuyol/MRAI_workshop
We will be using Google Colaboratory to run our notebooks when doing training since a GPU is basically required. You can run the other notebooks locally but everything can be done through Colab if desired.
To get going with Colab:
- Go to https://colab.research.google.com (be sure to be logged into your Google account beforehand)
- Click on the Github tab and enter https://github.com/estherpuyol/MRAI_workshop/ into the search box
- A number of notebooks should appear, double click the one to load
- When the notebook loads we want to switch to using a GPU supported environment, so in the menu go to "Runtime" and then "Change runtime type".
- Choose GPU under hardware accelerator and then click Save.
- You can start using the notebooks by clicking on the run icons to the left of each cell or press ctrl+Enter. (You will get popups about the notebook not being authored by Google and other things, just click Yes to these)
If you want to run locally we need to install Python 3.7, Numpy, PyTorch, Jupyter, and Matplotlib. These can be installed separately through the standard distributions from the sites for each package, or using a managed package system like Anaconda/Miniconda.
The fastest way is with Miniconda:
- Go to https://docs.conda.io/en/latest/miniconda.html and download the Python 3.7 64bit installer for your OS.
- Install Miniconda, checking the box to set the PATH variable
- In the Start Menu, go to "Anaconda3" -> "Anaconda Prompt"
- Type
conda install jupyter pytorch matplotlib scikit-learn
to install the components needed. - To start Jupyter, from this console type
jupyter notebook
The complete but slow way is with Anaconda.
- Go to https://www.anaconda.com/distribution and download the Python 3.7 graphical installer for your OS.
- Install Anaconda, following instructions here: https://docs.anaconda.com/anaconda/install/
- Start the Anaconda Navigator program
- Navigate to "Environments" and click on "base (root)"
- On the right side click "Update index..."
- Once that completes set the drop-down menu to show all and type "Torch" into the search box
- PyTorch 1.0.1 should show up, select it and install
- Return to home and launch Jupyter Notebook. This should bring to your browser with the notebook server running. From here you can navigate to the workshop directory and start a notebook.
- Numpy manual: https://docs.scipy.org/doc/numpy/
- Matplotlib manual: https://matplotlib.org/3.1.0/users/index.html
- PyTorch manual: https://pytorch.org/docs/stable/index.html
- Python tutorial: https://www.python.org/about/gettingstarted
- Python tutorial: http://www.learnpython.org
- Deep Learning course: http://cs231n.github.io/