SVHN dataset and Tensorflow extensive usage

Hi,

I’m a Data Scientist student, currently in an internship, and one of my objective is to create a multi-digit object detection app. For that, we decided that I’ll use tensorflow backend and google’s SVHN dataset. After having a lot of trouble making it work, I happened to discover this amazing api for object recognition, witch fits perfectly my need ! I did try it for a unique class dataset, and it works perfectly, but multi class, especially if you have multiple objects on a same image of your training set, is something I obviously didn’t understand.
So I have two questions :

  1. It seems I have labelling problems, because training won’t start, and error says : “Some labels have no annotations !” and “TypeError : object of type ''NoneType” has no len()’. So my wonders concerning the dataset and the xms are the following : how do we have to put them in folders ? A folder for each class ? Because SVHN is multi-digit, from 1 to 4 digits an image, so I’m not really sure how to classify them in a way ImageAI understands it (my corresponding xmls are in PascalVOC format already I think.)
    For now, my Project directory looks like that:

and finally my train.py :


2) After my training, I would like to use the custom trained Yolov3 model in tensorflow, but I keep on getting weird outputs that I don’t understand, some list of list of list. So my question is : can I train a custom yolov3 with ImageAI and use it as a tensorflow keras model (.h5 file created at the end of training), convert it to Tensorflow.js format or tflite for exemple, and if yes, how to use it ?

Thank you so much in advance for the time, it would help me so much !

Edit

Seems like I fixed most of my problems of question 1, except one : "it seems like the model doesn’t accept the “10” class, as it is the class meant for “0” in the SVHN dataset. Anyone knows why/has a similar experience ?
And still, question 2) isn’t clear to me, thanks for everything !

1 Like

@lumau I haven’t work with Tensorflow.js and SVHN before. The custom detection training API can allow you train on any number of classes, which must be specified has a string in the objects_array parameter during training. Is the trained model generating detection results for “0” instead of “10”?

Hi
I am trying the same thing. Like I have a training image and corresponding xml file has more than one object of different classes. Im facing the same issue as yours. Could you explain how you solved it?