Help Overview


RectLabel

An image annotation tool to label images for bounding box object detection and segmentation.

Customize the label dialog to combine with attributes

Key features

Drawing bounding box, polygon, and cubic bezier

Export index color mask image and separated mask images

1-click buttons make your labeling work faster

Customize the label dialog to combine with attributes

Settings for objects, attributes, hotkeys, and labeling fast

Search images whose labels include keywords

Layer order for overlapped boxes

Quick zoom to existing boxes

Support the PASCAL VOC format

License policy

You can use RectLabel to develop the commercial object detection system.

Found some problems?

Post the problem to our Github issues page

Have questions?

Send an email to support@rectlabel.com

Thank you.

Requested features

  • Create an image rotation tool
  • Switch different objects and attributes settings for different label task.
  • Export to the YOLO format.
  • Export to the KITTI format.
  • Import movie to image frames.
  • Select multi values of attributes.
  • Auto completion to label selection dialog, if you have a loot of labels it is easier to tape a few letters.
  • An option to pin that label selection dialog so it doesn’t dissapear after Ok was clicked.
  • Browse a list of the images rather than having to flick through each image.
  • Add labels to the bounding boxes to make it easier to see which box is what.

Troubleshooting

  • Cannot save bookmark to the folder
    1. Delete RectLabel via the Launchpad app
    2. Log out of the Mac App Store.
    3. Reboot your Mac.
    4. Log back in to the Mac App Store and install RectLabel.
  • To solve the problem when you buy in-app purchase
    1. Delete RectLabel via the Launchpad app
    2. Log out of the Mac App Store and iTunes.
    3. Reboot your Mac.
    4. Log back in to the Mac App Store and install RectLabel.
  • To solve the problem when you see "Account Not In This Store" message
    1. Click "Change Store" button on the dialog.
    2. Click the "Featured" tab on the App Store app. This stops the loading animation on RectLabel.
    3. Change to your country on the App Store app.
    4. Click the "Featured" tab on the App Store app.
    5. Press the buy button again on RectLabel.
  • To confirm your purchase, "Restore purchase" from App menu at the top of the screen.

In-app purchase

Existing users

To acquire more new users and prevent pirating, we made RectLabel to be freemium model.

The save button is locked as default.

For existing users, you can download the Full App for free to unlock the save button.

New users

For new users, you can download the 2-Week Trial Free to experience full features of RectLabel.

After the 2-Week, the save button will be locked so that you can just view the label data.

To unlock the save button, please buy RectLabel.

Refresh receipt

Once a month, we ask you to refresh your app purchase receipt to the latest one.


Images and annotations folder

Open images and annotations folder

Open the folder which includes images and the annotations folder which includes PASCAL VOC XML files.

Click the right arrow or left arrow button to change the image.

To adjust the contrast of the image, click the contrast button on the upper right corner.

Save annotations

The label file is saved as "image_file_name.xml".

Output format

The label file is saved in the PASCAL VOC format.

The top-left pixel in the image has coordinates (1, 1).

The VOC2007 Development Kit

The rotated box is saved in the format as (center_x, center_y, width, height, rotation).

The rotation is ranged between 0 and 2Pi.

Here is an example of the PASCAL VOC format.

<annotation>
    <folder>_image_fashion</folder>
    <filename>yaroslav-blokhin-364678.jpg</filename>
    <size>
        <width>959</width>
        <height>1440</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>sneakers</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>0</difficult>
        <bndbox>
            <xmin>267</xmin>
            <ymin>1238</ymin>
            <xmax>369</xmax>
            <ymax>1359</ymax>
        </bndbox>
    </object>
    <object>
        <name>glasses</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>0</difficult>
        <rotated_box>
            <cx>470</cx>
            <cy>460</cy>
            <width>101</width>
            <height>35</height>
            <rot>0.233043</rot>
        </rotated_box>
        <polygon>
            <x1>425</x1>
            <y1>489</y1>
            <x2>523</x2>
            <y2>465</y2>
            <x3>515</x3>
            <y3>431</y3>
            <x4>417</x4>
            <y4>455</y4>
        </polygon>
        <bndbox>
            <xmin>417</xmin>
            <ymin>431</ymin>
            <xmax>523</xmax>
            <ymax>489</ymax>
        </bndbox>
    </object>
    <object>
        <name>top</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>0</difficult>
        <polygon>
            <x1>352</x1>
            <y1>816</y1>
            <x2>365</x2>
            <y2>556</y2>
            <x3>617</x3>
            <y3>551</y3>
            <x4>620</x4>
            <y4>822</y4>
        </polygon>
        <bndbox>
            <xmin>352</xmin>
            <ymin>551</ymin>
            <xmax>620</xmax>
            <ymax>822</ymax>
        </bndbox>
    </object>
    <object>
        <name>hat</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <occluded>0</occluded>
        <difficult>0</difficult>
        <cubic_bezier>
            <x1>408</x1>
            <y1>453</y1>
            <x1_c1>407</x1_c1>
            <y1_c1>417</y1_c1>
            <x1_c2>408</x1_c2>
            <y1_c2>488</y1_c2>
            <x2>521</x2>
            <y2>381</y2>
            <x2_c1>562</x2_c1>
            <y2_c1>383</y2_c1>
            <x2_c2>479</x2_c2>
            <y2_c2>378</y2_c2>
            <x3>573</x3>
            <y3>462</y3>
            <x3_c1>574</x3_c1>
            <y3_c1>497</y3_c1>
            <x3_c2>572</x3_c2>
            <y3_c2>426</y3_c2>
            <x4>525</x4>
            <y4>523</y4>
            <x4_c1>483</x4_c1>
            <y4_c1>520</y4_c1>
            <x4_c2>566</x4_c2>
            <y4_c2>525</y4_c2>
        </cubic_bezier>
        <bndbox>
            <xmin>408</xmin>
            <ymin>381</ymin>
            <xmax>573</xmax>
            <ymax>523</ymax>
        </bndbox>
    </object>
</annotation>

Export label map

From File menu, select "Export label map".

The label map for TFRecord is created from the objects table on the settings dialog.

Bringing in your own dataset on Tensorflow Object Detection API

Here is an example of the label map.

item {
  id: 1
  name: 'car'
}

item {
  id: 2
  name: 'plate'
}

item {
  id: 3
  name: 'person'
}

item {
  id: 4
  name: 'dog'
}

Export TFRecord for Tensorflow

To convert PASCAL VOC XML files to the TFRecord file, use the code below.

rectlabel_create_pascal_tf_record.py

python object_detection/dataset_tools/rectlabel_create_pascal_tf_record.py \
    --images_dir="${IMAGES_DIR}" \
    --label_map_path="${LABEL_MAP_PATH}" \
    --output_path="${OUTPUT_PATH}" \
    --include_masks

To convert COCO JSON file to the TFRecord file, use the code below.

rectlabel_create_coco_tf_record.py

python object_detection/dataset_tools/rectlabel_create_coco_tf_record.py \
    --train_image_dir="${TRAIN_IMAGE_DIR}" \
    --val_image_dir="${VAL_IMAGE_DIR}" \
    --train_annotations_file="${TRAIN_ANNOTATIONS_FILE}" \
    --val_annotations_file="${VAL_ANNOTATIONS_FILE}" \
    --output_dir="${OUTPUT_DIR}" \
    --include_masks

With the code above and exporting mask images, you can train the Mask R-CNN model with your own data.

Export mask images for the image

From File menu, select "Export mask images for the image".

The segmentation mask images are exported for the current image.

For an index color mask image, all objects and their overlaps are calculated based on the layer order in the label table.

Pixel values are set based on the "id" in the label map. For the background, 0 is set.

The index color table is created from object colors on the settings dialog.

For separated mask images, pixel values are set 255 for the foreground and 0 for the background.

The suffix numbers of separated mask images are based on the layer order in the label table.

The segmentation mask images are saved as the PNG format in the annotations folder.

Run an instance segmentation model on Tensorflow Object Detection API

Export mask images for all images

From File menu, select "Export mask images for all images".

The segmentation mask images are exported for all images in the folder.

Export index color mask image and separated mask images

Export XML files to COCO JSON file

From File menu, select "Export XML files to COCO JSON file".

The PASCAL VOC XML files are exported to the COCO JSON file.

COCO JSON format

For the "segmentation", we use the same mask images as exporting mask images feature.

The mask images are encoded as RLE using the COCO Mask API.

