How to rearrange tables

조회 수: 1 (최근 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