pub struct ConfigOutputs {
pub outputs: Vec<ConfigOutput>,
pub nms: Option<Nms>,
pub decoder_version: Option<DecoderVersion>,
}Expand description
Used to represent the outputs in the model configuration.
§Examples
let config_json = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../testdata/modelpack_split.json"));
let config: ConfigOutputs = serde_json::from_str(config_json)?;
let decoder = DecoderBuilder::new().with_config(config).build()?;
Fields§
§outputs: Vec<ConfigOutput>§nms: Option<Nms>NMS mode from config file. When present, overrides the builder’s NMS setting.
Some(Nms::ClassAgnostic)— class-agnostic NMS: suppress overlapping boxes regardless of classSome(Nms::ClassAware)— class-aware NMS: only suppress boxes with the same classNone— use builder default or skip NMS (user handles it externally)
decoder_version: Option<DecoderVersion>Decoder version for Ultralytics models. Determines the decoding strategy.
Some(Yolo26)— end-to-end model with embedded NMSSome(Yolov5/Yolov8/Yolo11)— traditional models requiring external NMSNone— infer from other settings (legacy behavior)
Trait Implementations§
Source§impl Clone for ConfigOutputs
impl Clone for ConfigOutputs
Source§fn clone(&self) -> ConfigOutputs
fn clone(&self) -> ConfigOutputs
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 ConfigOutputs
impl Debug for ConfigOutputs
Source§impl Default for ConfigOutputs
impl Default for ConfigOutputs
Source§fn default() -> ConfigOutputs
fn default() -> ConfigOutputs
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigOutputs
impl<'de> Deserialize<'de> for ConfigOutputs
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 ConfigOutputs
impl PartialEq for ConfigOutputs
Source§impl Serialize for ConfigOutputs
impl Serialize for ConfigOutputs
impl StructuralPartialEq for ConfigOutputs
Auto Trait Implementations§
impl Freeze for ConfigOutputs
impl RefUnwindSafe for ConfigOutputs
impl Send for ConfigOutputs
impl Sync for ConfigOutputs
impl Unpin for ConfigOutputs
impl UnsafeUnpin for ConfigOutputs
impl UnwindSafe for ConfigOutputs
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