Cartucho / OpenLabeling

Label images and video for Computer Vision applications
Apache License 2.0
926 stars 265 forks source link

Add VOC format #8

Closed MattKleinsmith closed 6 years ago

MattKleinsmith commented 6 years ago

A fresh pull request with respect to: https://github.com/Cartucho/yolo-boundingbox-labeler-GUI/pull/6

I made a fresh pull request so that only my changes are highlighted.

If a user tries to use multiple bounding box formats on the same image, there will be an error. I added error messages to guide them.


YOLO is the default and python run.py will still work normally.

To enable VOC: python run.py --format voc

Users will likely have to further process the bounding box text files to match their pipeline, but this should make it easier for them, since they won't have to undo YOLO normalization.

MattKleinsmith commented 6 years ago

Some changes I will propose after this pull request (the code is ready):

I mention these so we don't duplicate work and so we don't accidentally make mutually exclusive changes.

Cartucho commented 6 years ago

@MattKleinsmith great ideas!

Cartucho commented 6 years ago

@MattKleinsmith this should be changed: line 91 and 92

def voc_format(class_index, point_1, point_2):

Order: xmin ymin xmax ymax class

# Top left pixel is (1, 1) in VOC

From:

To:

This way we make sure we store xmin, ymin, xmax, ymax