How to rearrange tables

2 次查看(过去 30 天)
Conner Carriere
Conner Carriere 2022-11-21
回答: Matt J 2022-11-21
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by