pub enum InferError {
NotUltralytics(String),
BadNames(String),
BadMetadata(String),
UnsupportedTask(String),
ClassCountMismatch {
expected: usize,
found: usize,
},
UnsupportedLayout(String),
AmbiguousLayout(String),
UnsupportedQuantization(String),
UnknownBoxConvention,
}Expand description
Errors that can occur while inferring an Ultralytics schema.
Variants§
NotUltralytics(String)
Model metadata carries no Ultralytics signature.
BadNames(String)
The Ultralytics names metadata field could not be parsed.
BadMetadata(String)
A metadata field is present but carries a value that cannot be interpreted. Distinct from an absent field, which is allowed to select a fallback.
UnsupportedTask(String)
The Ultralytics task metadata field names an unsupported task.
ClassCountMismatch
The number of classes in names does not match what the output
tensor shapes imply.
UnsupportedLayout(String)
The output tensor layout does not match any supported Ultralytics convention.
AmbiguousLayout(String)
More than one output matches the same layout, so which tensor carries the detections depends on the order the runtime reported them. Reported rather than resolved by position.
UnsupportedQuantization(String)
A boundary tensor carries quantization the decoder cannot consume. Currently this means per-channel quantization: the decoder supports per-tensor only, so such a schema would build a decoder that fails.
UnknownBoxConvention
The signals came from ModelSource::Other, for which the box
coordinate convention is unmeasured. Only the ONNX (pixel-space)
and TFLite ([0, 1]) conventions are characterized, and picking
the wrong one silently scales every box by the input size.
Trait Implementations§
Source§impl Debug for InferError
impl Debug for InferError
Source§impl Display for InferError
impl Display for InferError
Source§impl Error for InferError
impl Error for InferError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for InferError
impl RefUnwindSafe for InferError
impl Send for InferError
impl Sync for InferError
impl Unpin for InferError
impl UnsafeUnpin for InferError
impl UnwindSafe for InferError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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