简介
AnnotatorJ 插件旨在简化对象注释。还包括一个导出器插件 AnnotatorJExporter。
插件的 GitHub 存储库中的 AnnotatorJ_documentation.pdf 中提供了详细的用户手册。
#开始吧
使用发布版本
standalone built version仅包含核心ImageJ功能,并且此插件在GitHub上提供。 目前,有 Windows 和 Linux 版本。
发布无需安装;只需将文件解压到计算机上的任何空文件夹即可。 独立版本在启动时启动 AnnotatorJ 插件。
使用斐济更新程序
AnnotatorJ的更新站点是:
- 网址:https://sites.imagej.net/Spreka/
- 姓名:AnnotatorJ
要更新站点添加到您的 Fiji 安装中,请按照 imagej.net 上的 this tutorial 进行操作。
安装
安装后开始使用注意事项工具:
- 预建版本
- Start Fiji
- Navigate to Plugins › AnnotatorJOpSef
- 独立版
- Locate /your/extracted/path/annotator_Project-0.0.1-SNAPSHOT.jar
- Add execution permission to this .jar file
- Run the .jar file 这将在新闻中打开 AnnotatorJ 插件。
额外
AnnotatorJ is also available as the napari plugin napari-annotatorj.
方便
首先,您需要打开一个新图像并从列表中选择您想要执行的注释类型
下面演示了注释类型的概述。 请查看our guide以快速了解该插件的功能。

