public void TestYoloCameraFrameProcessorUnpacksModel() { using (var processor = new YoloCameraFrameProcessor()) { Assert.NotNull(processor.ModelPath); Assert.True(processor.Ready); var path = processor.ModelPath; Assert.IsNotEmpty(path); Assert.True(File.Exists(path)); } }
public void TestCameraFrameProcessorParsesImage() { var processor = new YoloCameraFrameProcessor(); var cat_jpg = File.ReadAllBytes("assets/001-cat.jpg"); var result = processor.Process(cat_jpg); Assert.NotNull(result); Assert.AreEqual(cat_jpg, result.Image); Assert.NotNull(result.Boxes); var firstBox = result.Boxes.First(); Assert.NotNull(firstBox); Assert.AreEqual(firstBox.Label, "cat"); }