Skip to main content

Behavioral analysis via self-supervised pretraining of transformers

Project description

beast

GitHub PyPI

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 ICLR paper 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beast_backbones-1.3.0.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beast_backbones-1.3.0-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

Details for the file beast_backbones-1.3.0.tar.gz.

File metadata

  • Download URL: beast_backbones-1.3.0.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for beast_backbones-1.3.0.tar.gz
Algorithm Hash digest
SHA256 fbd6eee433055631e84fc698aeecdff0f9cf5a567fcb61cd23cbb7a342f35427
MD5 eb4dbf17d6f2dc0d81c035c8a2c41392
BLAKE2b-256 5ab1bf3240a8c854f5ac7ff643a5ca6b00cc6dc10bffdee26570243e4e0a9807

See more details on using hashes here.

Provenance

The following attestation bundles were made for beast_backbones-1.3.0.tar.gz:

Publisher: publish.yaml on paninski-lab/beast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beast_backbones-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: beast_backbones-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 48.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for beast_backbones-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 739ef37415f3ff63af60adb2126d6083df0b90be4893b4f2cecec2e7bcd4c709
MD5 4d0d8044f44a6cb87d54640d450585d6
BLAKE2b-256 99159323f85f49d942cae9af22d5dd5b31a19621cfe83c7fa99d8a17848b8607

See more details on using hashes here.

Provenance

The following attestation bundles were made for beast_backbones-1.3.0-py3-none-any.whl:

Publisher: publish.yaml on paninski-lab/beast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page