The intelligent way to label data... I think...
This project uses Mathematica notebooks for a GUI component.
Mathematica is nice because it is cross-platform and has a massive standard library for many tasks related to robotics from image processing and machine learning to symbolic math to GUI design. It is also free for UTSA students.
Mathematica Setup Steps:
-
To get free access to Mathematica, go to the Access to Wolfram Products page and enter your UTSA email.
-
Next, go to the Wolfram Account page and sign in with your UTSA email.
-
Then, go to the User Portal page and select "Get Downloads" next to the latest version of Mathematica you have access to.
-
Select the download for your operating system. "Mathematica (with web documentation access)" is preferred because it is a smaller download.
-
When finished, enter the activation key from the same downloads page.
Make sure you have downloaded the dataset you want to label to your computer. The dataset is nothing more than a folder of pictures. Next, open the NeuralLabeler.nb
Mathematica notebook.
- Run the initialization cell to load in the labeler functions
- Run the dataset folder cell and click on the "Browse..." icon to select the image folder you want to label.
- Set the list of labels to use {"label1","label2", ...}
- Run the
labeler[photoDirectory, possibleLabels]
function to start the labeling GUI.
Labeling: ✏️
- To draw a box, click on one corner then click on the other.
- Labels are saved automatically when you switch images.
- You can start by using the buttons at the top of the labeling GUI.
- You can also use keyboard shortcuts
- Number keys select the current label
- Space bar is the next image
- Right/Left arrows are next/previous image
- "a" and "d" are also next/previous
- Esc or Backspace deletes the last box.
Note, if the keyboard shortcut keys do not work, you need to select the cell that has the GUI. The easiest way to do this is to click on the text at the bottom of the GUI like "Bounding Boxes" next to the box count.
Our notebook also has utilities for working with and collecting image data. The first tool "Image Optimizer" will resize images and save them as .png formatted data. You can change the size using the "imageSize" variable.
There is also a "VideoSplitter" utility that will read a video file and save images at the specified frame rate to an output folder (by default next to the video file selected). Use this to generate training data from a video file.
To run these utilities, execute them one block at a time using [shift] + [enter]
and select input folders/file paths as needed.
labeler.wl
- a collection of WL (Wolfram Language) functions to help with bounding box labelsNeuralLabeler.nb
- a Mathematica notebook for creating bounding box labelsREADME.md
- your friendly guide into the world of symbolic computation for data processingCOPYING
- ⚖️ the MIT license ⚖️