How to convert from structure to table?

29 views (last 30 days)
Kev on 26 Oct 2020
Commented: Kev on 29 Oct 2020
Hope everyone is doing well! I am following YOLO example for inferences with my own dataset. I noticed the example had annotations in the format like below in a table format (imagefilename cloumn, and vehicle column).
While the annotations file that I have has a different format and I am struggling to convert to the similar format as above. When I import the json file, it converts the data into stuct, which I am not very familiar with other than looking up Youtube videos, and MATLAB docs.
This is the data from imported json file.
This has multiple categories and each bounding box is split into individual rows. It seems I will have to convert that into a table format for corresponding image. I can have multiple columns for different categories. Any suggestions?

Answers (1)

Ameer Hamza
Ameer Hamza on 26 Oct 2020
You can use struct2table(): to convert structs to table. This shows how to access data in MATLAB's table:
Kev on 29 Oct 2020
sure, I will post the solution once I get the detector working so I know the code can be used in the future.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by