main Content

groundTruthMultisignal

多个信号的地面真相标签数据

Description

groundTruthMultisignal目的contains information about the ground truth data source, label definitions, and marked label annotations for multiple signals. The source of the signals can be a video, image sequence, lidar point cloud, or any other custom format containing multiple signals. You can export or import agroundTruthMultisignal目的from theGround Truth Labeler应用程序。

为深度学习应用程序创建培训数据groundTruthMultisignal对象,使用gatherlabeldata功能。

创建

导出agroundTruthMultisignal目的from theGround Truth Labeler应用程序在应用程序工具条上,选择导出标签>到工作区。该应用将对象导出到MATLAB®工作区。创建一个groundTruthMultisignal对象编程,使用groundTruthMultisignal功能(在此描述)。

Description

例子

gTruth=地面multisignal(dataSources,,,,Labeldefs,,,,roidata,,,,Scendatareturns an object containing ground truth labels that can be imported into theGround Truth Labeler应用程序。

  • dataSources指定地面真相数据的来源,并设置数据源财产。

  • Labeldefs指定地面真相数据的标签,sublabel和属性定义labeldefinitions财产。

  • roidata指定标记区域(ROI)标签的标识信息,位置和时间戳,并设置Roilabeldata财产。

  • Scendata指定标记场景标签的识别信息和时间戳,并设置SECHELABELDATA财产。

特性

expand all

地面真相数据的来源,,,,specified as a vector ofMultiSignalSource对象。这些对象包含描述地面真相数据标记的源的信息。该表描述了MultiSignalSource您可以在此向量中指定的对象。

MultiSignalSource对象类型 数据源 类参考
视频程序 视频文件 Vision.labeler.loading.Videosource
ImagesequenceSource 图像序列文件夹 vision.labeler.loading.ImageSequenceSource
Velodynelidarsource Velodyne®packet capture (PCAP) file Vision.labeler.loading.velodynelidarsource
RosbagSource ROSBAG文件 Vision.labeler.loading.rosbagsource
PointCloudSequencessource 点云序列文件夹 vision.labeler.loading.pointCloudSequencessource
CustomImagesource 自定义图像格式 vision.labeler.loading.customimagesource

要指定其他数据源,请创建一种新类型的MultiSignalSource目的by using thevision.labeler.loading.MultiSignalSource班级。

标签定义,指定为表。要创建此表,请使用以下选项之一。

  • 在里面Ground Truth Labeler应用程序,创建标签定义,然后将其导出为groundTruthMultisignal目的。

  • Use alabeldefinitionCreatormultisignal对象生成标签定义表。如果将此表保存到垫子文件中,则可以将标签定义加载到一个Ground Truth Labelerapp session by selecting打开>标签定义从应用程序工具条。

  • 在MATLAB命令行中创建标签定义表。

该表描述了在该表中指定的表的必需列labeldefinitions财产。

Column Description 必需或可选
姓名 字符串或字符向量指定每个标签定义的名称。

Required

信号类型

信号类型指定每个标签定义支持的信号类型的枚举。万博1manbetx有效值为图片for image signals such as videos or image sequences,PointCloud对于LIDAR信号,或时间for scene label definitions.

If a label definition supports multiple signal types, then the label definition has a separate row for each signal type. For example, consider a label definition namedcar。在里面Ground Truth Labeler应用程序,您将此标签绘制为图像信号中的矩形和LIDAR点云信号中的Cuboid。在里面labeldefinitions桌子,carappears twice and has these姓名,,,,信号类型, 和LabelType值。

姓名 信号类型 LabelType
'车' 图片 Rectangle
'车' PointCloud 长方体

Required

LabelType

labelTypeenumerations that specify the type of each label definition.

用于ROI标签的定义信号类型图片,,,,validLabelType枚举是:

  • labelType.Rectangle

  • labelType.line

  • labelType.pixellabel

  • labelType.polygon

  • labelType.ProjectedCuboid

用于ROI标签的定义信号类型PointCloud,唯一有效的LabelType枚举是labeltype.cuboid

为了scene label definitions, the only validLabelType枚举是标签

您还可以将不是ROI或场景标签的地面真相数据添加到一个groundTruthMultisignal目的。在标签定义表中,指定标签定义labelTypeCustom

Required

团体 Strings or character vectors specifying the group to which each label definition belongs.

可选的

如果您在MATLAB命令行中创建标签定义,则无需包括一个团体column.

If you export label definitions from theGround Truth Labeler应用或使用labeldefinitionCreatormultisignal目的,,,,the label definitions table includes this column, even if you did not specify groups. The app assigns each label definition a团体的价值'None'

Description 描述每个标签定义的字符串或角色向量。

可选的

如果您在MATLAB命令行中创建标签定义,则无需包括一个Descriptioncolumn.

If you export label definitions from theGround Truth Labeler应用或使用labeldefinitionCreatormultisignal目的,,,,the label definitions table includes this column, even if you did not specify descriptions. TheDescription对于这些标签定义是一个空的字符向量。

LabelColor 1-by-3 row vectors of RGB triplets that specify the colors of the label definitions. Values are in the range [0, 1]. The color yellow (RGB triplet [1 1 0]) is reserved for the color of selected labels in theGround Truth Labeler应用程序。

可选的

当您在Ground Truth Labeler应用,您必须指定颜色。因此,导出的标签定义表总是包含此列。

When you create label definitions using thelabeldefinitionCreatormultisignal无需指定颜色的对象,返回的标签定义表包含此列,但是所有列值都是空的。

Pixellabelid Scalars, column vectors,m-by-3 matrices of integer-valued label IDs.Pixellabelidspecifies the pixel label values used to represent a label definition. Pixel label ID values must be between 0 and 255.

可选的

当您在Ground Truth Labelerapp or thelabeldefinitionCreatormultisignal对象,生成的标签定义表包括此列。

在MATLAB命令行中创建标签定义表时,如果您设置LabelTypelabelType.pixellabel对于任何标签,然后需要此列。

Hierarchy 每个标签定义中包含sublabel和属性数据的结构。作为一个例子Hierarchyformat, see出口和探索多个信号的地面真相标签

可选的

当您定义sublabels或属性Ground Truth Labelerapp or thelabeldefinitionCreatormultisignal对象,生成的标签定义表包括此列。

ROI label data across all signals, specified as anRoilabeldata目的。

为了Rectangle,,,,长方体,,,,投影菜,,,,多边形, 和线标签类型,不是浮点数阵列的地面真相数据具有数据类型单身的

场景标签数据跨所有信号,指定为SECHELABELDATA目的。

对象功能

selectlabelsbylabelname 通过标签名称选择多信号地面真相
selectlabelsbylabeltype 通过标签类型选择多信号地面真相
SelectLabelsByGroupName Select multisignal ground truth by label group name
SelectLabelsBysignalname 选择信号名称的多信号地面真相
SelectLabelsBysignalType 按信号类型选择多信号地面真相标签
gatherlabeldata 从地面真相收集同步标签数据
写框 将信号帧写为地面真相数据到磁盘
变化膜 更改多信号地面真相数据中的文件路径

Examples

全部收缩

为视频信号和LIDAR点云序列信号创建地面真相数据,该信号捕获相同的驾驶场景。指定信号源,标签定义以及ROI和场景标签数据。

从MP4文件创建视频数据源。

Sourcename ='01_city_c2s_fcw_10s.mp4';sourceParams = [];vidsource = vision.labeler.loading.videosource;vidsource.loadsource(Sourcename,sourceParams);

从点云数据(PCD)文件的文件夹创建点云序列源。

pcseqfolder = fullfile(toolboxDir(“驾驶”),'drivingData',,,,“激光序”);AddPath(PCSEQFOLDER)加载timestamps.matrmpath(pcseqfolder)lidarsourcedata = load(fullfile(pcseqfolder,,'timestamps.mat'));Sourcename =pcSeqFolder; sourceParams = struct; sourceParams.Timestamps = timestamps; pcseqSource = vision.labeler.loading.PointCloudSequenceSource; pcseqSource.loadSource(sourceName,sourceParams);

将信号源组合到阵列中。

dataSource = [vidsource pcseqsource]
dataSource = 1x2异质MultiSignalSource(VideoSource,pointCloudSecoressource)属性:sourcename sourceParams signalParams signalparams signal -signalname signal -signaltype timestamp numsignals numsignals

通过使用A创建一个标签定义表的标签定义表labeldefinitionCreatormultisignal目的。

  • Car标签定义出现两次。虽然Car被定义为矩形,您只能为图像信号(例如视频)绘制矩形。这labeldefinitionCreatormultisignal对象为LIDAR点云信号创建另一个行。在这些信号类型中,您可以绘制Car仅标记为立方体。

  • 标签定义没有描述,也没有分配的颜色,因此DescriptionLabelColor列是空的。

  • 标签定义没有分配的组,因此对于所有标签定义,团体列设置为'None'

  • Road是一个像素标签的定义,因此该表包含一个Pixellabelidcolumn.

  • 没有标签定义具有子标签或属性,因此该表不包括一个Hierarchy存储此类信息的列。

ldc = labelDefinitionCreatorMultisignal;addLabel (ldc,'车',,,,'长方形');addLabel (ldc,'卡车',,,,“投影菜”);addLabel (ldc,'车道',,,,'线');addLabel (ldc,'路',,,,'PixelLabel');addLabel (ldc,'Sunny',,,,'场景');labeldefs =创建(LDC)
labelDefs = 7x7 table Name SignalType LabelType Group Description LabelColor PixelLabelID _________ __________ _______________ ________ ___________ __________ ____________ {'Car' } Image Rectangle {'None'} {' '} {0x0 char} {0x0 double} {'Car' } PointCloud Cuboid {'none'} {'} {0x0 char} {0x0 double} {'truck'} image projectedCuboid {'none'} {'} {'} {0x0 char} {0x0 char} {0x0 double}}'} {'} {0x0 char} {0x0 double} {'lane'} pointCloud line {'none'} {'} {0x0 char} {0x0 char} {0x0 double} {'row'{''} {0x0 char} {[1]} {'sunny'}时间场景{'none''} {'} {0x0 char} {0x0 double}

为视频的第一帧创建ROI标签数据。

numVideoFrames = numel(vidSource.Timestamp{1}); carData = cell(numVideoFrames,1); laneData = cell(numVideoFrames,1); truckData = cell(numVideoFrames,1); carData{1} = [304 212 37 33]; laneData{1} = [70 458; 311 261]; truckData{1} = [309,215,33,24,330,211,33,24]; videoData = timetable(vidSource.Timestamp{1},carData,laneData,...'variablenames',{'车',,,,'车道'});

Create ROI label data for the first point cloud in the sequence.

numPCFrames = numel(pcseqSource.Timestamp{1}); carData = cell(numPCFrames, 1); carData{1} = [27.35 18.32 -0.11 4.25 4.75 3.45 0 0 0]; lidarData = timetable(pcseqSource.Timestamp{1},carData,'variablenames',{'车'});

Combine the ROI label data for both sources.

signalNames = [dataSource.SignalName]; roiData = vision.labeler.labeldata.ROILabelData(signalNames,{videoData,lidarData})
roidata =带有属性的roilabeldata:video_01_city_c2s_fcw_10s:[204x2时间表] lidarsequence:[34x1时间表]

在驾驶场景的前10秒内创建场景标签数据。

sunnydata =秒([0 10]);labelNames = [“阳光明媚”]; sceneData = vision.labeler.labeldata.SceneLabelData(labelNames,{sunnyData})
Scendata= SceneLabelData with properties: Sunny: [0 sec 10 sec]

Create a ground truth object from the signal sources, label definitions, and ROI and scene label data. You can import this object into theGround Truth Labeler用于手动标签的应用程序或在其上运行标签自动化算法。您还可以通过使用该对象从此对象中提取培训数据gatherlabeldata功能。

gtruth = droundTruthMultisignal(DataSource,Labeldefs,Roidata,scendata)
gTruth = groundTruthMultisignal with properties: DataSource: [1x2 vision.labeler.loading.MultiSignalSource] LabelDefinitions: [7x7 table] ROILabelData: [1x1 vision.labeler.labeldata.ROILabelData] SceneLabelData: [1x1 vision.labeler.labeldata.SceneLabelData]

Tips

  • groundTruthMultisignal具有基于视频的数据源的对象依赖于操作系统的视频阅读功能。一个groundTruthMultisignal目的created using video data sources remains consistent only for the same platform that was used to create it. To create a platform-independentgroundTruthMultisignal对象,将视频转换为图像序列,并与图像序列一起包含相关的时间戳。

  • 创建一个groundTruthMultisignal目的containing ROI label data but no scene label data, specify theSECHELABELDATA属性作为一个空数组。要创建此数组,请在MATLAB命令提示符下输入此代码。

    scendata = vision.labeler.labeldata.scenelabeldata.empty

版本历史记录

在R2020a中引入