AutoAnnotator - MacOS Utility App

Automatic Image Annotator for Computer Vision

in Image Annotation Computer Vision Object Detection MacOS Swift

January 11, 2023

Introduction

Data Collection is a major step in every Machine Learning projects. The quality and quantity of data alone can greatly impact the results of the model. AutoAnnotator is an open-source automatic image annotator created using the Swift and Python. It’s an updated version of AutoLabelMe, the GUI I wrote using Tkinter library in Python for my Internship at Hubert Curien Laboratoire.

It matches the template provided by the user in an image and find same objects associating a bounding box and label for every object. AutoAnnotator uses Normalized Cross-Correlation to check whether two templates are similar. It is designed keeping in mind with the necessity of creating dataset for object detection purposes.

 
 
 
 

Installation

Currently only for Macos, AutoAnnotator is released.

Prerequisites

  1. MacOS
  2. Anaconda Distribution
  3. Python

Python Library Requirements

1. Numpy

user@Mac ~ % conda install numpy 

or

user@Mac ~ % pip install numpy

2. Pandas

user@Mac ~ % conda install pandas 

3. Opencv

user@Mac ~ % conda install -c conda-forge opencv 

or

user@Mac ~ % pip install opencv-python

4. PIL

user@Mac ~ % pip install Pillow

Installtion of the python libraries is necessary for the app to run effectively. If you don’t have it installed or if the selected python environment in the app don’t have it installed, the app will install it automatically. This may delay results.

Tutorial

The first two steps are very important. These two steps are to be done only once.

Change Python Environment

l

AutoAnnotator is written in Swift and Python and it only requires that Python is installed in your machine. You don’t need to install Swift. The libraries mentioned here are necessary for automatic box generation purposes. When you will first open AutoAnnotator, it will choose the default Python Environment which mayn’t have those libraries installed.

Your system may have multiples python environments, this step will make sure you load the correct environment in the app.

Click on 'Settings'
No Image

When the popover appears check the python path. The path may be like this

/opt/homebrew/bin/python3

If you have installed the libraries in any anaconda enviroment then change the path to the anaconda python environment.

Click on 'Change Path'
No Image

The anaconda environment paths look like these.

~/anaconda/bin/python3
~/anaconda/envs/your-environment-name/bin/python3
~/anaconda/envs/your-environment-name/bin/python

*Once this step is complete, check the path and restart the app for the changes to take effect. This step is to be done only once when you first open the app.

Path for Python Scripts

l

Some Python Scripts are provided with the installation file. You need to load the scripts in Settings/Load Scripts and choose the location where you have unzipped the downloaded file.

No Image

*No need to restart after this step. This step is to be done only once when you open the app for the first time.

Add New Images

l

To add one or multiple images, follow these steps

Click on the + button in the middle or 'New Image' button on the sidebar.

Add one or multiple images
No Image

Go to Next Image

l

Click on the 'next' and 'previous' button to navigate through images.
No Image
To move to your desired image, 
click on the current image name tab and 
a popover will appear where names of every open images are available. 
Click on the image name you want to load.

Draw Rectangle

l

Click on 'Draw Rectangles' on the sidebar and start drawing on the image.
No Image

When drawing mode is enabled, you can’t move the image. To move the image, click on ‘Move image’.

Move Rectangle

l

Following video demonstrates how to change the box position.

Resize Rectangle

l

To resize an image click on the red circle of the box 
and drag it to increase or decrease the size of the box.

Match Rectangles

Examples

Posted on:
January 11, 2023
Length:
4 minute read, 707 words
Categories:
Image Annotation Computer Vision Object Detection MacOS Swift
See Also:
Point Cloud
Part 2 - Point Cloud Segmentation
Part 1 - Point Cloud Introduction