Installation

Download

You can download pysegcnn from this repository’s website or alternatively use git from terminal:

git clone https://gitlab.inf.unibz.it/REMSEN/ccisnow/pysegcnn.git

This creates a copy of the repository in your current directory on the file system.

Conda

To install pysegcnn, I recommend to use the conda package manager. You can download conda here. Once successfully installed conda, I recommend to add conda-forge as your default channel:

conda config --add channels conda-forge

Conda environments

To install pysegcnn, I recommend to create a specific conda environment, by using the provided environment.yml file. In a terminal, navigate to the cloned git repositories root directory (/pysegcnn) and type:

conda env create -f environment.yml

This may take a while. The above command creates a conda environment with all required dependencies except the pytorch package. The first line in environment.yml defines the environment name, in this case pysegcnn. Activate your environment using:

conda activate pysegcnn

Install PyTorch

The installation of pytorch is heavily dependent on the hardware of your machine. Therefore, after activating your environment, install the version of PyTorch that your system supports by following the official instructions.

If you have to build pytorch from source, follow this guide.

Here is how to check if pytorch is installed correctly.

Install PySegCNN

To finally install pysegcnn run the below command from this repositories root directory within the activated ``pysegcnn`` conda environment:

pip install -e .

If successful, you should be able to import pysegcnn from any Python interpreter using:

import pysegcnn