config.StdValue = 127.5;
config.ConfidenceThreshold = 0.3;
config.Backend = InferenceBackendType.TFLite;
- config.Target = InferenceTargetType.CPU;
+ config.Device = InferenceTargetDevice.CPU;
+ config.DataType = InferenceDataType.Float32;
config.TensorSize = new Size(300, 300);
config.TensorChannels = 3;
config.InputNodeName = "normalized_input_image_tensor";
//StdValue = 127.5,
//ConfidenceThreshold = 0.3,
//Backend = InferenceBackendType.TFLite,
- //Target = InferenceTargetType.CPU,
+ //Device = InferenceTargetDevice.CPU,
//TensorSize = new Size(300, 300),
//TensorChannels = 3,
//InputNodeName = "normalized_input_image_tensor",
[Test]
[Category("P1")]
- [Description("Check whether Target returns correct default value.")]
- [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Target A")]
+ [Description("Check whether Device returns correct default value.")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Device A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PDV")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void Target_CHECK_DEFAULT_VALUE()
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void Device_CHECK_DEFAULT_VALUE()
{
- Assert.That(_config.Target, Is.EqualTo(InferenceTargetType.CPU));
+ Assert.That(_config.Device, Is.EqualTo(InferenceTargetDevice.CPU));
}
[Test]
[Category("P1")]
- [Description("Check whether Target returns correct value.")]
- [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Target A")]
+ [Description("Check whether Device returns correct value.")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Device A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void Target_READ_WRITE()
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void Device_READ_WRITE()
{
- _config.Target = InferenceTargetType.CPU;
- Assert.IsInstanceOf<InferenceTargetType>(_config.Target, "Should return InferenceTargetType instance");
- Assert.AreEqual(InferenceTargetType.CPU, _config.Target, "Should be got same value.");
+ _config.Device = InferenceTargetDevice.CPU;
+ Assert.IsInstanceOf<InferenceTargetDevice>(_config.Device, "Should return InferenceTargetDevice instance");
+ Assert.AreEqual(InferenceTargetDevice.CPU, _config.Device, "Should be got same value.");
- _config.Target = InferenceTargetType.GPU;
- Assert.IsInstanceOf<InferenceTargetType>(_config.Target, "Should return InferenceTargetType instance");
- Assert.AreEqual(InferenceTargetType.GPU, _config.Target, "Should be got same value.");
+ _config.Device = InferenceTargetDevice.GPU;
+ Assert.IsInstanceOf<InferenceTargetDevice>(_config.Device, "Should return InferenceTargetDevice instance");
+ Assert.AreEqual(InferenceTargetDevice.GPU, _config.Device, "Should be got same value.");
- _config.Target = InferenceTargetType.Custom;
- Assert.IsInstanceOf<InferenceTargetType>(_config.Target, "Should return InferenceTargetType instance");
- Assert.AreEqual(InferenceTargetType.Custom, _config.Target, "Should be got same value.");
+ _config.Device = InferenceTargetDevice.Custom;
+ Assert.IsInstanceOf<InferenceTargetDevice>(_config.Device, "Should return InferenceTargetDevice instance");
+ Assert.AreEqual(InferenceTargetDevice.Custom, _config.Device, "Should be got same value.");
}
[Test]
[Category("P2")]
- [Description("Check whether Target throws exception if parameter is invalid")]
- [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Target A")]
+ [Description("Check whether Device throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.Device A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void Target_THROWS_IF_PARAM_IS_INVALID()
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void Device_THROWS_IF_PARAM_IS_INVALID()
{
- Assert.Throws<ArgumentException>(() => _config.Target = (InferenceTargetType)10);
+ Assert.Throws<ArgumentException>(() => _config.Device = (InferenceTargetDevice)10);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether DataType returns correct default value.")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.DataType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void DataType_CHECK_DEFAULT_VALUE()
+ {
+ Assert.That(_config.DataType, Is.EqualTo(InferenceDataType.Float32));
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check whether DataType returns correct value.")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.DataType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void DataType_READ_WRITE()
+ {
+ _config.DataType = InferenceDataType.Float32;
+ Assert.IsInstanceOf<InferenceDataType>(_config.DataType, "Should return InferenceDataType instance");
+ Assert.AreEqual(InferenceDataType.Float32, _config.DataType, "Should be got same value.");
+
+ _config.DataType = InferenceDataType.UInt8;
+ Assert.IsInstanceOf<InferenceDataType>(_config.DataType, "Should return InferenceDataType instance");
+ Assert.AreEqual(InferenceDataType.UInt8, _config.DataType, "Should be got same value.");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether DataType throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Vision.InferenceModelConfiguration.DataType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "TaeYoung Chung, ty83.chung@samsung.com")]
+ public void DataType_THROWS_IF_PARAM_IS_INVALID()
+ {
+ Assert.Throws<ArgumentException>(() => _config.DataType = (InferenceDataType)10);
}
[Test]