ZumoLabs / zpy

Synthetic data for computer vision. An open source toolkit using Blender and Python.
GNU General Public License v3.0
302 stars 35 forks source link

Convert COCO annotations .json file to TensorFlow .record file #149

Closed franferraz98 closed 3 years ago

franferraz98 commented 3 years ago

I'm currently trying to train a Tensorflow model using ZPY-generated data. I'm new to both of them, but as far as I know I need a .record file for my training and test sets to be interpreted by the model.

Are there any available scripts that transform ZPY's output into this format? I'm currently only working with bounding boxes and I think I can handle it manually, but soon I'll probably need segmentation images too and that seems a bit more complicated.

Also, I noticed that TensorFlow itself has a 'create_coco_tf_record.py' script, but I haven't been able to get it to work. Is that what you usually use?

Thanks in advance.

hu-po commented 3 years ago

Unfortunately don't have a script on hand for you since we use PyTorch internally for ML. However, doing some searching on the internets there are a couple different solutions that come up:

The answer should be somewhere in those sources. Hope this helps!

franferraz98 commented 3 years ago

In the end I used this script that is included with Tensorflow. It generates a bunch of .record files that you then need to merge, which I did using this.

Thanks for everything!