prabindh / euclid

Euclid object labeller for frictionless object detection training purposes in Machine learning frameworks (KITTI, YOLO)
45 stars 20 forks source link

euclid labeller, and euclidaug augment engine for friction-less Deep Learning

Euclid object labeller for object detection training purposes based on Python. Tested on Linux, Windows, and Mac.

Dynamic selection of format is now supported.

Optimised box selection using keyboard shortcuts.

Example output from the IEEE paper "On the Applicability of Deep Learning for Road Signal Recognition", by Vinicios R. Soares, Mathias R. Luz, Afonso H. Ribeiro, Rafael S. Rbeiro, Marcella S. R. Martins, Max M. D. Santos, and Joaquim de Mira https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8627071

alt text

Typical object labelling workflow using Euclid:

Create a folder containing the images

Resize all jpg images to 256x256, rename to sz-256-.jpg

for file in *.jpg; do convert $file -resize 256x256 sz-256-$file; done

YOLO training and detection.

Refer below link for YOLO training and detection on Linux and Windows.

https://github.com/prabindh/darknet

Prebuilt binaries for Yolo are provided at https://github.com/prabindh/yolo-bins

Euclidaug image augmentation engine (frictionless Deep Learning)

Euclidaug automates the annotation task, so that developers can focus on gathering insights and improving accuracy, than spending time on manual labelling. Combined with AI generated artifical images (like https://generated.photos/), training becomes easy.

alt text

Lack of training images reduces training accuracy, when manual annotation is not an option. euclidaug serves to improve availability of training images, specially 2D.

Euclidaug can generate 1000s of precisely annotated/labelled training images in minutes, without manual work.

Example application of Euclidaug (auto-annotation)

For an example of auto-annotation of industrial capacitors to detect in a PCB using euclidaug, refer to https://github.com/prabindh/yolo-bins/tree/master/capacito

Installing euclidaug

cd euclidaug

pip install -r requirements.txt

Augmentation operations:

Random scaling, random packing, and random blending - are the operations performed on the images

Purpose of euclidaug:

To significantly augment availability of annotated data (# of images), specially 2D shapes for object recognition. Targeted for Yolo, SqueezeDet, Tensorflow (and others that support KITTI and Yolo formats)

How to run for example animal images (part of the tree):

(The images were taken from https://www.freeiconspng.com/img/1075, https://www.freeiconspng.com/img/1065, https://www.freeiconspng.com/img/1052)

Assuming euclid is cloned at c:\xxx, run the below command:

python euclidaug.py C:\xxx\euclid\euclidaug\sample-objects C:\xxx\euclid\euclidaug\sample-background C:\xxx\euclid\euclidaug\train-sample.txt

After seeing below, the augmented outputs will be generated in out_images and out_labels.

Info: Added [3] object images, Max obj/class of [1] Info: Added [1] base images Info: Beginning [11] images @ 0.421875 (sec) ........... Info: Completed @ 0.265625 (sec)

How to run adding new classes: