The SAMJ-IJ is a powerful Fiji plugin for annotating microscopy images using various versions of the Segment Anything Model (SAM). This README provides detailed instructions on how to use the plugin for image annotation. In this first version of the plugin, the SAMJ-IJ Annotator is delivered to annotate images through the usage of prompts. The plugin is designed to be user-friendly and efficient, allowing for easy and accurate image annotation for further analysis. Documentation preliminary version. Needs to be reviewed, improved and, of course, to add screenshots of the plugin usage.
Before you can annotate images using SAMJ-IJ, you need to install the plugin in Fiji:
- Install Fiji: If you haven't already, download and install Fiji.
- Install SAMJ Plugin*: Open Fiji and navigate to
Help > Update...
. In theManage update sites
window, click onAdd update site
and look for the SAMJ Annotator Plugin. ClickOK
to add the update site. Restart Fiji to apply the changes. - Open SAMJ-IJ Annotator: Start Fiji and navigate to
Plugins > SAMJ > SAMJ Annotator
to open the plugin.
To use the SAMJ-IJ plugin, you must install a SAM model:
- Open the SAMJ Annotator plugin as described above.
- Choose a SAM model from the list provided within the plugin.
- Click on the
Install
button next to the selected model. - Wait for the installation process to complete. This may take some time depending on the model size, your computer and your internet connection.
Comment: Maybe we could add a section somewhere with more details on how long can take depending on the model and some guideance on which model to choose depending on your comptuer specs.
Once you have installed a model, follow these steps to annotate your image:
-
Open Image: Open the microscopy image you want to annotate in Fiji.
-
Select the Image: In the SAMJ Annotator plugin, ensure your image is selected in the dropdown bar.
-
Start Annotation: Click on
Start/Encode
to begin the annotation process. -
Choose Annotation Method: Use one of the following tools to annotate your image:
Rectangle (Rect)
: Draw rectangular regions of interest (ROIs).Points
: Click to mark points on the image. HoldCtrl
to select multiple points for a single object.Brush
: Paint freeform ROIs.
Optionally, untick the
Add to ROI Manager
checkbox if you don't want your annotations to be added to the Fiji ROI Manager automatically. -
Annotate: Annotate as many objects as needed. With each ROI drawn using one of the three tools, the installed SAM version will run and the object will be annotated.
-
Manage Annotations: All annotations will be sent to the ROI Manager (if the checkbox is ticked), where you can perform various operations as allowed by Fiji's ROI Manager functionality.
To save your annotations:
- Open the ROI Manager in Fiji.
- Select the annotations you wish to save.
- Choose
More > Save
to save the selected annotations as a roi. - Choose a location and name for the file and click
Save
to save the annotations as a .roi file.
Comment: Can we use the
Edit > Selection > Create Mask
to save the annotations as a mask? This would be more useful for the user, as the .roi file is not very useful for further analysis.
This functionality allows you to save your annotations for further analysis or documentation purposes.
Comment: Add some screenshots of the plugin usage when available.
The image shows an example of how objects are annotated within the SAMJ-IJ plugin. Each annotated object is clearly marked and labeled, indicating the ease and efficiency of the plugin's use for image analysis.
- This plugin is intended for use with microscopy images.
- The documentation here is for users only. Developer documentation, including contribution guidelines, will be available in a separate repository.
For further assistance or to report issues, please visit the plugin's repository.
Thank you for using the SAMJ-IJ Fiji plugin!