主要内容

Label Ground Truth for Multiple Signals

After loading the video and lidar point cloud sequence signals into theGround Truth Labelerapp, as described in the负载地面实况信号标签procedure, create label definitions and label the signal frames. In this example, you label only a portion of the signals for illustrative purposes.

Create Label Definitions

Label definitions包含有关您在信号上标记的标签的信息。您可以通过使用一个在应用程序中交互创建标签定义或通过使用labelDefinitionCreatorMultisignalobject. In this example, you create label definitions in the app.

Create ROI Label

AnROI label是与信号框架中感兴趣区域(ROI)相对应的标签。您可以定义这些ROI标签类型。

  • Rectangle/Cuboid— Draw bounding box labels around objects, such as vehicles. In image signals, you draw labels of this type as 2-D rectangular bounding boxes. In point cloud signals, you draw labels of this type as 3-D cuboid bounding boxes.

  • Projected cuboid— Draw 3-D bounding box labels around objects in an image, such as vehicles.

  • Line— Draw linear ROIs to label lines, such as lane boundaries.

  • 像素标签— Draw pixels to label various classes, such as road or sky, for semantic segmentation. For more information about pixel labeling, seeLabel Pixels for Semantic Segmentation

  • Polygon— Draw polygon labels around objects. You can label distinct instances of the same class. For more information on drawing polygon ROI labels for instance and semantic segmentation networks, seeLabel Objects Using Polygons

For more details about these ROI label definitions, seeROI标签,Sublabels和属性

Create an ROI label definition for labeling cars in the signal frames.

  1. ROI Labelspane in the left pane, clickLabel

  2. Create aRectangle/Cuboid标签名称

  3. From theGrouplist, selectNew Groupand name the groupVehicles。Adding labels to groups is optional.

  4. ClickOK。这Vehicles小组名称出现在ROI Labelstab with the labelunder it.

    ROI Labels tab with a Vehicles group that contains a car label

label is drawn differently on each signal. On the video,被绘制为2D矩形边界类型的框Rectangle。在point cloud sequence,被绘制为3-D Cuboid界面类型的框Cuboid

Create ROI Sublabel

Asublabelis a type of ROI label that corresponds to a parent ROI label. Each sublabel must belong to, or be a child of, a label definition that is in theROI Labelstab. For example, in a driving scene, a vehicle label can have sublabels for headlights, license plates, or wheels. For more details about sublabels, seeROI标签,Sublabels和属性

Create an ROI sublabel definition for labeling the brake lights of the labeled cars.

  1. 选择parent label of the sublabel. On theROI Labelstab in the left pane, click the标签以选择它。

  2. ClickSublabel

  3. Create aRectanglesublabel named刹车灯。Cuboid sublabels are not supported, so this sublabel applies only for the video signal. ClickOK

    刹车灯sublabel appears in theROI Labelstab under the标签。这sublabel and parent label have the same color.

    ROI Labels tab with a brakeLight sublabel under the car label

Create ROI Attribute

AnROI attributespecifies additional information about an ROI label or sublabel. For example, in a driving scene, attributes can include the type or color of a vehicle. You can define ROI attributes of these types.

  • Numeric Value— Specify a numeric scalar attribute, such as the number of doors on a labeled vehicle.

  • String— Specify a string scalar attribute, such as the color of a vehicle.

  • Logical— Specify a logical true or false attribute, such as whether a vehicle is in motion.

  • List— Specify a drop-down list attribute of predefined strings, such as make or model of a vehicle.

For more details about these attribute types, seeROI标签,Sublabels和属性

Create an attribute to describe whether a labeled brake light is on or off.

  1. ROI Labelstab in the left pane, select the刹车灯Sublabel,然后单击Attribute

  2. In theAttribute Namebox, typeisOn。Set the attribute type toLogical。LeaveDefault Valueset toEmptyand optionally provide a description. ClickOK。You can hover over the information icon that appears next to the attribute field to display the added description.

  3. In theROI Labels选项卡,展开刹车灯Sublabel定义。这Attributebox for this sublabel now contains theisOnattribute.

ROI Labels tab with an isOn attribute under the brakeLight label

Create Scene Label

Ascene label在场景中的所有信号中定义其他信息。使用场景标签来描述诸如照明和天气或事件之类的条件,例如车道变化。

创建一个场景标签以应用于信号帧。

  1. In the left pane of the app, select the场景标签tab.

  2. ClickDefine new scene label,在Label Namebox, enter a scene label nameddaytime

  3. Change the color of the label definition to light blue to reflect the nature of the scene label. Under theColorparameter, click the color preview and select the standard light blue colors. Then, clickOKto close the color selection window.

    Define new scene label window configured to display the daytime label in light blue

  4. Leave theGroupparameter set to the default of没有任何and clickOK。这场景标签pane shows the scene label definition.

    场景标签tab configure to apply the daytime label to the current frame

Verify Label Definitions

Verify that your label definitions have this setup.

  1. ROI Labels选项卡包含aVehiclesgroup with alabel of typeRectangle/Cuboid

  2. label contains a sublabel named刹车灯

  3. 刹车灯sublabel contains an attribute namedisOn

  4. 场景标签选项卡包含alight blue scene label nameddaytime

To edit or delete a label definition, right-click that label definition and select the appropriate edit or delete option. To save these label definitions to a MAT-file for use in future labeling sessions, on theLabeltab of the app toolstrip, first selectExport。然后,在Label Definitionssection, selectTo File

In future labeling sessions, if you need to reorder label definitions or move them to different groups, you can drag and drop them in the label definition panes.

Label Video Using Automation

Use thelabel to label one of the cars in a portion of the video. To assist with the labeling process, use one of the built-in label automation algorithms.

  1. 选择time range to label. Specify an interval from 8 to 10 seconds, during which the car in front is close to the ego vehicle. In the text boxes below the video, enter these times in this order:

    1. In theCurrentbox, type8

    2. In theStart Timebox, type8so that the slider is at the start of the time range.

    3. In theEnd Timebox, type10

    这range slider and text boxes are set to this 8–10 second interval. The red flags indicate the start and end of the interval.

    Range slider configured to automate the 8 to 10 second interval. The left red flag is at second 8, and the right red flag is at second 10.

    这app displays signal frames from only this interval, and automation algorithms apply to only this interval. To expand the time range to fill the entire playback section, clickZoom In Time Range

  2. 选择label that you want to automate. In theROI Labelstab, click the标签。

  3. 选择automation algorithm to use. From the app toolstrip, selectSelect Algorithm>Temporal Interpolator。This algorithm estimates rectangle ROIs between image frames by interpolating the ROI locations across the time range.

  4. 选择signal that you want to automate. From the app toolstrip, clickSelect Signals。然后,在Select Signals window, select only the video signal and clickOK。This algorithm supports labeling of only one signal at a time, and the point cloud signal uses a different automation algorithm.

  5. ClickAutomate。这app prompts you to confirm that you want to label only a portion of the video. ClickYes。视频的自动化会话打开。自动化会话的正确窗格显示算法指令。

    Temporal Interpolator automation session. The video is on the left and the automation instructions are on the right.

  6. At the start of the time range, click and drag to draw alabel around the car in the center of the frame. For this algorithm, you can draw only one label per frame. Labeling the other car would require a separate automation session.

    带有矩形汽车标签的视频应用于框架中央的汽车

    By default, thelabel appears only when you move your pointer over it. To always display labels, on the app toolstrip, setShow ROI LabelstoAlways

  7. Drag the slider to the last frame and draw alabel around the same car in this frame. Optionally, to improve automation results, label the car in intermediate frames.

  8. ClickRun。这automation algorithm applies thelabel to the intermediate frames. Drag the slider to view the results. If necessary, manually adjust the labels to improve their accuracy.

  9. When you are satisfied with the results, clickAcceptto close the session and apply the labels to this portion of the video.

Label Point Cloud Sequence Using Automation

Use the samelabel definition from the previous procedure to label a car in the point cloud sequence. To assist with the labeling process, use a built-in label automation algorithm designed for point cloud labeling. In this example, you label the ego vehicle, which is easier to see in the lidar point cloud sequence than the front car.

  1. At the bottom of the app, verify that the time range is still set to 8 to 10 seconds.

  2. In the labeling window, click the point cloud sequence to select it.

  3. In theROI Labelstab, click the标签定义。

  4. Labeltab of the app toolstrip, selectSelect Algorithm>点云时间插补器。This algorithm estimates cuboid ROIs between point cloud frames by interpolating the ROI locations across the time range.

  5. ClickSelect Signals, select only the point cloud signal, and clickOK

  6. ClickAutomate。这app prompts you to confirm that you want to label only a portion of the point cloud sequence. ClickYes。An automation session for the point cloud sequence opens. The right pane of the automation session displays the algorithm instructions.

    点云时间插补器automation session. The point cloud sequence is on the left and the automation instructions are on the right.

  7. At the start of the time range, draw alabel around the ego vehicle.

    1. Zoom in on the car, using either the scroll wheel or the Zoom In buttonat the top-right corner of the frame. You can also use the Pan buttonto center the car in the frame.

      Point cloud frame zoomed in on a car

    2. ROI Labelstab in the left pane, click the标签。拖动灰色预览长方体,直到突出显示自我车辆。

      Gray preview cuboid drawn around the vehicle. The vehicle is highlighted in yellow.

    3. Click the signal frame to create the label. The label snaps to the highlighted portion of the point cloud.

      Cuboid car label applied to the vehicle. The cuboid is wider than the vehicle

    4. Adjust the cuboid label until it fully encloses the car. To resize the cuboid, click and drag one of the cuboid faces. To move the cuboid, holdShift然后单击并拖动一只长方体面孔。

      Cuboid car label resized to the size of the vehicle

    5. Use projected view to adjust the cuboid label in top-view, side-view and front-view simultaneously. UnderLidartab in the app toolstrip, select theProjected Viewoption from theCamera Viewsection, to enable this view.

      Projected view for cuboid label adjustment

      For additional tips and techniques for labeling point clouds, see标签LIDAR点云用于对象检测

  8. Click the cuboid and pressCtrl+Cto copy it. Then, drag the slider to the last frame and pressCtrl+Vto paste the cuboid into the new frame at the same position. Optionally, to improve automation results, manually adjust the position of the copied label.

  9. ClickRun。这automation algorithm applies thelabel to the intermediate frames. Drag the slider to view the results. If necessary, manually adjust the labels to improve their accuracy.

  10. When you are satisfied with the results, clickAcceptto close the session and apply the labels to this portion of the point cloud sequence.

Label with Sublabels and Attributes Manually

Manually label one frame of the video with the刹车灯sublabel and itsisOnattribute. Lidar point cloud signals do not support sublabels and attributes, so you cannot label the point cloud sequence.

  1. At the bottom of the app, verify that the time range is still set to 8 to 10 seconds. If necessary, drag the slider to the first frame of the time range.

  2. In theROI Labelstab, click the刹车灯sublabel definition to select it.

  3. 隐藏点云序列。在Labeltab of the app toolstrip, underShow/Hide Signals,清除LIDAR点云序列的复选标记。隐藏信号仅隐藏显示。该应用程序维护隐藏信号的标签,您仍然可以导出它们。

  4. 整个labelin扩大视频信号来填补g window.

  5. 在视频框架中,选择绘制标签。这label turns yellow. You must select thelabel (parent ROI) before you can add a sublabel to it.

  6. Draw刹车灯sublabels for the car. Optionally, setShow ROI LabelstoAlwaysso that you can confirm the association between thelabel and its sublabels.

    A vehicle labeled

  7. 在video frame, select one of the刹车灯sublabels. Then, on theAttributes and Sublabelspane, set theisOnattribute toTrue。Repeat this step for the other sublabel.

For more details about working with sublabels and attributes, see使用sublabels和属性标记地面真相数据

Label Scene Manually

Apply thedaytimescene label to the entire scene.

  1. Expand the time range back to the entire duration of all signals. If you zoomed in on the time range, first click缩放时间间隔。这n, drag the red flags to the start and end of the range slider.

  2. In the left pane of the app, select the场景标签tab.

  3. 选择daytimescene label definition.

  4. 在标签定义上方,单击Time Interval。这n, clickAdd Label。A check mark appears for thedaytimescene label indicating that the label now applies to all frames in the time range.

    场景标签tab with the daytime label applied

View Label Summary

With all labels, sublabels, and attributes applied to at least one frame of a signal, you can now optionally view a visual summary of the ground truth labels. On the app toolstrip, clickView Label Summary。For more details, seeView Summary of Ground Truth Labels

Save App Session

在app toolstrip, selectSave Sessionand save a MAT-file of the app session. The saved session includes the data source, label definitions, and labeled ground truth. It also includes your session preferences, such as the layout of the app.

You can now either close the app session or continue to theExport and Explore Ground Truth Labels for Multiple Signals步骤,在哪里导出标签。

Related Topics