Behavioral analysis via self-supervised pretraining of transformers
Project description
beast
Behavioral analysis via self-supervised pretraining of transformers
beast is a package for pretraining vision transformers on unlabeled data to provide backbones
for downstream tasks like pose estimation, action segmentation, and neural encoding.
See the preprint here.
Installation
Step 1: Install ffmpeg
First, check to see if you have ffmpeg installed by typing the following in the terminal:
ffmpeg -version
If not, install:
sudo apt install ffmpeg
Step 2: Create a conda environment
First, install anaconda.
Next, create and activate a conda environment:
conda create --yes --name beast python=3.10
conda activate beast
Step 3: Download and install
Move to your home directory (or wherever you would like to download the code) and install via Github clone or through PyPI.
For Github cloning:
git clone https://github.com/paninski-lab/beast
cd beast
pip install -e .
For installation through PyPI:
pip install beast-backbones
Usage
beast comes with a simple command line interface. To get more information, run
beast -h
Extract frames
Extract frames from a directory of videos to train beast with.
beast extract --input <video_dir> --output <output_dir> [options]
Type "beast extract -h" in the terminal for details on the options.
Train a model
You will need to specify a config path; see the configs directory for examples.
beast train --config <config_path> [options]
Type "beast train -h" in the terminal for details on the options.
Run inference
Inference on a single video or a directory of videos:
beast predict --model <model_dir> --input <video_path> [options]
Inference on (possibly nested) directories of images:
beast predict --model <model_dir> --input <video_path> [options]
Type "beast predict -h" in the terminal for details on the options.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beast_backbones-1.1.3.tar.gz.
File metadata
- Download URL: beast_backbones-1.1.3.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36e69a6ce209d536bc858cc96fcfcbee3faf2a7dee4e1c32312cf47a20518bf2
|
|
| MD5 |
92acb25d6ef21e0f6cb0a9072315370d
|
|
| BLAKE2b-256 |
02886e5448063593cce3e2035b39bdad3b493e6fe6140367f240c58d37a4213d
|
Provenance
The following attestation bundles were made for beast_backbones-1.1.3.tar.gz:
Publisher:
publish.yaml on paninski-lab/beast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beast_backbones-1.1.3.tar.gz -
Subject digest:
36e69a6ce209d536bc858cc96fcfcbee3faf2a7dee4e1c32312cf47a20518bf2 - Sigstore transparency entry: 941798324
- Sigstore integration time:
-
Permalink:
paninski-lab/beast@ca9303af3b475fdf9bf5eec4498bda8c119acc03 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/paninski-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@ca9303af3b475fdf9bf5eec4498bda8c119acc03 -
Trigger Event:
release
-
Statement type:
File details
Details for the file beast_backbones-1.1.3-py3-none-any.whl.
File metadata
- Download URL: beast_backbones-1.1.3-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f13f0c92ad3c0ed8c8c90bf831c7cfe97e1a27764cc03462ee1c8b304c01d09
|
|
| MD5 |
5f3af14648aee04535fc69d02832b0b1
|
|
| BLAKE2b-256 |
15c74a0ce5634b2536c87451b72bd8798ce6a5869901f8b0bae678f07158e9d6
|
Provenance
The following attestation bundles were made for beast_backbones-1.1.3-py3-none-any.whl:
Publisher:
publish.yaml on paninski-lab/beast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beast_backbones-1.1.3-py3-none-any.whl -
Subject digest:
5f13f0c92ad3c0ed8c8c90bf831c7cfe97e1a27764cc03462ee1c8b304c01d09 - Sigstore transparency entry: 941798350
- Sigstore integration time:
-
Permalink:
paninski-lab/beast@ca9303af3b475fdf9bf5eec4498bda8c119acc03 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/paninski-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@ca9303af3b475fdf9bf5eec4498bda8c119acc03 -
Trigger Event:
release
-
Statement type: