Alp’s Labeling Tool (ALT)

(Updated April 4, 2017)

Macro plugin to label images for Detectnet / KITTI dataset

This macro code allows easy labeling of images, and creates text files compatible with DetectnetKITTI dataset format.

It runs under Fiji (ImageJ) and requires “ActionBar” plugin installed.

Whole setup requires the following 3 software, but no real setup process necessary, no need to type any command in Windows or Ubuntu. Please download these three pieces first;

  • Fiji (no setup required, just drag the folder from archive to anywhere you like)
  • action_bar-2.0.5-SNAPSHOT.jar plugin (choosing ‘install plugin’ from Fiji menu and selecting the .jar file is enough to install)

The macro code is installed by drag and drop of the folder in the archive file below into the main Fiji directory. And the third part is the ALT plugin (choose appropriate one for your operating system);

It allows you to draw rectangles around objects, name these rectangles, rotate the image with the rectangles altogether, save all this info and reload later along with selected image to continue labeling from where you left. Label “.txt” files are created in same folder with the image and contains labels and their bounding box coordinates, so upon completion of labeling work, you can move relevant “.txt” label-files to actual dataset, to “labels” folders under “train” & “val”.

clowns

I consider myself as hobbyist-grade programmer so please dont expect perfectly written code, failsafes, etc etc, although slowly enhancing, if you would like to try it, please use it on a backup set of images then manually copy the outputs.

ALT is open to public and feel free to modify it for your needs. I appreciate if you keep my name, in case you decide to publish an updated version of it.

ALT for Windows was written and tested under Windows 10 (64bit) environment. Fiji (ImageJ) version is 1.51h (64bit), java version 1.8.0_66 (64bit), ActionBar plugin version is 2.02.

ALT for Ubuntu was tested under Ubuntu 14.04. Only difference in usage is, instead of “Alt” key, you need to keep “Ctrl+Alt” key pressed before choosing “Add[t]” button, to view “Rename as:” window (with Feb. 10th version, this button is not necessary anymore since a customized “add” button was integrated to Ubuntu version, too).

Please use rotate button with patience, wait until all extra windows (including “results”) will be closed, before pressing again. The rotate routine works a bit slower.

Of course I did not test all of them, but theoretically you should be able to annotate the image formats found within the following list, you are only limited with image import capabilities of Fiji.


TIFF (.tiff, .tif), JPEG (.jpeg, .jpg), BMP (.bmp), FITS (.fits), PGM (.pgm) PPM (.ppm) PBM (.pbm), GIF (.gif), Animated GIF (.gif), PNG (.png), DICOM (.dic, .dcm, .dicom), PICT (.pict, .pic, .pct), PSD (.psd), TGA (.tga), ICO (.ico), CUR (.cur), Sunraster (.sun), XBM (.xbm), XPM (.xpm), PCX (.pcx), ANALYZE, NIfTi, AHF (.ahf), SPE (.spe), PIC (.pic), Leica TIFF (.tiff, .lei), Quicktime (.pic, .mov), AVI (.avi), PDS (.pds), LSM (.lsm), RAW, ISAC, FluoView TIFF (.tiff), Fluoview FV1000 OIB (.oib), Fluoview FV1000 OIF (.oif, .tif, -ro.pty, .lut, .bmp), IPLAB (.ipl), Bruker NMR (.fid, .ser, .2dseq, .2rr, .2ii, .3rrr, .3iii), FDF (.fdf), VFF (.vff), SIF (.sif), AxioVision ZVI (.zvi), DM3 (.dm3), Deltavision (.dv, .r3d), MI, NII, NIII, IMG (.img), UNC, PerkinElmer (.tif, .tim, .zpo, .csv, .htm, .ano, .rec, .cfg, .2, .3, .4, .5, .6, .7, .8, …), EPS (.eps, .epsi), SEQ (.seq), IPW (.ipw), OpenLab LIFF (.liff), OpenLab RAW (.raw), Metamorph (.stk), ICS (.ics, .ids), Leica Lif (.lif), Imaris (.ims), OME-XML (.ome), OME-TIFF (.tiff), ABD-TIFF (.tiff), GEL (.gel), Nikon (.nef, .tiff), Slidebook (.sld), SPCImage (.sdt), AL3D (.al3d), ND2 (.nd2), μManager (.tif, .txt), MRC (.mrc), JPEG2000 (.jp2), MNG (.mng), Flex (.flex), NRRD (.nrrd, .nhdr), VIFF bitmap image (.xv), ROI (.roi), ERS (.ers), RS (.rs), HPGL


ALT macro plugin is provided “as is” and I take no responsibility from any kind of damage it may directly or indirectly cause.
Please see the following video for details of installation and operation process.

Youtube / Vimeo

Another video showing some details from usage;

Youtube

I hope someone finds this macro useful,

Alper



WINDOWS downloads

  • ALT_Windows_(22mar2017)
    • “Next Image” button added. Sorry, no prev. button for the moment.
      • Attention! It does not save your modifications and directly skips to next image without saving anything. No “save” warning in this version, please be careful.
      • In this version, “next” button works for .jpg and .png files only. Means it will skip the images in other formats in the folder.
  • ALT_Windows_(22feb2017)
    • More functionality added. You can navigate back and forth between labels at 300% zoom level, for detailed arrangement of labels. Another button reverts zoom level to original scale.
  • ALT_Windows_(15feb2017)
    • Two new buttons. One button lets you rotate the image 90° clockwise. The other button lets you save the rotated images.
      And yes, labels rotate, too ! In case if you are unhappy with model’s data augmentation features.
  • ALT_Windows_(07feb2017)
    • A sticky side-bar added to opened image. First button allows you to read label of current selection. Second button asks for a name to the newly created selection and then adds it to the list (replaces Alt+Add[t] combo), or if selection already have a name, allows renaming the label of it. Third button closes the side bar (requires close/re-lauch of ALT plugin).
  • ALT_Windows_(01feb2017)
    • Now it can read label box datas from .txt files in the same directory. You can edit formerly created labels, .zip file is not necessary to start with, anymore.
  • ALT_Windows_(29jan2017)
    • Allows to create label data from stractch only, but you can continue pre-ALT edited labels, as long as you keep .zip file in same folder.

UBUNTU downloads

  • ALT_Ubuntu_(22mar2017)
    • “Next Image” button added. Sorry, no prev. button for the moment.
    • Attention! It does not save your modifications and directly skips to next image without saving anything. No “save” warning in this version, please be careful.
    • In this version, “next” button works for .jpg and .png files only. Means it will skip the images in other formats in the folder.
  • ALT_Ubuntu (10feb2017)
    • A sticky side-bar added to opened image. First button allows you to read label of current selection. Second button asks for a name to the newly created selection and then adds it to the list (replaces Alt+Add[t] combo), or if selection already have a name, allows renaming the label of it. Third button closes the side bar (requires close/re-lauch of ALT plugin).
  • ALT_Ubuntu (01feb2017)
    • Now it can read label box datas from .txt files in the same directory. You can edit formerly created labels, .zip file is not necessary to start with, anymore.
  • ALT_Ubuntu_(28jan2017)
    • Allows to create label data from stractch only, but you can continue pre-ALT edited labels, as long as you keep .zip file in same folder.

Comments / Discussions

Facebook