This project serves as a starting point for anyone who wants to learn how to use PyTorch to perform deep learning tasks, such as image classification, semantic segmentation, etc.
- Download the repository:
# Clone project git clone https://github.com/creatis-myriad/pytorch-hands-on.git cd pytorch-hands-on
- Create a virtual environment (Conda is strongly recommended):
# Create conda environment conda env create -f environment.yaml conda activate pytorch-hands-on
- If you already have a python environment set aside for this project and just want to install the
dependencies, you can do that using the following command:
# Activate your environment: below is an example with conda conda activate <env name> # Install pytorch with conda or pip: below is an example with conda conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia # Install other dependencies pip install -e .
Once you've gone through the setup instructions above, you can start exploring the tutorial's notebooks. We recommend using JupyterLab to run the notebooks, which can be launched by running (from within your environment):
jupyter-lab
When you've launched JupyterLab's web interface, you can simply navigate to any of the tutorials listed below, and follow the instructions in there!
If you want to contribute to the project, then you have to install development dependencies and pre-commit hooks, on top of the basic setup for using the project, detailed above. The pre-commit hooks are there to ensure that any code committed to the repository meets the project's format and quality standards.
# Install development dependencies
pip install -e .[dev]
# Install pre-commit hooks
pre-commit install