pub struct ServerAnnotation {Show 13 fields
pub label_id: Option<u64>,
pub label_index: Option<u64>,
pub label_name: Option<String>,
pub annotation_type: String,
pub x: f64,
pub y: f64,
pub w: f64,
pub h: f64,
pub score: f64,
pub polygon: String,
pub image_id: u64,
pub annotation_set_id: u64,
pub object_reference: Option<String>,
}Expand description
Annotation data for the server-side annotation.add_bulk API.
This struct represents annotations in the format expected by the server,
which differs from our client-side Annotation struct. Key differences:
- Uses
image_id(server) vssample_id(client) - Uses
typestring (“box”, “seg”) vsAnnotationTypeenum - Coordinates are stored as separate
x,y,w,hfields - Polygon is stored as a JSON string
Fields§
§label_id: Option<u64>Label ID (resolved from label name before sending)
label_index: Option<u64>Label index (alternative to label_id)
label_name: Option<String>Label name (alternative to label_id)
annotation_type: StringAnnotation type: “box” for bounding box, “seg” for segmentation
x: f64Bounding box X coordinate (normalized 0-1, center)
y: f64Bounding box Y coordinate (normalized 0-1, center)
w: f64Bounding box width (normalized 0-1)
h: f64Bounding box height (normalized 0-1)
score: f64Confidence score (0-1)
polygon: StringPolygon data as JSON string (for segmentation)
image_id: u64Image/sample ID in the database
annotation_set_id: u64Annotation set ID
object_reference: Option<String>Object tracking reference (optional)
Trait Implementations§
Source§impl Clone for ServerAnnotation
impl Clone for ServerAnnotation
Source§fn clone(&self) -> ServerAnnotation
fn clone(&self) -> ServerAnnotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerAnnotation
impl Debug for ServerAnnotation
Auto Trait Implementations§
impl Freeze for ServerAnnotation
impl RefUnwindSafe for ServerAnnotation
impl Send for ServerAnnotation
impl Sync for ServerAnnotation
impl Unpin for ServerAnnotation
impl UnsafeUnpin for ServerAnnotation
impl UnwindSafe for ServerAnnotation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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