필터 지우기
필터 지우기

combine gTruth LabelData from multiple sessions

조회 수: 2 (최근 30일)
jessica chopra
jessica chopra 2018년 12월 18일
답변: Alon Spinner 2021년 1월 17일
Hello,
I have marked images in different sessions and exported the session files. Now in Matlab i want to combine labelData from all the sessions into a single file.
Please help me how to combine LabelData from different sessions into a single file.
Thnks a lot.
  댓글 수: 2
Wembley
Wembley 2020년 6월 1일
Hi Jessica, did you work ou the cod eto do this? If so can you please post?
Alon Spinner
Alon Spinner 2021년 1월 17일
Would like to know as-well.
The lack of search on the image labler forced me to split my labeling sessions

댓글을 달려면 로그인하십시오.

답변 (1개)

Alon Spinner
Alon Spinner 2021년 1월 17일
I ran a simple for loop.... of course can be made smarter but this works.
forgive me for typing errors. I hand typed this example
PhotoshootsDirs=["dir1",...
"dir2",...
"dir3"];
LoadData=load(fullfile(LabelingDir,PhotoshootsDirs(1),'gTruth.mat');
gTruth=LoadData.gTruth;
dataSource_array=gTruth,DataSource.Source;
LabelData_array=gTruth.LabelData;
LabelDefinitions=gTruth.LabelDefinitions;
for i=2:length(PhotoshootsDirs)
LoadData=load(fullfile(LabelingDir,PhotoshootsDirs(i),'gTruth.mat');
gTruth=LoadData.gTruth;
dataSource_array=[dataSource_array;gTruth.DataSource.Source];
LabelData_array=[LabelData_array;gTruth.LabelData];
end
gtSource=groundTruthDataSource(dataSource_array);
gTruth=groundTruth(gtSource,LabelDefinitions,LabelData_array);

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by