pub struct CocoAnnotation {
pub id: u64,
pub image_id: u64,
pub category_id: u32,
pub bbox: [f64; 4],
pub area: f64,
pub iscrowd: u8,
pub segmentation: Option<CocoSegmentation>,
}Expand description
Annotation for object detection and instance segmentation.
Each annotation represents a single object instance in an image.
Note: Keypoints, captions, and panoptic fields are NOT supported.
Fields§
§id: u64Unique annotation ID.
image_id: u64ID of the image containing this object.
category_id: u32Category ID of this object.
bbox: [f64; 4]Bounding box: [x, y, width, height] in pixels (top-left corner).
area: f64Area of the segmentation mask in pixels².
iscrowd: u8Whether this is a crowd annotation (0 = single instance, 1 = crowd).
segmentation: Option<CocoSegmentation>Segmentation mask (polygon or RLE format).
Trait Implementations§
Source§impl Clone for CocoAnnotation
impl Clone for CocoAnnotation
Source§fn clone(&self) -> CocoAnnotation
fn clone(&self) -> CocoAnnotation
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 CocoAnnotation
impl Debug for CocoAnnotation
Source§impl Default for CocoAnnotation
impl Default for CocoAnnotation
Source§fn default() -> CocoAnnotation
fn default() -> CocoAnnotation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CocoAnnotation
impl<'de> Deserialize<'de> for CocoAnnotation
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
Auto Trait Implementations§
impl Freeze for CocoAnnotation
impl RefUnwindSafe for CocoAnnotation
impl Send for CocoAnnotation
impl Sync for CocoAnnotation
impl Unpin for CocoAnnotation
impl UnwindSafe for CocoAnnotation
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> 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> ⓘ
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