pub enum ConfigOutput {
Detection(Detection),
Mask(Mask),
Segmentation(Segmentation),
Protos(Protos),
Scores(Scores),
Boxes(Boxes),
MaskCoefficients(MaskCoefficients),
}Variants§
Detection(Detection)
Mask(Mask)
Segmentation(Segmentation)
Protos(Protos)
Scores(Scores)
Boxes(Boxes)
MaskCoefficients(MaskCoefficients)
Implementations§
Source§impl ConfigOutput
impl ConfigOutput
Sourcepub fn shape(&self) -> &[usize]
pub fn shape(&self) -> &[usize]
Returns the shape of the output.
§Examples
let detection_config = configs::Detection {
anchors: None,
decoder: configs::DecoderType::Ultralytics,
quantization: None,
shape: vec![1, 84, 8400],
dshape: Vec::new(),
normalized: Some(true),
};
let output = ConfigOutput::Detection(detection_config);
assert_eq!(output.shape(), &[1, 84, 8400]);Sourcepub fn decoder(&self) -> &DecoderType
pub fn decoder(&self) -> &DecoderType
Returns the decoder type of the output.
§Examples
let detection_config = configs::Detection {
anchors: None,
decoder: configs::DecoderType::Ultralytics,
quantization: None,
shape: vec![1, 84, 8400],
dshape: Vec::new(),
normalized: Some(true),
};
let output = ConfigOutput::Detection(detection_config);
assert_eq!(output.decoder(), &configs::DecoderType::Ultralytics);Sourcepub fn quantization(&self) -> Option<QuantTuple>
pub fn quantization(&self) -> Option<QuantTuple>
Returns the quantization of the output.
§Examples
let detection_config = configs::Detection {
anchors: None,
decoder: configs::DecoderType::Ultralytics,
quantization: Some(configs::QuantTuple(0.012345, 26)),
shape: vec![1, 84, 8400],
dshape: Vec::new(),
normalized: Some(true),
};
let output = ConfigOutput::Detection(detection_config);
assert_eq!(output.quantization(),
Some(configs::QuantTuple(0.012345,26))); ```Trait Implementations§
Source§impl Clone for ConfigOutput
impl Clone for ConfigOutput
Source§fn clone(&self) -> ConfigOutput
fn clone(&self) -> ConfigOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigOutput
impl Debug for ConfigOutput
Source§impl<'de> Deserialize<'de> for ConfigOutput
impl<'de> Deserialize<'de> for ConfigOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConfigOutput
impl PartialEq for ConfigOutput
Source§impl Serialize for ConfigOutput
impl Serialize for ConfigOutput
impl StructuralPartialEq for ConfigOutput
Auto Trait Implementations§
impl Freeze for ConfigOutput
impl RefUnwindSafe for ConfigOutput
impl Send for ConfigOutput
impl Sync for ConfigOutput
impl Unpin for ConfigOutput
impl UnwindSafe for ConfigOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more