# A Segment Anything Model-based tool for semi-automated behavioural analysis of Drosophila and other model organisms

**Authors:** Sarah Mele, Joshua Millward, Long Nguyen, Natasha Ruth, Jemma Gasperoni, Sebastian Dworkin, Zhen He, Travis K. Johnson

PMC · DOI: 10.1242/dmm.052631 · 2026-02-24

## TL;DR

A new tool called SAMBA uses advanced AI to track and analyze the behavior of fruit flies and other organisms without needing special equipment or coding skills.

## Contribution

SAMBA introduces a semi-automated behavioral analysis pipeline using the Segment Anything Model 2, enabling cross-species behavior tracking with minimal user input.

## Key findings

- SAMBA accurately tracks movement and detects behavioral states in Drosophila models of neurological disease.
- The tool shows adaptability to both adult Drosophila and larval zebrafish, demonstrating cross-species utility.
- SAMBA reduces technical barriers for analyzing motor pattern defects and supports batch processing.

## Abstract

Quantitative behavioural analysis is a powerful approach for linking genotype to phenotype, but many existing tools require specialised hardware, extensive preprocessing or coding expertise. We present Segment Anything Model for Behavioural Analysis (SAMBA), an open-access, Google Colab-based pipeline that harnesses the Segment Anything Model 2 (SAM2) for accurate, semi-automated tracking without thresholding or background subtraction. With minimal user input, SAMBA extracts movement parameters, detects behavioural states and supports batch processing. Validating SAMBA in three Drosophila melanogaster models of human neurological disease revealed impaired locomotion, reduced speed and altered decision-making. We further demonstrated adaptability to adult Drosophila and larval zebrafish, underscoring its cross-species utility. By combining foundation-model segmentation with an accessible interface, SAMBA lowers technical barriers to analysing motor pattern defects and is readily extendable to diverse model organisms, life stages and experimental paradigms. This flexibility positions SAMBA as a valuable platform for accelerating disease mechanism studies, genetic screens and preclinical testing.

Summary: We present an easy-to-use, open-access tool designed for Drosophila larval movement analysis and readily customised for other applications, enabling rapid assessment of organism behaviour without specialised equipment or coding expertise.

## Linked entities

- **Diseases:** neurological disease (MONDO:0005071)
- **Species:** Drosophila melanogaster (taxon 7227), Drosophila (taxon 7215), Danio rerio (taxon 7955)

## Full-text entities

- **Diseases:** neurological disease (MESH:D020271)
- **Chemicals:** SAMBA (-)
- **Species:** Drosophila melanogaster (fruit fly, species) [taxon 7227], Homo sapiens (human, species) [taxon 9606], Danio rerio (leopard danio, species) [taxon 7955]

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12964350/full.md

---
Source: https://tomesphere.com/paper/PMC12964350