(code and text updated 03.dec.2018)
Finally, an image segmentation tool.
This tool is capable to read your existing Detectnet annotations and convert them to segmented annotations. Of course, it cannot detect object boundaries and wrap the selection line around automatically, but it provides some help to you to do this job. Please keep in mind this is the initial version and not throughly tested. Please work with backup copies of your data.
Assuming you have completed “Fiji” and “actionbar plugin” setup (see Alp’s Labeling Tool (ALT) for setup details for these two).
As usual with my other plugins, after downloading the archive file from above link, you will see a plugins folder in it. Drag and drop the plugins folder onto your “Fiji” main folder. AIMS installed.
An additional step necessary for using this plugin. In the archive file above, you will see a couple of other files. They are;
These two should be copied into the folder of images which you are going to apply segmentation, before you start. The text file is exact copy of the classes file, used in semantic segmentation example of DIGITS. The .lut file is actually a palette file, copied from Pascal VOC 2012 dataset, more specifically, from segmentationclass image named “2007_000032.png”.
Please visit following link to watch install procedure of Fiji, actionbar plugin and this plugin;
The provided “….classes.txt” file is the file for class names. Feel free to change the content to your needs. Keep in mind, the plugin will read it until first empty line, and rest of lines will be ignored.
If you start with a new image, you can use Fiji’s various polygon tools to create object boundaries, tools includes rectangle, circle, polygon and freehand drawing around your objects. A new selection must be added to list by clicking to “Add New Sel.” button. Otherwise you can lost your finely drawn selection.
After creating a polygonal selection, you can move its vertices (dots) to arrange its shape. My advise is, start with basic adjustments, and if you need more dots for precision, click to x2 vertices or x4 vertices buttons. These buttons provide dots related to width or height of selection therefore sometimes you may encounter lower number of dots. In such case, just make a request for “x8 vertices”. I will arrange it.
If you start with bounding box rectangles from a Detectnet dataset, my advise will be using x1 vertices button first, for each of the selection boxes. Then roughly shape it, click x2, fine tune, and click x4 for further adjustments if needed. Please dont forget to click “update” for fixing your changes.
After setting up everything, you are ready to create the segmented image. Visit AIMS menu bar and choose “Save Labels&Image” button. You will be asked to provide a folder for saving the output image. The rest will be handled by plugin. Just patiently wait until process finishes. The segmented image will stay on screen for examining results. If you want to change something, just close the segmented image, and continue editing with the original image.
There will be no white borders on segmented areas if you choose to save with “Save Labels&Image Borderless” button. But due to some limitations, the final border will be “one” pixel larger then your original borders. While it will not be an issue for majority of cases, may become problematic where borders are close to each other, less than 3-4 pixels.
Current version fails and exits, if it encounters a class name during saving, which is not available in …classes.txt file.
Please watch the following video for usage tips;
I hope you enjoy using it,
AIMS_02dec2018_Windows (Removed due to a color artefact issue)