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


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.1.2.tar.gz (34.7 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.1.2-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beast_backbones-1.1.2.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for beast_backbones-1.1.2.tar.gz
Algorithm Hash digest
SHA256 5db1ca559e8248a522d3e4b847a486e8cfc039844b3d2377c56568c45ed14972
MD5 103c884762a322b34b82ced7e946d29b
BLAKE2b-256 2b4d19b858b18374a7e540d0524b865e0595378185671bbe2019f5c044d0e25e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beast_backbones-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.11.14 Linux/6.11.0-1018-azure

File hashes

Hashes for beast_backbones-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 15415380c61b3480a32018d2a3c535f681cd4da2d7484208745ff2cf5e07a107
MD5 fdc07a2001e753307f54f98bc7e2d84d
BLAKE2b-256 70ea56755d753c48acde752b6d3151d4c5ee2bc2c80c770388eeb0833d6ddb78

See more details on using hashes here.

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