Metadata-Version: 2.4
Name: psifx
Version: 0.2.2
Summary: Psychological and Social Interactions Feature Extraction
Author-email: Guillaume Rochette <guillaume.rochette@unil.ch>, Matthew Vowels <matthew.vowels@unil.ch>, Mathieu Rochat <mathieu.louis.rochat@gmail.com>
Project-URL: homepage, https://github.com/psifx/psifx
Project-URL: documentation, https://psifx.github.io/psifx/
Project-URL: repository, https://github.com/psifx/psifx
Keywords: video,audio,language,machine-learning,pipeline,multimodal
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: whisperx==3.7.4
Requires-Dist: opensmile==2.6.0
Requires-Dist: pyannote.audio==3.3.2
Requires-Dist: pydub==0.25.1
Requires-Dist: speechbrain==1.0.3
Requires-Dist: absolutely-not-scikit-video==1.1.12
Requires-Dist: ffmpeg-python==0.2.0
Requires-Dist: mediapipe==0.10.14
Requires-Dist: ultralytics==8.3.212
Requires-Dist: torch==2.8.0
Requires-Dist: torchvision==0.23.0
Requires-Dist: torchaudio==2.8.0
Requires-Dist: accelerate==1.10.1
Requires-Dist: bitsandbytes==0.49.1
Requires-Dist: transformers==5.3.0
Requires-Dist: huggingface-hub==1.7.1
Requires-Dist: langchain==0.3.27
Requires-Dist: langchain-community==0.3.31
Requires-Dist: langchain-anthropic==0.3.22
Requires-Dist: langchain-openai==0.3.35
Requires-Dist: langchain-ollama==0.3.10
Requires-Dist: ollama==0.6.0
Requires-Dist: matplotlib==3.8.4
Requires-Dist: nltk==3.9.2
Requires-Dist: platformdirs==4.5.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: loguru==0.7.3
Requires-Dist: decord==0.6.0
Requires-Dist: pytest==9.0.0
Provides-Extra: docs
Requires-Dist: furo; extra == "docs"
Requires-Dist: myst_parser; extra == "docs"
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-argparse; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: sphinxcontrib-napoleon; extra == "docs"
Requires-Dist: sphinxcontrib-autoprogram; extra == "docs"
Requires-Dist: snowballstemmer<=2.2.0; extra == "docs"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: rapidfuzz; extra == "dev"
Dynamic: license-file

# `psifx` - <u>P</u>sychological and <u>S</u>ocial <u>I</u>nteractions <u>F</u>eature e<u>X</u>traction

---

*`psifx` is a "plug-and-play" multi-modal feature extraction toolkit, aiming to facilitate and democratize the use of state-of-the-art machine learning techniques for human sciences research.
It is motivated by a need 
(a) to automate and standardize data annotation processes, otherwise involving expensive, lengthy, and inconsistent human labor, such as the transcription or coding of behavior changes from audio and video sources;
(b) to develop and distribute open-source community-driven psychology research software;
(c) to enable large-scale access and ease of use to non-expert users.
The framework contains an array of tools for tasks, such as speaker diarization, closed-caption transcription and translation from audio, as well as body, hand, and facial pose estimation and gaze tracking from video.
The package has been designed with a modular and task-oriented approach, enabling the community to add or update new tools easily.
We strongly hope that this package will provide psychologists a simple and practical solution for efficiently a range of audio, linguistic, and visual features from audio and video, thereby creating new opportunities for in-depth study of real-time behavioral phenomena.*

https://github.com/user-attachments/assets/263affe8-f435-42ee-84c9-cabc1f19efde

This demo clip is not intended for commercial use, and is solely for demonstration in an academic or research context.

## Documentation, Reference & Quickstart

Visit https://psifx.github.io/psifx/

arXiv preprint:  https://www.arxiv.org/abs/2407.10266```


# Setup Instructions for psifx with Local SAM3 Model```

## 1. Clone the SAM3 Model Locally

```bash
git clone https://huggingface.co/facebook/sam3
```

Note: Facebook requires ethical approval to download or access the model online. Creating a local copy avoids this requirement and is the simplest solution.

## 2. Clone the psifx Repository

```bash
git clone https://github.com/BogdanvL/psifx.git
```

## 3. Configure SAM3 Path

Edit the following file:

/psifx/utils/constants.py

Update the SAM3_PATH variable to point to your local SAM3 directory:

```python
SAM3_PATH = "/home/[user_name]/path/to/sam3"
```
The default value is:

```python
SAM3_PATH = "facebook/sam3"
```
This requires automatic authorization via Hugging Face.

## 4. Install System Dependencies
```bash
sudo apt install ffmpeg ubuntu-restricted-extras
```
## 5. Create and Activate Conda Environment

```bash
conda create -y -n psifx-env python=3.11 pip
conda activate psifx-env
```
## 6. Install psifx
```bash
cd /home/[user_name]/psifx
pip install .
```