"segmentation" : {
  "size" : [
    960,
    768
  ],
  "counts" : "Q_h98bg06O1O1O1O1O1N2O2N1O1O1O1N2O1O1O1O1O1N2O1O1O1O1N2O1O1O1O1O1N2O2N1O1O1O1N2O1O1O1O1O1N2O1O1O1O1N2O1O1O1O1O1N2O2N1O1O1O1N2O1O1O1O1O1N2O1O1O1O1N2O1O1O1O1O1O101O000001O00000000000000001O0001O00001O001O01O01O00001O001O01O01O00001O001O00010O00001O00001O0010O0001O00001O001O01O0001O01O1O1O1O2O0O1O1O2N1O100O0000000001O01O00000001O00000000001O00000000010O00000000001O0001O001O010O001O001O01O01O001O0010O01O001O0001O00000000001O0000001O1O1N2O1O1O2N1O1O1O1O1O2N1O1O1O1O1O2N1O1O1O1O1O1O000000O100000O10O1000000O1000000O100000000O1000000O1000000O100000000O0100000O1000000O100000000O1000000O1000000O100000000O1000O10O1000000O100000000O1000000O100O1O100O1O1O1O100O1O1O10O01O1O1O100O1O100000000000000000000000001O000000000000000O10000O2O0O10000O10000O100O10001N100O1001O00001O00000010O0001O00000106I7I6K6I7I7F9VOPR]3"
},

To decode the RLE and use the mask images in your python code, use the code below from rectlabel_create_coco_tf_record.py.

binary_mask = mask.decode(object_annotations['segmentation'])
mask_shape = binary_mask.shape
binary_mask = np.ravel(binary_mask, order='F')
binary_mask = binary_mask.reshape(mask_shape, order='C')

Export bndboxes in XML files to CSV file

From File menu, select "Export bndboxes in XML files to CSV file".

The bndbox objects in the XML files are exported to a CSV file.

(x, y) means the center of the box.

path,annotations
/Users/ryo/Desktop/test_annotations/test_data/25024276-157392571702156-8268897881251905536-n.jpg,"[{'label':'shoes-socks-gray-right','type':'rectangle','coordinates':{'height':111,'width':46,'x':488,'y':654}},{'label':'shoes-socks-gray-left','type':'rectangle','coordinates':{'height':50,'width':81,'x':491,'y':929}}]"
/Users/ryo/Desktop/test_annotations/test_data/26227988-136834470324614-1140197337574932480-n.jpg,"[{'label':'shoes-bare feet-right','type':'rectangle','coordinates':{'height':138,'width':68,'x':434,'y':832}},{'label':'shoes-bare feet-left','type':'rectangle','coordinates':{'height':145,'width':74,'x':483,'y':855}}]"

To convert to the sframe file for Turi Create of Apple, use the code below.

convert_csv_to_sframe.py

python convert_csv_to_sframe.py "${EXPORTED_CSV_FILE}"

Import rectangles in CSV file to XML files

From File menu, select "Import rectangles in CSV file to XML files".

The rectangle objects in the CSV file are imported to the XML files in the current folder.

Be careful that importing would overwrite the current label files.

Before importing, the current annotations folder is backed up.


Create and edit annotations

Create box

Change the mode to "Create box".

Drag on the image to draw a box.

When you finished dragging, the label dialog would open.

The label would be added to the label table on the right.

Drag the center of the box to move the box.

Drag one of the four corner points to transform the box.

To change the color of the box, click the color picker on the upper right corner.

Create polygon and cubic bezier

Change the mode to "Create polygon" or "Create cubic bezier".

Click to add points.

Press enter key to finish drawing.

Press escape key to cancel drawing.

The number of points has to be greater equal than 3.

When you right click on the point, edit menu would open.

"Add a point forward" and "Add a point backward" to add a point.

"Delete this point" to delete the point.

"Point size up" and "Point size down" to change the size of points.

"To cubic bezier" and "To polygon" toggle the polygon type.

Move box

Change the mode to "Move".

Drag the box or the image to move its position.

For the image, mouse wheel can be used, too.

When you click on the box or the label, four corner points would open.

Drag one of the four corner points to transform the box.

When you right click on the box or the label, edit menu would open.

"Focus" to quick zoom to the existing box.

"Edit" opens the label dialog, "Duplicate" to duplicate the box, and "Delete" to delete the box.

When you double click on the box or the label, the label dialog would open.

To change the layer order of the box, drag the label in the label table upward or downward.

Rotate box

Change the mode to "Rotate".

Drag up or down to rotate the box.

Zoom in, Zoom out

Click a position to zoom in or zoom out.

Zoom fit

Clear zoom.

Pinch zoom, pan, and swipe between images using Trackpad

Slide two fingers up or down to scroll the image.

Double-tap with two fingers to zoom in and out.

Pinch with two fingers to zoom in or out.

Swipe left or right with three fingers to show the previous or next image.

To use Swipe, you have to change the System Preferences on your mac.

For "Swipe between pages", select "Swipe with two or three fingers" or "Swipe with three fingers".

For "Swipe between full-screen apps", select "Swipe left or right with four fingers".

Delete box

You can select multiple boxes and delete them.

Move image

You can move the image and the label file to the specified folder.

Load labels of another image

Press the shortcut key "command + I" to load the previous image's labels.

If you want to load the 1st image's labels on the 3rd image, press the shortcut key "shift + command + I" on the 1st image and press the shortcut key "command + I" on the 3rd image.

Search images

When you open the folder, we read all xml files in the folder at first and then start indexing them in an asynchronous way.

When you edit some label files, we track which label file was edited.

At the next indexing, we reload the edited label files.

With the empty search text, you can search images not labeled yet.

To clear the search result, use "Clear search images".

If the number of search result is zero, we do nothing.

We are using Search Kit which is Apple's content indexing and searching solution.

You can use Wildcard, AND, OR, NOT, and more in the search text.

Query operators in Search Kit

Settings for objects, attributes, hotkeys, and labeling fast

Read image and memo CSV file

This is useful when you edit specific label files based on some memo.

Here is the example of the CSV format.

image,text
26157415-386396491811054-4332315807620005888-n.jpg,stripes 2
26863805-1893959310636648-3775075699686113280-n.jpg,stiletto 3
...

Read image and loss list CSV file

This is useful when you edit specific label files based on loss list from training.

Here is the example of the CSV format.

image,loss_color,loss_texture
20481859-332470370529981-2506007812560125952-n.jpg,0.254,0.050
20481859-332470370529981-2506007812560125952-n.jpg,0.205,0.011
...

Settings

Objects

When you label "sneakers" which uses 3 attributes "color", "brand", and "side".

Settings for objects, attributes, hotkeys, and labeling fast

Attributes

The label "sneakers-yellow-converse-right" is a combination of the object and attributes.

"-" is used as a separator so that "-" in the attribute name would be converted to "_".

To change the name on the items table, click or press the enter key on the selected item.

Settings for objects, attributes, hotkeys, and labeling fast

Hotkeys

Customize the hotkeys to make your labeling work faster.

Settings for objects, attributes, hotkeys, and labeling fast

Here is the default hotkeys.

Open folder ⌘O
Next image
Prev image
Jump to Image Index ⌘J
Save ⌘S
Load Prev Image's Labels ⌘I
Set Image Index to load Labels ⇧⌘I
Create box ⌘N
Create polygon ⌘P
Create cubic bezier ⇧⌘B
Move ⌘M
Rotate ⌘R
Zoom in ⇧⌘↑
Zoom out ⇧⌘↓
Zoom fit ⌘0
Settings ⇧⌘T
Focus box ⌘G
Duplicate box ⌘D
Delete box
Delete image ⌘⌫
Hide other boxes ⌘B
Skip label dialog when create ⌘K
Next label ⌘→
Prev label ⌘←
Clear label history ⇧⌘0
Search images ⌘F
Clear search images ⇧⌘O
Layer up ⌘↑
Layer down ⌘↓

Label fast

"Auto Save" is to skip the confirm dialog when you change the image.

"Skip Label Dialog When Create" is to skip the label dialog when you create a box.

"Use 1-click buttons" shows 1-click buttons on the label dialog using the label history.

"Close dialog when select a object" is to skip clicking the OK button on the label dialog.

"Maintain zoom when change the image" is to maintain zoom when you change the image.

Settings for objects, attributes, hotkeys, and labeling fast

Others

"Allow outside the image" is to move the box outside the image.

"Fix the image position" is not to move the image position with dragging and mouse wheel.

"Use truncated, occluded and difficult" shows those parameters on the label dialog.

"Use aspect ratio when draw boxes" shows the aspect ratio on the Objects tab.

"Hide arrow buttons" is to hide arrow buttons on the image.

"Hide label name on the image" is to hide the current label in the label history on the image.

"Sort images" is to sort images by Alphabetic, Numeric, and Last modified.

"Annotator" is saved in the xml file.

Settings for objects, attributes, hotkeys, and labeling fast

Export and Import the Settings File

From File menu, you can export the current settings file and import to another computer.