Quick Start¶
Prerequisites
Complete the Installation guide first, including downloading model checkpoints.
This guide walks you through a complete analysis using a demo video in under 5 minutes.
1. Launch CASTLE¶
The Gradio web UI opens at http://localhost:7860.
2. Create a Project¶
- In the 0. Project tab, select New Project
- Enter a project name (e.g.,
my-first-project) - Click Create

3. Upload a Video¶
- Switch to the 1. Upload Videos tab
- Upload one of the included demo videos:
demo/case1-reaching-task/reaching-task-raw.mp4— rat reaching taskdemo/case2-openfield/openfield-1min-raw.mp4— open field experimentdemo/case5-gait/gait-raw.mp4— gait analysisdemo/Reach-and-Grasp-demo.mp4— reach and grasp demo

Tip
Start with reaching-task-raw.mp4 — it's short and works well for a first run.
4. Track ROIs¶
- Switch to the 2. Tracking ROIs tab
- In the Label ROI sub-tab, define your regions of interest on the first frame
- Use the ROI Prompts sub-tab to set prompts for the segmentation model
- Go to Tracking to run the tracker across all frames
![]()
5. Extract Features¶
- Switch to the 3. Extract Latent tab
- Select your tracked ROIs
- Run feature extraction — this uses DINOv2/v3 to compute latent representations for each frame

6. Analyze Behavior¶
- Switch to the 4. Behavior Microscope tab
- Configure clustering parameters
- Run the analysis to discover behavioral categories

What's Next?¶
- Tutorials — Detailed step-by-step guides for each stage of the pipeline
- Technical Guide — Understand how CASTLE works under the hood
- Configuration — Customize parameters for your experiments