SAMJ: Fast Image Annotation on ImageJ/Fiji via Segment Anything Model

Carlos García-López-de-Haro, Caterina Fuster-Barceló, Curtis T. Rueden, Jónathan Heras, Vladimír Ulman, Daniel Franco-Barranco, Adrián Inés, Kevin W. Eliceiri, Jean-Christophe Olivo-Marin, Jean-Yves Tinevez, Daniel Sage, Arrate Muñoz-Barrutia · 2025

Read SAMJ: Fast Image Annotation on ImageJ/Fiji via Segment Anything Model by Carlos García-López-de-Haro, Caterina Fuster-Barceló, Curtis T. Rueden, Jónathan Heras, Vladimír Ulman, Daniel Franco-Barranco, Adrián Inés, Kevin W. Eliceiri, Jean-Christophe Olivo-Marin, Jean-Yves Tinevez, Daniel Sage, Arrate Muñoz-Barrutia (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-02783.txt.

Introduction

Carlos García-López-de-Haro and eleven co-authors plug a famous segmentation model into the microscope software biologists already use, in a 2025 paper. Drawing masks around cells and structures by hand is the bottleneck of image-based biology.

Their plugin, SAMJ, brings the Segment Anything Model into ImageJ and Fiji. It installs in one click and runs on ordinary computers. Users delineate objects interactively in large scientific images, with the model proposing boundaries in real time. The labeled datasets that AI training needs can then be built far faster. The authors target working labs, not machine learning specialists. Free, familiar software plus a strong model is the whole pitch.

Catalog record

CREATORCarlos García-López-de-Haro, Caterina Fuster-Barceló, Curtis T. Rueden, Jónathan Heras, Vladimír Ulman, Daniel Franco-Barranco, Adrián Inés, Kevin W. Eliceiri, Jean-Christophe Olivo-Marin, Jean-Yves Tinevez, Daniel Sage, Arrate Muñoz-Barrutia
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE32 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-02783

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

SAMJ: Fast Image Annotation on ImageJ/Fiji via Segment Anything Model Carlos García-López-de-Haro, Caterina Fuster-Barceló, Curtis T. Rueden, Jónathan Heras, Vladimír Ulman, Daniel Franco-Barranco, Adrián Inés, Kevin W. Eliceiri, Jean-Christophe Olivo-Marin, Jean-Yves Tinevez, Daniel Sage, Arrate Muñoz-Barrutia Abstract Mask annotation remains a significant bottleneck in AI-driven biomedical image analysis due to its labor-intensive nature. To address this challenge, we introduce SAMJ, a user-friendly ImageJ/Fiji plugin leveraging the Segment Anything Model (SAM). SAMJ enables seamless, interactive annotations with one-click installation on standard computers. Designed for real-time object delineation in large scientific images, SAMJ is an easy-to-use solution that simplifies and accelerates the creation of labeled image datasets. keywords Image Annotation, Foundation Model, Biomedical Images, Java-based platform Access to high-quality annotated images is key to training and developing new methods for biomedical image analysis and object segmentation. However, creating large datasets of annotated images is a time-consuming, labor-intensive, and subjective process Pelt 2020 . The demand becomes even more pronounced when training supervised Deep Learning (DL) models, typically requiring hundreds to thousands of annotated images Zulueta-Coarasa et al. 2023 . Therefore, there is a critical need for efficient annotation tools capable of running on commonly available computers. Such tools must reduce IT-related barriers, ensuring broader accessibility for domain-specific experts such as biologists. These solutions should also be compatible with widely used bioimage software platforms, such as ImageJ/Fiji Schindelin et al. 2012 , and must be fast enough to accelerate the annotation of dozens of objects in large images, which are typical in biological research and essential for training machine learning models. Recently, Meta Research released the Segment Anything Model (SAM) Kirillov et al. 2023 , a foundational DL framework designed for one-shot and promptable image segmentation. SAM represents a significant breakthrough, capable of delineating complex objects and enabling semi-automated, interactive annotation across diverse image types. In its standard mode of operation, SAM requires user-defined prompts, such as points, sets of points, or bounding boxes, to efficiently isolate target objects. SAM has been made available in commonly used bioimage software packages, such as QuPath Sugawara 2023 and Napari Archit et al. 2025 , providing interactive annotation, but has not yet been incorporated into the ImageJ ecosystem Schindelin et al. 2015 . Other proprietary software, such as Matlab, ArcGIS, Kili Technology, or Unitlab Magic Touch have incorporated SAM as an add-on tool to enhance their segmentation capabilities. Similarly, Segment Anything Annotator 1 1 1 https://github.com/haochenheheda/segment-anything-annotator , an open-source Python-based UI application, uses SAM for pixel-level annotation. Although many annotation tools are both user-friendly and widely accessible, they often face challenges when dealing with uneven illumination, overlapping structures, or subtle intensity gradients. Several plugins have introduced more advanced methods: AnnotatorJ Hollandi et al. 2020 , a popular Fiji plugin, supports semi-automatic cellular annotation by combining manual input with deep learning; Labkit Arzt et al. 2022 leverages machine learning for pixel-wise classification; and Thomas et al. Thomas et al. 2021 propose a streamlined approach to systematic manual annotation by assigning predefined categories to images or regions. However, none of these plugins yet benefit from the advantages that SAM provides. Figure 1: SAMJ User Interface and Workflow with estimated time. This figure illustrates the typical workflow of SAMJ for annotating objects in an image, including the time required for each step on standard workstations. (a) Model Installation: The most time-consuming step, where SAMJ installs the selected model and, if necessary, sets up the environment, taking approximately 1000 seconds. (b) Image Encoding: When the user clicks “Go” in the plugin, the image is processed to generate an embedding, which takes around 10 seconds. (c) Object Annotation: Since no re-embedding is required, this step is immediate, with each annotation generated in approximately 0.1 seconds per user click. The annotation process can be repeated multiple times as desired for different objects, offering rapid and interactive segmentation. In this manuscript, we present SAMJ, a plugin that brings the capabilities of SAM into the Fiji ecosystem, both as a standalone Fiji plugin and as an extension for Labkit Arzt et al. 2022 . We designed SAMJ for one-click installation. It features a no-code interface, and runs on standard computers without requiring specialized hardware. By lowering technical barriers, it broadens access to cutting-edge AI tools within the life sciences community. A key contribution of our work is the tailored adaptation of SAMJ to efficiently handle scientific images. By harnessing the powerful segmentation capabilities of SAM, this tool has the potential to significantly accelerate the annotation process, enabling users to instantly generate regions of interest around target objects with a single point click or bounding box. SAMJ leverages the core architecture of SAM, which is built upon three key components: an image encoder, a prompt encoder, and a mask decoder. The image encoder is based on a Visual Transformer (ViT) Dosovitskiy et al. 2021 that encodes the input image, offering high representational power at the expense of significant computational resources. The prompt encoder is another transformer to encode the prompt given by the user to point or “hint” to the location of the object of interest. Finally, the encoded image and prompt are used by the mask decoder, which combines elements of both a transformer and a Convolutional Neural Network, to generate the mask of interest. The SAMJ plugin is installed as any standard Fiji extension, eliminating the technical IT barriers often associated with Python packages and making advanced image segmentation accessible to a wider audience. Unlike most Python-based libraries that require command-line interfaces for environment configuration and dependency management, SAMJ simplifies the process with a seamless, one-click installation, enabling effortless deployment. In addition, five SAM variants are available through SAMJ. Each of these models can run on standard workstations or mid-range laptops, eliminating the need for high-end computational resources that the original SAM typically requires. These variants are SAM-2 Ravi et al. 2024 , EfficientSAM Xiong et al. 2024 , and EfficientViTSAM Zhang et al. 2024 . The annotation process in the SAMJ plugin mirrors SAM’s workflow ( Figure 1 ). Each image is encoded once by the image encoder, the most computationally intensive step. Afterwards, prompts are processed and masks generated almost instantly, allowing users to interactively produce multiple annotations with real-time responsiveness. SAMJ integrates seamlessly with Fiji’s existing tools, allowing users to create prompts such as points and rectangles directly through Fiji’s familiar toolbar, thereby minimizing the learning curve for new users. The SAMJ plugin offers two annotation modes: Live and Batch mode (called BatchSAMize). In Live mode, prompts are drawn directly on the encoded image, and annotations are generated interactively, one at a time. In Batch mode, users can define multiple seed points to serve as prompts for segmenting multiple objects in a raw image. These seeds can be generated automatically using traditional Fiji commands (e.g., Find Maxima, Watershed) within an ImageJ macro, followed by a call to SAMJ’s Batch mode to segment the whole image. Additionally, users can enhance annotations by providing seeds from other segmentation methods as prompts, enabling iterative refinement. Beyond its ease of use, SAMJ is designed for adaptability and seamless integration. Powered by SAM, it can enhance annotation workflows across a range of Java-based platforms, for example, in addition to Labkit, we have also integrated it

Read the complete text