How to rearrange tables

2 views (last 30 days)
Conner Carriere
Conner Carriere on 21 Nov 2022
Answered: Matt J on 21 Nov 2022
I am working with a CNN and need to set up mutilple classes, this is what I have so far
I have a table that looks like this (or does in matlab, kinda have to peice stuff together here)
IMAGE | BBOX | Class
"img1" [212,28,300,591] 'Taillight-Damage'
"img2" 3x4 double 3x1 cell
"img3" [188,250,263,148] 'fender-dent'
"img4" [56,219,354,257;338,1,300,330] 2x1 cell
"img5" [96,287,347,350;1,1,238,574] 2x1 cell
"img6" [1,82,342,218;384,132,106,214] 2x1 cell
"img7" [1,240,443,396] 'front-bumper-dent'
"img8" [76,391,359,153] 'Rear-windscreen-Damage'
"img9" [290,206,158,305] 'Taillight-Damage'
"img10" [9,122,629,515] 'front-bumper-dent'
each bounding box coralates to the same image, and class. The 3x1 and 2x1 cells have the class of the respective bbox.
How would I move those into this format on the boxlabeldatastore() function doc
another option is to move it to this format
whatever is easier

Accepted Answer

Matt J
Matt J on 21 Nov 2022
Boxes=tbl.BBOX;
Labels=cellfun(@string, tbl.Class,'uni',0);
newtbl=table(Boxes,Labels);

More Answers (0)

Categories

Find more on Get Started with Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!