|
|
|
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
static GameObject SetupCamera(IdLabelConfig config, KeypointTemplate template, Action<int, List<KeypointLabeler.KeypointEntry>> computeListener, RenderTexture renderTexture = null, KeypointObjectFilter keypointObjectFilter = KeypointObjectFilter.Visible) |
|
|
|
static GameObject SetupCamera(IdLabelConfig config, KeypointTemplate template, Action<int, List<KeypointLabeler.Annotation.Entry>> computeListener, RenderTexture renderTexture = null, KeypointObjectFilter keypointObjectFilter = KeypointObjectFilter.Visible) |
|
|
|
{ |
|
|
|
var cameraObject = new GameObject(); |
|
|
|
cameraObject.SetActive(false); |
|
|
|
|
|
|
[UnityTest] |
|
|
|
public IEnumerator Keypoint_TestStaticLabeledCube() |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(t.keypoints[0].x, t.keypoints[1].x); |
|
|
|
Assert.AreEqual(t.keypoints[2].x, t.keypoints[3].x); |
|
|
|
Assert.AreEqual(t.keypoints[4].x, t.keypoints[5].x); |
|
|
|
Assert.AreEqual(t.keypoints[6].x, t.keypoints[7].x); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.x, t.keypoints[1].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[2].location.x, t.keypoints[3].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.x, t.keypoints[5].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[6].location.x, t.keypoints[7].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[0].y, t.keypoints[3].y); |
|
|
|
Assert.AreEqual(t.keypoints[1].y, t.keypoints[2].y); |
|
|
|
Assert.AreEqual(t.keypoints[4].y, t.keypoints[7].y); |
|
|
|
Assert.AreEqual(t.keypoints[5].y, t.keypoints[6].y); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.y, t.keypoints[3].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[1].location.y, t.keypoints[2].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.y, t.keypoints[7].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[5].location.y, t.keypoints[6].location.y); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(t.keypoints[0].x, t.keypoints[1].x); |
|
|
|
Assert.AreEqual(t.keypoints[2].x, t.keypoints[3].x); |
|
|
|
Assert.AreEqual(t.keypoints[4].x, t.keypoints[5].x); |
|
|
|
Assert.AreEqual(t.keypoints[6].x, t.keypoints[7].x); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.x, t.keypoints[1].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[2].location.x, t.keypoints[3].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.x, t.keypoints[5].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[6].location.x, t.keypoints[7].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[0].y, t.keypoints[3].y); |
|
|
|
Assert.AreEqual(t.keypoints[1].y, t.keypoints[2].y); |
|
|
|
Assert.AreEqual(t.keypoints[4].y, t.keypoints[7].y); |
|
|
|
Assert.AreEqual(t.keypoints[5].y, t.keypoints[6].y); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.y, t.keypoints[3].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[1].location.y, t.keypoints[2].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.y, t.keypoints[7].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[5].location.y, t.keypoints[6].location.y); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
|
|
|
|
testCase = incoming[2]; |
|
|
|
Assert.AreEqual(0, testCase.Count); |
|
|
|
|
|
|
public IEnumerator Keypoint_TestAllOffScreen() |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
[UnityTest] |
|
|
|
public IEnumerator Keypoint_TestMovingCube() |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
|
|
|
|
var keypoints = new[] |
|
|
|
{ |
|
|
|
|
|
|
texture.Create(); |
|
|
|
var cam = SetupCamera(SetUpLabelConfig(), template, (frame, data) => |
|
|
|
{ |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
cam.GetComponent<PerceptionCamera>().showVisualizations = false; |
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(1024 / 2, t.keypoints[0].x); |
|
|
|
Assert.AreEqual(768 / 2, t.keypoints[0].y); |
|
|
|
Assert.AreEqual(1024 / 2, t.keypoints[0].location.x); |
|
|
|
Assert.AreEqual(768 / 2, t.keypoints[0].location.y); |
|
|
|
|
|
|
|
Assert.AreEqual(0, t.keypoints[0].index); |
|
|
|
Assert.AreEqual(2, t.keypoints[0].state); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase2.Count); |
|
|
|
var t2 = testCase2.First(); |
|
|
|
Assert.AreEqual(445, t2.keypoints[0].x, 1); |
|
|
|
Assert.AreEqual(768 / 2, t2.keypoints[0].y); |
|
|
|
Assert.AreEqual(445, t2.keypoints[0].location.x, 1); |
|
|
|
Assert.AreEqual(768 / 2, t2.keypoints[0].location.y); |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(9, t.keypoints.Length); |
|
|
|
|
|
|
|
Assert.NotZero(t.keypoints[0].state); |
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < 9; i++) Assert.AreEqual(i, t.keypoints[i].index); |
|
|
|
Assert.Zero(t.keypoints[8].state); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(t.keypoints[0].x, t.keypoints[1].x); |
|
|
|
Assert.AreEqual(t.keypoints[2].x, t.keypoints[3].x); |
|
|
|
Assert.AreEqual(t.keypoints[4].x, t.keypoints[5].x); |
|
|
|
Assert.AreEqual(t.keypoints[6].x, t.keypoints[7].x); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.x, t.keypoints[1].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[2].location.x, t.keypoints[3].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.x, t.keypoints[5].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[6].location.x, t.keypoints[7].location.x); |
|
|
|
Assert.AreEqual(t.keypoints[0].y, t.keypoints[3].y); |
|
|
|
Assert.AreEqual(t.keypoints[1].y, t.keypoints[2].y); |
|
|
|
Assert.AreEqual(t.keypoints[4].y, t.keypoints[7].y); |
|
|
|
Assert.AreEqual(t.keypoints[5].y, t.keypoints[6].y); |
|
|
|
Assert.AreEqual(t.keypoints[0].location.y, t.keypoints[3].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[1].location.y, t.keypoints[2].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[4].location.y, t.keypoints[7].location.y); |
|
|
|
Assert.AreEqual(t.keypoints[5].location.y, t.keypoints[6].location.y); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
CreateFullyOccludedScene(template, cam); |
|
|
|
|
|
|
public IEnumerator Keypoint_FullyOccluded_WithIncludeOccluded_ReportsProperly( |
|
|
|
[Values(KeypointObjectFilter.VisibleAndOccluded, KeypointObjectFilter.All)] KeypointObjectFilter keypointObjectFilter) |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
var template = CreateTestTemplate(Guid.NewGuid(), "TestTemplate"); |
|
|
|
var texture = new RenderTexture(1024, 768, 16); |
|
|
|
texture.Create(); |
|
|
|
|
|
|
|
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(9, t.keypoints.Length); |
|
|
|
|
|
|
|
for (var i = 0; i < 8; i++) |
|
|
|
|
|
|
Assert.Zero(t.keypoints[8].state); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
} |
|
|
|
|
|
|
|
private void CreateFullyOccludedScene(KeypointTemplate template, GameObject cam) |
|
|
|
|
|
|
public IEnumerator Keypoint_Offscreen_DoesNotReport( |
|
|
|
[Values(KeypointObjectFilter.VisibleAndOccluded, KeypointObjectFilter.Visible)] KeypointObjectFilter keypointObjectFilter) |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
var template = CreateTestTemplate(Guid.NewGuid(), "TestTemplate"); |
|
|
|
var texture = new RenderTexture(1024, 768, 16); |
|
|
|
texture.Create(); |
|
|
|
|
|
|
[UnityTest] |
|
|
|
public IEnumerator Keypoint_Offscreen_WithIncludeAll_ReportsProperly() |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
var template = CreateTestTemplate(Guid.NewGuid(), "TestTemplate"); |
|
|
|
var texture = new RenderTexture(1024, 768, 16); |
|
|
|
texture.Create(); |
|
|
|
|
|
|
|
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.Zero(t.keypoints[i].x); |
|
|
|
Assert.Zero(t.keypoints[i].y); |
|
|
|
Assert.Zero(t.keypoints[i].location.x); |
|
|
|
Assert.Zero(t.keypoints[i].location.y); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cube = TestHelper.CreateLabeledCube(scale: 6, z: 8); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(9, t.keypoints.Length); |
|
|
|
|
|
|
|
Assert.AreEqual(2, t.keypoints[0].state); |
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < 9; i++) Assert.AreEqual(i, t.keypoints[i].index); |
|
|
|
Assert.Zero(t.keypoints[8].state); |
|
|
|
Assert.Zero(t.keypoints[8].x); |
|
|
|
Assert.Zero(t.keypoints[8].y); |
|
|
|
Assert.Zero(t.keypoints[8].location.x); |
|
|
|
Assert.Zero(t.keypoints[8].location.y); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
var template = CreateTestTemplate(Guid.NewGuid(), "TestTemplate"); |
|
|
|
|
|
|
|
var texture = new RenderTexture(1024, 768, 16); |
|
|
|
|
|
|
incoming.Add(new List<KeypointLabeler.KeypointEntry>(data)); |
|
|
|
incoming.Add(new List<KeypointLabeler.Annotation.Entry>(data)); |
|
|
|
}, texture); |
|
|
|
|
|
|
|
var cameraComponent = cam.GetComponent<Camera>(); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(screenPointCenterExpected.x, t.keypoints[8].x, Screen.width * .1); |
|
|
|
Assert.AreEqual(screenPointCenterExpected.y, t.keypoints[8].y, Screen.height * .1); |
|
|
|
Assert.AreEqual(screenPointCenterExpected.x, t.keypoints[8].location.x, Screen.width * .1); |
|
|
|
Assert.AreEqual(screenPointCenterExpected.y, t.keypoints[8].location.y, Screen.height * .1); |
|
|
|
Assert.AreEqual(8, t.keypoints[8].index); |
|
|
|
Assert.AreEqual(2, t.keypoints[8].state); |
|
|
|
} |
|
|
|
|
|
|
[ValueSource(nameof(Keypoint_OnBox_ReportsProperCoordinates_TestCases))] |
|
|
|
(float scale, bool expectObject, int expectedState, KeypointObjectFilter keypointFilter, Vector2 expectedTopLeft, Vector2 expectedBottomRight) args) |
|
|
|
{ |
|
|
|
var incoming = new List<List<KeypointLabeler.KeypointEntry>>(); |
|
|
|
var incoming = new List<List<KeypointLabeler.Annotation.Entry>>(); |
|
|
|
var template = CreateTestTemplate(Guid.NewGuid(), "TestTemplate"); |
|
|
|
var frameSize = 1024; |
|
|
|
var texture = new RenderTexture(frameSize, frameSize, 16); |
|
|
|
|
|
|
Assert.AreEqual(1, testCase.Count); |
|
|
|
var t = testCase.First(); |
|
|
|
Assert.NotNull(t); |
|
|
|
Assert.AreEqual(1, t.instance_id); |
|
|
|
Assert.AreEqual(1, t.label_id); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.template_guid); |
|
|
|
Assert.AreEqual(1, t.instanceId); |
|
|
|
Assert.AreEqual(1, t.labelId); |
|
|
|
Assert.AreEqual(template.templateID.ToString(), t.templateGuid); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.x, t.keypoints[0].x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.y, t.keypoints[0].y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.x, t.keypoints[0].location.x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.y, t.keypoints[0].location.y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.x, t.keypoints[1].x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.y, t.keypoints[1].y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.x, t.keypoints[1].location.x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.y, t.keypoints[1].location.y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.x, t.keypoints[2].x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.y, t.keypoints[2].y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.x, t.keypoints[2].location.x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedTopLeft.y, t.keypoints[2].location.y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.x, t.keypoints[3].x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.y, t.keypoints[3].y, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.x, t.keypoints[3].location.x, k_Delta); |
|
|
|
Assert.AreEqual(args.expectedBottomRight.y, t.keypoints[3].location.y, k_Delta); |
|
|
|
} |
|
|
|
} |
|
|
|
} |