Installation¶
We recommend using Docker for reducing compatibility issues.
Docker¶
Install Docker Engine and make sure to follow the post-install instructions. Otherwise, install Docker Desktop.
If you have a GPU and want to use it to accelerate compute:
Install NVIDIA CUDA Toolkit.
Install NVIDIA Container Toolkit.
For SAM3, request access to facebook/sam3, then create a Hugging Face read token from that account. Store your own token in a local
.envfile asHF_TOKEN=.... This file is supplied at runtime and is not included in the image.Run a published image (0.2.4 or newer includes OSNet identity correction dependencies):
export PSIFX_VERSION="0.2.4" # Available after the 0.2.4 release is published export DATA_PATH="/path/to/data" docker run \ --user $(id -u):$(id -g) \ --gpus all \ --env-file .env \ --mount type=bind,source=$DATA_PATH,target=$DATA_PATH \ --interactive \ --tty \ psifx/psifx:$PSIFX_VERSION
Omit
--gpus allfor CPU-only use. The first SAM3 and OSNet runs download model weights; reuse writable Hugging Face and Torch caches for subsequent runs.Check out
psifxavailable commands!psifx --all-help
Local¶
Install the following system-wide:
sudo apt install ffmpeg ubuntu-restricted-extras
Create a dedicated
condaenvironment following the instructions in that order:conda create -y -n psifx-env python=3.11 pip conda activate psifx-env
Install
psifx:pip install 'psifx @ git+https://github.com/psifx/psifx.git'
or
pip install psifx
For SAM3 identity correction with OSNet, install the optional extra:
pip install 'psifx[reid]'
For a source install, use
pip install '.[reid]'from the checkout. Without the extra, correction warns and falls back to color-only matching.[Optional] We use OpenFace for face inference in videos. The instructions to install OpenFace are in the Video Processing Guide - Face section.
[Optional] Language models are required for the text tools. The installation instructions for each models provider are in the Text Processing Guide - Model section.
For SAM3, supply your own model-approved Hugging Face token through
HF_TOKENor--api_token. The CLI does not prompt or automatically load.env. To load a trusted local.envin Bash:set -a source .env set +a
A complete downloaded model can instead be passed with
--model_path. See the SAM3 guide for output directories, options, and limitations.