pub struct AssignResult {
pub is_positive: Vec<bool>,
pub target_boxes: Vec<f32>,
pub target_cls: Vec<usize>,
pub soft_target: Vec<f32>,
}Expand description
Result of assigning GT targets to anchors for a single image.
Fields§
§is_positive: Vec<bool>Whether each anchor is a positive. Shape: [A].
target_boxes: Vec<f32>GT box (cx, cy, w, h) assigned to each anchor (only valid for positives).
Shape: [4, A] channels-first.
target_cls: Vec<usize>GT class index assigned to each anchor (only valid for positives).
Shape: [A].
soft_target: Vec<f32>Soft target per anchor: (align / max_align_for_gt) * max_iou_for_gt.
Zero for negatives. Used as the soft class label AND box loss weight,
matching the ultralytics E2ELoss normalisation. Shape: [A].
Auto Trait Implementations§
impl Freeze for AssignResult
impl RefUnwindSafe for AssignResult
impl Send for AssignResult
impl Sync for AssignResult
impl Unpin for AssignResult
impl UnsafeUnpin for AssignResult
impl UnwindSafe for AssignResult
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