Alp’s Labels to Images converter, for Detectnet/KITTI



Assuming you have already created label .txt files for each of your images, using ALT or any other similar labeling tool. This Fiji plugin is for people who wants to quickly verify if all the labelling data is in right place, and error free.

It reads images and their corresponding label text file from same directory, converts label rectangles to permanent drawings, writes label’s name to the top of topleft corner, then saves the output as jpeg file to another directory, with “th_” prefix. It checks for unique label types and assigns a different color for each unique label (up to 9 labels, the remaining label types will be drawn in black). ESC key is used to stop running macro anytime.

You can quickly view the output images to see if any labels are misaligned, or in wrong place, at wrong dimensions, etc..

It also creates a list of unique labels found in the input folder, and saves the list to output directory as “list_of_labels.txt”.

You can choose;

  • Which image format will be processed from input folder (jpeg, png..)
  • Final image dimension (100%, 50% or 25%)
  • Font size of label text

for the output images.


Download current: Alp’s Label to Image (Windows & Ubuntu) ; 07mar2017

The plugin has been successfully tested on Windows 10 and Ubuntu 14.04 environments.

See down below for whats new in the current and links to older versions, in case if current version fails for some reason.

Open the archive file, drag and drop the plugins folder in it onto folder (Your Fiji program folder). This version was not tested throughly, but appears working in Ubuntu, too.


Whole installation process (including Fiji) and basic usage is documented in the video below.

Alp’s Labels to Images Converter Video (Youtube)


Please be sure that the input folder contains all the images and their text files, in the same folder (not in subfolders!). If there are image files without label files, program will stop with a warning.


  • Alps Label to Image (Windows&Ubuntu); 07mar2017
    • In this version, each label type have its own color, up to 9 different labels (remaining label rectangle and titles are drawn in black). Also asks for font size, for comfortable reading of printed labels.
    • Another feature is, it scans all label .txt files and creates a unique list of labels found in input folder. Then it saves the list as a text file to output directory as “list_of_labels.txt”. This way you can see if there are any problems with label names, like mispelled labels, etc.
  • Alps Label to Image (Windows); 02mar2017
    • Now rectangles have their label text on their topleft corners. Font size increases at different image scales so label’s name remains readable.
  • Alps Label to Image (Windows); 01mar2017

14 thoughts on “Alp’s Labels to Images converter, for Detectnet/KITTI

  1. Thanks for making these tools available I’m trying to verify some labels, but I’m getting the following error “java.lang.IllegalArgumentException: “Label” column not found”, even on images saved using the Alps labeling tool. Any ideas? The results window does show the correct bounding box area, but the labelled image is never output.

    An example that fails:
    dog 0.0 0 0.0 756 377 1176 1209 0.0 0.0 0.0 0.0 0.0 0.0 0.0


  2. I’m getting the same error. Here is the Stacktrace:

    (Fiji Is Just) ImageJ 2.0.0-rc-61/1.51s; Java 1.8.0_66 [64-bit]; Windows 10 10.0; 76MB of 12117MB (<1%)

    java.lang.IllegalArgumentException: "Label" column not found
    at ij.measure.ResultsTable.getStringValue(
    at ij.macro.Functions.getResultLabel(
    at ij.macro.Functions.getStringFunction(
    at ij.macro.Interpreter.getStringTerm(
    at ij.macro.Interpreter.getString(
    at ij.macro.Interpreter.doStringAssignment(
    at ij.macro.Interpreter.doAssignment(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doBlock(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doFor(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doBlock(
    at ij.macro.Interpreter.runUserFunction(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doBlock(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doIf(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doIf(
    at ij.macro.Interpreter.doStatement(
    at ij.macro.Interpreter.doStatements(


    1. Hi Robert, due to increased complaints about Labels to Images Converter, I made a clean install of Fiji, ActionBar plugin and the Labels to Images plugin, and all three were fresh downloaded from provided sources.
      My installed Java version is;
      Version 8 update 151 (build 1.8.0_151-b12)
      “Fiji about” says ImageJ 1.51s
      Result is, all working without any problems.

      I have no idea what else may cause such a problem, but as I said formerly, a couple of things to try, one is using one or a few images to make a test-run before executing it for a whole directory of images. Another thing is trying same test folder in another computer, by copying Fiji folder and test images folder from the problem computer to other one, to see if its system related issue.


  3. Running Windows 10. Watched the install video and everything is the same until I run the plugin. It’s asking me for a Input/Output directories which I don’t see in the video. So, I enter the directories and with a label font size of 40, click OK, choose ‘.jpg’ as the format, and then choose ‘100%’ on the output file dimension. Immediately get the following Macro Error:

    Invalid argument in line 54
    textlist = Array.slice(textlist, c, textlist.);


    1. Hello Jeremy,

      I tried something to replicate the problem but all failed. CouldnT get the error message you mentioned. I advise you to make a test by creating two empty folders, input and output. Then put a single image into input folder along with label text file and run the software. If it works, general problem sources to look are; unusual file/folder names-extensions, broken image files, problems within label txt files.
      If single file fails too, just load it to ALT to see if labels are correctly placed and save it (overwrite), then make a test. If labels to images still fails, you may need to reinstall fiji and other necessary stuff into another new folder to test the situation with a fresh install.


      1. My use case is that I’m trying to create a set of KITTI annotations based upon a directory of images only. I didn’t realize there was a requirement that a corresponding .txt file for each image also be present. Once I add a .txt file it then gives me a warning, but now complains that the .txt file is empty. I would suggest that the error that is given when the .txt file is missing should be more user friendly.

        Your documentation does not list any prerequisite steps to prepare the input images directory and is assuming an existing .txt file. I have 100’s of images and now need to create a conforming .txt file for each image to use your plugin. Can you list out a process of what that requirement is and how to prepare them?


      2. Ok… I think I have solved my issues. There are two plugins, not one. That part was unclear to me initially as I started with the “Labels to Images” converter here. Both of the plugins are very similarly named so I was thinking it was a version difference. Thanks.

        Liked by 1 person

      3. Hi Jeremy, I have further modified the text to clarify this is not step.1 tool for labeling process, But for the makers, sometimes it can be quite easy to make assumptions about the way people read the info, thanks for the aid actually, and hope the toolset works well for you.

        Liked by 1 person

  4. ‘[‘ or ‘.’ expected in line 268:
    if ( xaa < 8 ) { run ( “Colors…” , “foreground=” + coloruniq [ xaa [ 0 ] ] + “” ) ;

    I am getting this error as I run the labels to images converter. no output is obtained.
    Please suggest what might be wrong


    1. Hello,
      Can you please provide a bit info about the data you use? The image format, rgb-greyscale, resolution, number of classes?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s