pub struct CocoDetection {
pub id: AnnId,
pub image_id: ImageId,
pub category_id: CategoryId,
pub score: f64,
pub bbox: Bbox,
pub area: f64,
pub segmentation: Option<Segmentation>,
pub keypoints: Option<Vec<f64>>,
pub num_keypoints: Option<u32>,
}Expand description
One COCO detection record (the DT side, what loadRes consumes).
Per the dispositions in this module’s header:
is_crowddoes not exist as a field — quirks E2 / J4.areais derived frombboxat construction (bbox.w * bbox.h) — quirk J3.idis honored when the user supplies one and auto-assigned otherwise — quirk J1 (aligned, an opinionated improvement over pycocotools’ silent overwrite).
Fields§
§id: AnnIdDetection id. Either user-supplied (J1) or auto-assigned by
CocoDetections::from_inputs.
image_id: ImageIdImage this detection is on.
category_id: CategoryIdCategory this detection predicts.
score: f64Confidence score. Sort key for the matching engine.
bbox: BboxBounding box ((x, y, w, h)).
area: f64Pixel area, derived from bbox per quirk J3.
segmentation: Option<Segmentation>Segmentation prediction, when the detector emits one. None
for bbox-only detectors. Parity dispositions match
CocoAnnotation::segmentation.
keypoints: Option<Vec<f64>>Flat keypoint triplets [x_1, y_1, v_1, x_2, y_2, v_2, ...]
(per ADR-0012). None for bbox-/segm-only detectors; the eval
pipeline raises EvalError::InvalidAnnotation when a DT is
missing keypoints under iouType="keypoints".
num_keypoints: Option<u32>COCO num_keypoints count of visible keypoints. On DT this
field is not required (pycocotools never reads it); the OKS
pipeline derives it from keypoints when needed. Tracked here
for shape-parity with CocoAnnotation::num_keypoints.
Trait Implementations§
Source§impl Annotation for CocoDetection
impl Annotation for CocoDetection
Source§fn category_id(&self) -> CategoryId
fn category_id(&self) -> CategoryId
Source§fn effective_ignore(&self, _: ParityMode) -> bool
fn effective_ignore(&self, _: ParityMode) -> bool
Source§impl Clone for CocoDetection
impl Clone for CocoDetection
Source§fn clone(&self) -> CocoDetection
fn clone(&self) -> CocoDetection
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 CocoDetection
impl Debug for CocoDetection
Source§impl PartialEq for CocoDetection
impl PartialEq for CocoDetection
Source§fn eq(&self, other: &CocoDetection) -> bool
fn eq(&self, other: &CocoDetection) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CocoDetection
Auto Trait Implementations§
impl Freeze for CocoDetection
impl RefUnwindSafe for CocoDetection
impl Send for CocoDetection
impl Sync for CocoDetection
impl Unpin for CocoDetection
impl UnsafeUnpin for CocoDetection
impl UnwindSafe for CocoDetection
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.