Package: napari-annotation-project
napari-annotation-projectThis napari plugin allows to define projects consisting of multiple images that can be annotated with labels and rectangular regions of interest (rois). Those rois can then be exported as series of cropped images and labels, typically to train Machine Learning models. Projects can be easily reopened in order to browse through images and their annotations. This package is a meant to be alight-weight plugin which does not introduce any specific dependenciesand that should be easily installable in any environment already containing napari and other plugins.UsageTo start a project, you can just drag and drop files in the file list area. This prompts for the selection of a project folder. After that, more files (also from different folders) can be dragged and dropped to be included in the project. Files can optionally be copied to the project folder but this option has to be setbefore adding files. When selecting a file in the list, it is opened (using the default image reader or a reader plugin if installed) and two layers, one for rois, and one for annotations are added.https://user-images.githubusercontent.com/4622767/147265874-57dcd956-4d54-4c76-9129-c1fc2837e6a4.mp4Adding roisAfter selecting theroislayer, you can add rectangular rois to the image. If you need square rois of a specific size (as often needed in DL training) you can select theFixed roi sizeoption and then use theAdd roibutton.Note that currently only 2D rois are supported. If you work with nD images, the roi is therefore added to thecurrent selected 2D plane.Adding annotationsAfter selecting theannotationslayer, you can add annotations to your image. There are no restrictions here and you can e.g. add as many labels as you need.Info storageAll relevant information on project location, project files and rois is stored in a yaml fileParameters.yml. Annotations are stored as 2D tiff files in theannotationsas files named after the original files.Note that at the moment if multiple files have the same name, this will cause trouble. This parameter file is used when re-loading an existing project.https://user-images.githubusercontent.com/4622767/147265984-adb6ee1f-9319-45c9-a9a4-735ade2a3905.mp4Exporting roisOnce you are satisfied with your annotations and rois, you can use the rois to export only the corresponing cropped rois of both the image and annotation layers. For this you can head to theExporttab. Here you can set the location of the export folder, set the names of the folders that will contain cropped images and cropped annotations, and finally set the prefix names for these two types of files. Files are exported as tif files.https://user-images.githubusercontent.com/4622767/147266002-9c4485c9-5bcc-4c64-9c92-6c06775e2711.mp4InstallationYou can installnapari-annotation-projectviapip(note yet functional):pip install napari-annotation-projectTo install latest development version :pip install git+https://github.com/guiwitz/napari-annotation-project.gitContributingContributions are very welcome. Tests can be run withtox.LicenseDistributed under the terms of theBSD-3license,
"napari-annotation-project" is free and open source software.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.