# beast


**Be**havioral **a**nalysis via **s**elf-supervised pretraining of **t**ransformers
`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.
## Installation
### Step 1: Install ffmpeg
First, check to see if you have ffmpeg installed by typing the following in the terminal:
```commandline
ffmpeg -version
```
If not, install:
```commandline
sudo apt install ffmpeg
```
### Step 2: Create a conda environment
First, [install anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).
Next, create and activate a conda environment:
```commandline
conda create --yes --name beast python=3.10
conda activate beast
```
### Step 3: Download the repo from github and install
Move to your home directory (or wherever you would like to download the code) and install:
```commandline
cd ~
git clone https://github.com/paninski-lab/beast
cd beast
pip install -e .
```
## Usage
`beast` comes with a simple command line interface. To get more information, run
```commandline
beast -h
```
### Extract frames
Extract frames from a directory of videos to train `beast` with.
```commandline
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.
```commandline
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:
```commandline
beast predict --model <model_dir> --input <video_path> [options]
```
Inference on (possibly nested) directories of images:
```commandline
beast predict --model <model_dir> --input <video_path> [options]
```
Type "beast predict -h" in the terminal for details on the options.
Raw data
{
"_id": null,
"home_page": "https://github.com/paninski-lab/beast",
"name": "beast-backbones",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "machine learning, deep learning, computer_vision",
"author": "Yanchen Wang",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fa/34/6d2d7bcc5035ef7493f81fa82a2b6a332e6fdbdfa7023deb356aef0935ef/beast_backbones-1.1.0.tar.gz",
"platform": null,
"description": "# beast\n\n\n\n\n**Be**havioral **a**nalysis via **s**elf-supervised pretraining of **t**ransformers\n\n`beast` is a package for pretraining vision transformers on unlabeled data to provide backbones \nfor downstream tasks like pose estimation, action segmentation, and neural encoding.\n\n## Installation\n\n### Step 1: Install ffmpeg\nFirst, check to see if you have ffmpeg installed by typing the following in the terminal:\n\n```commandline\nffmpeg -version\n```\n\nIf not, install:\n\n```commandline\nsudo apt install ffmpeg\n```\n\n### Step 2: Create a conda environment\n\nFirst, [install anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).\n\nNext, create and activate a conda environment:\n\n```commandline\nconda create --yes --name beast python=3.10\nconda activate beast\n```\n\n### Step 3: Download the repo from github and install\nMove to your home directory (or wherever you would like to download the code) and install:\n\n```commandline\ncd ~\ngit clone https://github.com/paninski-lab/beast\ncd beast\npip install -e .\n```\n\n## Usage\n\n`beast` comes with a simple command line interface. To get more information, run\n```commandline\nbeast -h\n```\n\n### Extract frames\n\nExtract frames from a directory of videos to train `beast` with.\n\n```commandline\nbeast extract --input <video_dir> --output <output_dir> [options]\n```\n\nType \"beast extract -h\" in the terminal for details on the options.\n\n### Train a model\n\nYou will need to specify a config path; see the `configs` directory for examples.\n\n```commandline\nbeast train --config <config_path> [options]\n```\n\nType \"beast train -h\" in the terminal for details on the options.\n\n### Run inference\n\nInference on a single video or a directory of videos: \n\n```commandline\nbeast predict --model <model_dir> --input <video_path> [options]\n```\n\nInference on (possibly nested) directories of images: \n\n```commandline\nbeast predict --model <model_dir> --input <video_path> [options]\n```\n\nType \"beast predict -h\" in the terminal for details on the options.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Behavioral analysis via self-supervised pretraining of transformers",
"version": "1.1.0",
"project_urls": {
"Documentation": "https://github.com/paninski-lab/beast",
"Homepage": "https://github.com/paninski-lab/beast",
"Repository": "https://github.com/paninski-lab/beast"
},
"split_keywords": [
"machine learning",
" deep learning",
" computer_vision"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "485dc01941bc2fab3c4b6fb77bb0f31241fa137d49208090b42c33a2a82d16cc",
"md5": "718e83371990e486a673b5c40b0bf047",
"sha256": "3ac78da2063ebcdfe117d1332987ce18416841bfd7f98735897afe87d88dab3a"
},
"downloads": -1,
"filename": "beast_backbones-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "718e83371990e486a673b5c40b0bf047",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 43421,
"upload_time": "2025-07-17T21:44:56",
"upload_time_iso_8601": "2025-07-17T21:44:56.265913Z",
"url": "https://files.pythonhosted.org/packages/48/5d/c01941bc2fab3c4b6fb77bb0f31241fa137d49208090b42c33a2a82d16cc/beast_backbones-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fa346d2d7bcc5035ef7493f81fa82a2b6a332e6fdbdfa7023deb356aef0935ef",
"md5": "b00f026f1ec043f30c1e8463055ffb31",
"sha256": "353de3d1ac738f47adf5a3158c874c229eee84e246a0afa33cc75493a67bc7c4"
},
"downloads": -1,
"filename": "beast_backbones-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b00f026f1ec043f30c1e8463055ffb31",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 34512,
"upload_time": "2025-07-17T21:44:57",
"upload_time_iso_8601": "2025-07-17T21:44:57.758169Z",
"url": "https://files.pythonhosted.org/packages/fa/34/6d2d7bcc5035ef7493f81fa82a2b6a332e6fdbdfa7023deb356aef0935ef/beast_backbones-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 21:44:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "paninski-lab",
"github_project": "beast",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "beast-backbones"
}