Skip to main content

Annotation

Trait Annotation 

Source
pub trait Annotation {
    // Required methods
    fn image_id(&self) -> ImageId;
    fn category_id(&self) -> CategoryId;
    fn area(&self) -> f64;
    fn is_crowd(&self) -> bool;
    fn effective_ignore(&self, mode: ParityMode) -> bool;
}
Expand description

Common interface every annotation type on every dataset implements.

The matching engine (per ADR-0005) reads only this trait — it does not see CocoAnnotation or any future per-dataset annotation type directly.

Required Methods§

Source

fn image_id(&self) -> ImageId

Image this annotation belongs to.

Source

fn category_id(&self) -> CategoryId

Category this annotation belongs to.

Source

fn area(&self) -> f64

Pixel area.

Source

fn is_crowd(&self) -> bool

Crowd flag (raw, before parity resolution).

Source

fn effective_ignore(&self, mode: ParityMode) -> bool

Effective ignore flag under the given parity mode.

Implementors§