浏览代码

cleanup

/main
Mohsen Kamalzadeh 4 年前
当前提交
fde6a724
共有 1 个文件被更改,包括 0 次插入30 次删除
  1. 30
      com.unity.perception/Runtime/GroundTruth/Labeling/IdLabelConfig.cs

30
com.unity.perception/Runtime/GroundTruth/Labeling/IdLabelConfig.cs


}
/// <summary>
/// Remove a label entry matching the given string from this label configuration.
/// Label configurations can not have duplicate labels, so the given string can match only one entry.
/// </summary>
/// <param name="label"></param>
public override void RemoveLabel(string label)
{
base.RemoveLabel(label);
if (autoAssignIds)
{
AutoAssignIds();
}
}
void AutoAssignIds()
{
var size = m_LabelEntries.Count;
if (size == 0)
return;
var nextId = startingLabelId == StartingLabelId.One ? 1 : 0;
for (int i = 0; i < size; i++)
{
var labelEntry = m_LabelEntries[i];
labelEntry.id = nextId;
m_LabelEntries[i] = labelEntry;
nextId++;
}
}
/// <summary>
/// Attempts to find the label id for the given instance id.
/// </summary>
/// <param name="instanceId">The instanceId of the object for which the labelId should be found</param>

正在加载...
取消
保存