Matlab has a fairly extensive suite of examples for object detection using Neural Networks.
In the YoloV3 example, the tools need as input a table with a particular format. I have a custom dataset, with custom boxes, but am not able to get the table formatted correctly.
The "expected" format for this table is something that looks like this (when viewed in the data explorer)
i.e. a table where the Vehicle column has arrays of 4 elements.
Now, I defined my own table as follows:
>>myStruct(1)
ans =
struct with fields:
imageFilename: 'E:\data\NeuralNetwork\cornertrain1\0c7a2fcc-1ff6-4582-b982-70e2c3f710b9.jpg'
vehicle: [183 145 494 82]
>> cornerTable = struct2table(myStruct);
But it's format is quite different, it has 1 vehicle column with 4 subcolumns.
How do I make a table with my struct with a format so that the "vehicle" column has arrays of 4 elements?


The issue was a misunderstanding I had of how tables work.
To determine the datatype of a column of a table, use the
classfunction. So, in the original table, we have:And the solution I posed, is not using cell arrays at all. The better way to do this construction is to create two cell arrays,
imageFilenamecontaining char arrays,vehiclecontaining 4 element arrays.Then, the standard table command "just works"
I realized this after I posted the question.