Skip to content

KeramKeram/VocImageLabeler

Repository files navigation

VocImageLabeler

This tool currently working both on nvidia jetson(nano) and you need jetson sdk installed https://github.com/dusty-nv/jetson-inference
It's work only with ssd-mobilenet-v1.

Or on PC by using pytorch-ssd project(check on github). It's work only with ssd-mobilenet

Scenario of usage

When you need to learn model to object detection your algorithm looks like this(jetson dusty script):

  1. Gather images,
  2. Create txt file with labels,
  3. Label images(as voc),
  4. Train model

But when you are testing trained model you see that he is detecting objects but still is not good at this. Then you need to do is:

  1. Gather more images,
  2. Label them(as voc),
  3. Train model

Of course labeling take time. Perhaps good idea it would be tried to label new images by previously trained model and then
manually fix/add labels for not correctly detected objects. And this is what this software does. It is taking path to model, path to folder with images, path to labels and generate .xml voc files. Of course not all files will be correctly label because model is not ideal, but it can speed up process.
This is an image

Running software

It was tested on jetson nano with ubuntu 18.04 with jetson dusty(L4T-R31.0) and jetson sdk 4.3. It was tested on PC with Geforce 1060 6 GB on Ubuntu 20.04. Let's say that in /home/user we have directories: pictures, models. In picuters we have our data set, in model directory model and labels text file.

  1. Run script main.py
python3 main.py
  1. Script will first ask if you want to run it on jetson nano or on PC.
  2. Script is using text interface he will ask for three paths and confidence(value above which the object is detected) for example we enter:
Path to images:/home/user/pictures
Path to labels:/home/user/models/labels.txt
#in case of jetson
Path to model:/home/user/models/ssd-mobilenet.onnx
#in case of Pc we use .pth files of ssd model
Path to model:/home/user/models/mb1-ssd-Epoch-199-Loss-0.7120061775048574.pth
# When net have at least 40% of confidance that object was detected than mark him on picture
Level of confidence(1-100):40

4.After script will end his work(sipmly program will end with 0) we go to /home/user/pictures and we will see voc xml files.
xml files names is the same like pictures. Of course because model is not ideal not all images will be have coresponding xml file(no detections in image) or in some files we can find mistakes.
Program is working but is still in development, refactors of code etc.

About

tool for auto labeling images in VOC who is using ML model for that.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages