浏览代码

updates to work with randomizer tags changes

/main
Steven Borkman 4 年前
当前提交
a289546b
共有 3 个文件被更改,包括 4 次插入5 次删除
  1. 4
      com.unity.perception/Documentation~/Schema/Synthetic_Dataset_Schema.md
  2. 2
      com.unity.perception/Runtime/GroundTruth/Labelers/KeyPointLabeler.cs
  3. 3
      com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/AnimationRandomizer.cs

4
com.unity.perception/Documentation~/Schema/Synthetic_Dataset_Schema.md


Keypoint data, commonly used for human pose estimation. A keypoint capture is associated to a template that defines the keypoints (see annotation.definition file).
Each keypoint record maps a tuple of (instance, label) to template, pose, and an array of keypoints. A keypoint will exist in this record for each keypoint defined in the template file.
If a given keypoint doesn't exist in the labeled gameobject, then that keypoint will have a state value of 0; if it does exist then it will have a keypoint value of 1.
If a given keypoint doesn't exist in the labeled gameobject, then that keypoint will have a state value of 0; if it does exist then it will have a keypoint value of 2.
```
keypoints {
label_id: <int> -- Integer identifier of the label

index: <int> -- Index of keypoint in template
x: <float> -- X pixel coordinate of keypoint
y: <float> -- Y pixel coordinate of keypoint
state: <int> -- 0: keypoint does not exist, 1 keypoint exists
state: <int> -- 0: keypoint does not exist, 2 keypoint exists
}, ...
]
}

2
com.unity.perception/Runtime/GroundTruth/Labelers/KeyPointLabeler.cs


keyPoints[i].index = i;
keyPoints[i].x = loc.x;
keyPoints[i].y = loc.y;
keyPoints[i].state = 1;
keyPoints[i].state = 2;
}
}
}

3
com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/AnimationRandomizer.cs


var taggedObjects = tagManager.Query<AnimationRandomizerTag>();
foreach (var taggedObject in taggedObjects)
{
var tag = taggedObject.GetComponent<AnimationRandomizerTag>();
RandomizeAnimation(tag);
RandomizeAnimation(taggedObject);
}
}
}
正在加载...
取消
保存