Figure 1: Annotation and export types.
该图还显示了如何使用补充的§§7§§§导出给定的注释类型。
实例分割
这种分割类型的分割意味着对象的边界被单独标记为每个单独对象的作用。我们会自动为您选择“徒手选择”工具,当释放鼠标左键时,该工具将关闭您的相似的运行线,从而形成闭合。请参见上面的演示。
这个分割用于生成各个对象的标记图像(上面的多标签图像)。
分割分割
对象被视为前景,而图像上的其他内容都是背景。用画笔标记对象以创建二值(黑白)图像。
边界框注释
首先是为了环绕每个对象。我们自动为您规划选择工具,该工具可以绘制多边形角和边上的标记点。 对象的位置和大小存储在所识别的坐标中。
如何注释
- –>打开图像
- 选择注释类型 –> 从工具栏选择适合所选注释类型的默认工具
- 开始注释对象
- instance: draw contours around objects
- semantic: paint the objects’ area
- bounding box: draw rectangles around the objects
- –> 选择类 –> 将注释以所选类的名称保存到原始图像文件夹的子文件夹中的文件中
5.(任选) - –> continue a previous annotation - –> display a different annotation as overlay (semi-transparent) on the currently opened image - –> select annotation and overlay colours - –> set options for semantic segmentation and Contour assist mode - checkboxes –> Various options - Add automatically –> adds the most recent annotation to the ROI list automatically when releasing the left mouse button - Smooth –> smooths the contour (in instance annotation type only) - Show contours –> displays all the contours in the ROI list - Contours assist –> suggests a contour in the region of an initial, lazily drawn contour using the deep learning method U-Net - accept contour with ⌃ Ctrl + ⌦ Delete - reject contour with Q - invert contour with ⌃ Ctrl + Q - Show overlay –> displays the overlayed annotation if loaded with the button - Edit mode –> edits a selected, already saved contour in the ROI list by clicking on it on the image - accept modifications with U - reject modifications with ⌃ Ctrl + ⌦ Delete - delete current contour with ⎋ Esc ***
武装辅助
要使用此功能,必须提供经过训练的 keras U-Net 模型。默认位置是 ImageJ/Fiji 安装或该插件的独立版本的 /plugins/models/ 文件夹。模型和配置文件的名称默认为 model_real.json 和 model_real_weights.h5。 您可以更改首次运行插件时自动创建的文件 AnnotatorJconfig.txt 中的这些名称和路径,该文件位于默认的 /plugins/models/ 文件夹中。
可以从插件的GitHub repository下载核图像上训练的预模型示例。 您还可以根据自己的数据训练新的数据,例如Python并使用以下代码块保存它:
# save model as json
model_json=model.to_json()
with open(‘model_real.json’, ‘w’) as f:
f.write(model_json)
# save weights too
model.save_weights(‘model_real_weights.h5’)
OpSeF 导入
AnnotatorJ 插件适用于 OpSeF 中创建和使用的数据结构。 要开始在 OpSeF 数据上使用该插件:
- 预建版本
- Start Fiji
- Navigate to Plugins › AnnotatorJ
- 独立版
- Locate /your/extracted/path/annotator_Project-0.0.1-SNAPSHOT.jar
- Add execution permission to this .jar file
- Run the .jar file
- The AnnotatorJ plugin will open at startup, close it
- Navigate to Plugins › AnnotatorJExporter 这将在新闻中打开 AnnotatorJOpSef 插件。 首先,您需要在 OpSeF 项目文件夹中的 10_ImportExport 下找到 FilePairList 文本文件。 选定文件指示插件从 02_SegMasks 加载基本分段填补码或从 07_ClassifiedSegMasks 文件夹加载分类分段填补码。 如果之前在 AnnotatorJ 中创建的保存注释存在于临时工作文件夹 12_TmpRoisFromFiji 中(遵循 AnnotatorJ 命名约定),则将加载它们而不是所选 FilePairList 文本文件中的掩码文件。
可以在Classes窗口的下拉列表中将默认类设置为所有未分配的对象(通过在插件主窗口中选择Class模式打开)。 只需分配给其中一个类的对象将作为类掩码导出到输出文件夹13_ClassifiedSegMasksFromFiji,而所有对象都将作为类掩码导出到输出文件夹11_SegMasksFromFiji。分割蒙版的灰度值被保留。
注意:如果为类选择了与当前注释颜色相同的颜色,则类属性操作将不可见!建议使用不同的颜色。
OpSeF
OpSeF 是一个基于 Python 的交互式框架,用于使用深度学习进行图像分析。它是由托比亚斯·拉塞(Tobias Rasse)创建的。其源代码可在 GitHub 上公开获取。 欲了解更多详情,请参阅相应书籍:
分割导入
将导入在 OpSeF 中创建的 16 位多标记分隔码进行编辑和/或分类(请参阅instructions 或documentation)。
##分类面膜导入
在 OpSeF 中创建和分类的 16 位多标记分割掩码将被导入以进行编辑和/或分类(参见instructions或documentation)。 类别将使用不同的统一颜色标记。
导出
该插件项目中还包含一个导出器插件AnnotatorJExporter,用于快速轻松地导出注释。要启动导出器,请导航至Plugins › AnnotatorJOpSef。 导出器所需的文件夹结构如下:
image_folder
|--- image1.png
|--- another_image.png
|--- something.png
|--- ...
annotation_folder
|--- image1_ROIs.zip
|--- another_image_ROIs.zip
|--- something_ROIs.zip
|--- ...
此结构由 AnnotatorJ 插件创建,以便将 * 注释文件夹* 创建为 Image 文件夹 的子文件夹,并使用所选注释类的名称(请参阅documentation)。
上面显示了可能的导出选项。
引文
如果您使用该插件,请引用我们相应的书籍:
安装
先决条件
要使用此工具,您需要:
从源代码构建
1.克隆源存储库
git clone https://github.com/spreka/annotatorj.git
2.根据您的操作系统安装maven
- on Windows:
- Download apache-maven-x.x.x-bin.zip and extract it
- Add the path to the extracted folder to your system Path variable
- on Linux:
- run the following command with a sudo user
```
sudo apt install maven
``` 3.通过运行以下命令验证Maven安装:
```
mvn --version
```
This should display version information of your maven install. 4. 通过执行 *mvn install.txt* 中的命令来安装 */lib/* 中找到的自定义依赖项 ```
mvn install:install-file -Dfile="lib\javabuilder.jar" -DgroupId=com.mathworks.toolbox -DartifactId=javabuilder -Dversion=9.2.0.538062 -Dpackaging=jar
mvn install:install-file -Dfile="lib\runAC.jar" -DgroupId=com.mathworks -DartifactId=runAC -Dversion=1.0 -Dpackaging=jar ``` 5.(可选)编辑文件 *pom.xml* 并取消注释以下任一行,以在构建过程中将 ImageJ/Fiji 安装文件夹设置为已安装的 ImageJ/Fiji 文件夹: ```xml
<imagej.app.directory>D:\ImageJ\ImageJ</imagej.app.directory>
<scijava.app.directory>d:\FIJI\Fiji.app\</scijava.app.directory> ``` 6. 构建插件: ```shell
mvn clean install
# optionally, set the Fiji install folder here:
# mvn clean install -Dscijava.app.directory=d:\FIJI\Fiji.app\ ``` 注意:也可以使用IDE从源代码构建,例如蚀。有关说明,请参阅[documentation](AnnotatorJ_documentation.pdf)。
使用发布版本
standalone release可在插件的 GitHub 存储库上找到。
也可以通过 ImageJ/Fiji 的内置updater安装。