Tfrecord generation and label map decodeerror tensorflow 2

Hi!

i´m quite new to tensorflow and the computervision/machine learning scene.
I was wondering if there is a script for generating tfrecord from csv-files?

All i can find on the tens github is for tensorflow 1 and it gives me tons of flags-errors.

While i´m at it; as i’m new ill share my plan of workflow and if someone sees any way to make it easier please don´t hesitate to say something. The goal is to get a model working and after this beeing able to go back and study more, i just want to see that its actually working so that i don’t dig deep into something i should not dig into.

the hope is to create a model detection model to run in a oak-d camera using depthai
windows 10 (with gforce and cuda installed and working)
tensorflow 2.8
i have about 300 pictures and xml for theese (made with labelimg)
I have created a cvs file from theese


i have a label map that is giving me a headache. i have made it by just taking a .txt-file and adding pb in the ending. When i try to read it in a couple of different scripts i get a “unicodedecodeerror: utf-8 codec can’t decode byte 0xc5 in position (usually 114): invalid contonuation byte”.

If i got this right it means that the script reads something as utf-8 that should be read as probably latin-1? Does anyone know how to create a label map .pbtxt that does not give this error? I have been googling foa couple of hours and a lot of people have an ide of the problem, some even suggest why the problem occurs but there are a very limited number of solutions and sofar none that works for me. So, does anyone know how to create a label map that does not throw this error?


back to it;
when i manage to create tfrecord my plan is to load this into openvino using the model-optimizer (i think its called mo.py) to create a file that later can be converted to a blob using depthai blobconverter.

This is the planned method, does anyone see anything that i could do to make my trip to a working model in a oak-d camera easier?

Sorry for the spelling and if some the questions are a bit diffuse.

Martin

Hi again.

Well i can add that the question about the Label_map not behaving as it should is solved. It was me who did not behave… :slight_smile: