### Install pyshepseg from source with pip Source: https://www.pyshepseg.org Install the package from the source directory using pip as a wrapper around setup.py. Requires scikit-learn and numba to be available. ```bash pip install . ``` -------------------------------- ### Install pyshepseg via conda-forge Source: https://www.pyshepseg.org Commands to create a new Conda environment named 'mysegenv' with pyshepseg installed from conda-forge. Run these after installing Conda. ```bash conda config --add channels conda-forge conda config --set channel_priority strict conda create -n mysegenv pyshepseg conda activate mysegenv ``` -------------------------------- ### Basic Shepherd Segmentation with pyshepseg Source: https://www.pyshepseg.org Shows how to import pyshepseg and call doShepherdSegmentation on a multi-band image array. Requires a null value for null pixels; incorrect null handling can degrade segmentation quality. ```python from pyshepseg import shepseg # Read in a multi-band image as a single array, img, # of shape (nBands, nRows, nCols). # Ensure that any null pixels are all set to a known # null value in all bands. Failure to correctly identify # null pixels can result in a poorer quality segmentation. segRes = shepseg.doShepherdSegmentation(img, imgNullVal=nullVal) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.