Skip to content

Latest commit

 

History

History
276 lines (192 loc) · 8.46 KB

File metadata and controls

276 lines (192 loc) · 8.46 KB
template index.html
comments true
hide
navigation
toc

<style> #hello { margin: 0; } </style>

👋 Hello

We write your reusable computer vision tools. Whether you need to load your dataset from your hard drive, draw detections on an image or video, or count how many detections are in a zone. You can count on us!

💻 Install

You can install supervision in a Python>=3.9 environment.

!!! example "Installation"

=== "pip (recommended)"

    [![version](https://badge.fury.io/py/supervision.svg)](https://badge.fury.io/py/supervision)
    [![downloads](https://img.shields.io/pypi/dm/supervision)](https://pypistats.org/packages/supervision)
    [![license](https://img.shields.io/pypi/l/supervision)](../LICENSE.md)
    [![python-version](https://img.shields.io/pypi/pyversions/supervision)](https://badge.fury.io/py/supervision)

    Supervision requires OpenCV. Choose the variant that best fits your needs:

    ⚠️ **Important**: Only install one OpenCV variant at a time. The different `opencv-python` packages (standard, contrib, headless, etc.) are mutually exclusive and cannot coexist in the same environment.

    ```bash
    # Recommended for servers (no GUI)
    pip install supervision[headless]
    ```

    ```bash
    # For desktop applications (includes GUI support)
    pip install supervision[desktop]
    ```

    ```bash
    # For desktop with extra modules (e.g., CSRT tracker)
    pip install supervision[desktop-contrib]
    ```

    ```bash
    # For servers with extra modules (no GUI)
    pip install supervision[headless-contrib]
    ```

    If you already have OpenCV installed:

    ```bash
    pip install supervision
    ```

=== "poetry"

    [![version](https://badge.fury.io/py/supervision.svg)](https://badge.fury.io/py/supervision)
    [![downloads](https://img.shields.io/pypi/dm/supervision)](https://pypistats.org/packages/supervision)
    [![license](https://img.shields.io/pypi/l/supervision)](../LICENSE.md)
    [![python-version](https://img.shields.io/pypi/pyversions/supervision)](https://badge.fury.io/py/supervision)

    ```bash
    # With headless OpenCV (recommended for servers)
    poetry add supervision[headless]
    ```

    ```bash
    # With desktop OpenCV (includes GUI)
    poetry add supervision[desktop]
    ```

    ```bash
    # For desktop with extra modules (e.g., CSRT tracker)
    poetry add supervision[desktop-contrib]
    ```

    ```bash
    # For servers with extra modules (no GUI)
    poetry add supervision[headless-contrib]
    ```

=== "uv"

    [![version](https://badge.fury.io/py/supervision.svg)](https://badge.fury.io/py/supervision)
    [![downloads](https://img.shields.io/pypi/dm/supervision)](https://pypistats.org/packages/supervision)
    [![license](https://img.shields.io/pypi/l/supervision)](../LICENSE.md)
    [![python-version](https://img.shields.io/pypi/pyversions/supervision)](https://badge.fury.io/py/supervision)

    ```bash
    # With headless OpenCV (recommended for servers)
    uv pip install supervision[headless]
    ```

    ```bash
    # For desktop applications (includes GUI support)
    uv pip install supervision[desktop]
    ```

    ```bash
    # For desktop with extra modules (e.g., CSRT tracker)
    uv pip install supervision[desktop-contrib]
    ```

    ```bash
    # For servers with extra modules (no GUI)
    uv pip install supervision[headless-contrib]
    ```

    If you already have OpenCV installed:

    ```bash
    uv pip install supervision
    ```

    For uv projects:

    ```bash
    uv add supervision --extra headless
    ```

=== "rye"

    [![version](https://badge.fury.io/py/supervision.svg)](https://badge.fury.io/py/supervision)
    [![downloads](https://img.shields.io/pypi/dm/supervision)](https://pypistats.org/packages/supervision)
    [![license](https://img.shields.io/pypi/l/supervision)](../LICENSE.md)
    [![python-version](https://img.shields.io/pypi/pyversions/supervision)](https://badge.fury.io/py/supervision)

    ```bash
    # With headless OpenCV (recommended for servers)
    rye add supervision --features headless
    ```

    ```bash
    # For desktop applications (includes GUI support)
    rye add supervision --features desktop
    ```

    ```bash
    # For desktop with extra modules (e.g., CSRT tracker)
    rye add supervision --features desktop-contrib
    ```

    ```bash
    # For servers with extra modules (no GUI)
    rye add supervision --features headless-contrib
    ```

!!! example "conda/mamba install"

=== "conda"

    [![conda-recipe](https://img.shields.io/badge/recipe-supervision-green.svg)](https://anaconda.org/conda-forge/supervision) [![conda-downloads](https://img.shields.io/conda/dn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision) [![conda-version](https://img.shields.io/conda/vn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision) [![conda-platforms](https://img.shields.io/conda/pn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision)

    ```bash
    conda install -c conda-forge supervision
    ```

=== "mamba"

    [![mamba-recipe](https://img.shields.io/badge/recipe-supervision-green.svg)](https://anaconda.org/conda-forge/supervision) [![mamba-downloads](https://img.shields.io/conda/dn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision) [![mamba-version](https://img.shields.io/conda/vn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision) [![mamba-platforms](https://img.shields.io/conda/pn/conda-forge/supervision.svg)](https://anaconda.org/conda-forge/supervision)

    ```bash
    mamba install -c conda-forge supervision
    ```

!!! example "git clone (for development)"

=== "virtualenv"

    ```bash
    # clone repository and navigate to root directory
    git clone --depth 1 -b develop https://github.com/roboflow/supervision.git
    cd supervision

    # setup python environment and activate it
    python3 -m venv venv
    source venv/bin/activate
    pip install --upgrade pip

    # installation
    pip install -e "."
    ```

=== "uv"

    ```bash
    # clone repository and navigate to root directory
    git clone --depth 1 -b develop https://github.com/roboflow/supervision.git
    cd supervision

    # setup python environment and activate it
    uv venv
    source .venv/bin/activate

    # installation
    uv pip install -r pyproject.toml -e . --all-extras

    ```

🚀 Quickstart