pub struct BoundingBox {
pub x1: u32,
pub y1: u32,
pub x2: u32,
pub y2: u32,
pub label: String,
pub confidence: Option<f32>,
}Expand description
A single detection emitted by a VL model’s grounding head.
Coordinates are in pixel space of the input image, following
Qwen2.5-VL’s inclusive xyxy convention — the same as COCO and
standard detection reference implementations. Both corners are
inclusive: width is x2 - x1 + 1, height is y2 - y1 + 1.
label is the model-supplied object reference; may be empty when
the prompt already named the subject (“find the dog”).
Fields§
§x1: u32Inclusive left pixel.
y1: u32Inclusive top pixel.
x2: u32Inclusive right pixel (width = x2 - x1 + 1).
y2: u32Inclusive bottom pixel (height = y2 - y1 + 1).
label: StringObject label the model attached to this box. Empty when no
<|object_ref_*|> span preceded the box.
confidence: Option<f32>Model-reported confidence in [0.0, 1.0] when available.
Qwen2.5-VL does not currently emit per-box confidences inline;
this field exists for forward compat with richer backends.
Implementations§
Trait Implementations§
Source§impl Clone for BoundingBox
impl Clone for BoundingBox
Source§fn clone(&self) -> BoundingBox
fn clone(&self) -> BoundingBox
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BoundingBox
impl Debug for BoundingBox
Source§impl<'de> Deserialize<'de> for BoundingBox
impl<'de> Deserialize<'de> for BoundingBox
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>,
Source§impl PartialEq for BoundingBox
impl PartialEq for BoundingBox
Source§fn eq(&self, other: &BoundingBox) -> bool
fn eq(&self, other: &BoundingBox) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for BoundingBox
impl Serialize for BoundingBox
impl StructuralPartialEq for BoundingBox
Auto Trait Implementations§
impl Freeze for BoundingBox
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnsafeUnpin for BoundingBox
impl UnwindSafe for BoundingBox
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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