Blenderproc: Generating training image annotations in a flat text file

Created on 17 May 2021  路  2Comments  路  Source: DLR-RM/BlenderProc

Some DNN frameworks, e.g. Darknet, consume training image annotations in a flat text files, one per image, with lines in this format:

<object-class> <x_center> <y_center> <width> <height>

Is this format available in BlenderProc?

question first answer provided

All 2 comments

Hi @pauljurczak,

there is currently no writer module that outputs directly this specific format. However, we have a CocoAnnotationsWriter module that also outputs object-wise bounding boxes, but in a different format. So, either you use the CocoAnnotationsWriter and then write a script to transform the coco annotations into such text files or you write your own Module that can do that directly.

If you decide to write your own module, I would recommend to also reuse most of the code from the CocoAnnotationsWriter, so only have to change the way the information is written to file (see e.q.: https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/src/utility/CocoWriterUtility.py#L281)

Let me know if you need any further help

I assume this helped. I close this for now.

Was this page helpful?
0 / 5 - 0 ratings