pub struct StatRequest {
pub metric: Metric,
pub iou_threshold: Option<f64>,
pub area: AreaRng,
pub max_dets: MaxDetSelector,
pub category_filter: CategoryFilter,
}Expand description
One line of a summary plan — describes a single mean to compute.
Fields§
§metric: MetricAP or AR.
iou_threshold: Option<f64>None averages across the IoU ladder; Some(t) pins one row.
Looked up against iou_thresholds within an internal absolute
tolerance (≈1e-9) at
summarize time; values not on the ladder produce
EvalError::InvalidConfig.
area: AreaRngArea-range bucket on the A-axis.
max_dets: MaxDetSelectorHow to pick the M-axis entry.
category_filter: CategoryFilterK-axis subset (ADR-0026 D2). Defaults to
CategoryFilter::All for COCO-shape plans; LVIS plans use
CategoryFilter::Frequency for the AP_r/c/f buckets.
Implementations§
Source§impl StatRequest
impl StatRequest
Sourcepub const fn new(
metric: Metric,
iou_threshold: Option<f64>,
area: AreaRng,
max_dets: MaxDetSelector,
) -> Self
pub const fn new( metric: Metric, iou_threshold: Option<f64>, area: AreaRng, max_dets: MaxDetSelector, ) -> Self
Convenience constructor. const-callable so coco_detection_default
and downstream user-defined plans can be assembled in const
contexts. Defaults category_filter to CategoryFilter::All.
Sourcepub const fn new_with_filter(
metric: Metric,
iou_threshold: Option<f64>,
area: AreaRng,
max_dets: MaxDetSelector,
category_filter: CategoryFilter,
) -> Self
pub const fn new_with_filter( metric: Metric, iou_threshold: Option<f64>, area: AreaRng, max_dets: MaxDetSelector, category_filter: CategoryFilter, ) -> Self
Construct with a non-default CategoryFilter in one shot.
const-callable for the Frequency
and All variants;
ByIds carries a heap-allocated
Vec<CategoryId> and is constructed at runtime.
Sourcepub const fn coco_detection_default() -> [Self; 12]
pub const fn coco_detection_default() -> [Self; 12]
The canonical 12-entry pycocotools detection plan, in the
[AP, AP50, AP75, AP_S, AP_M, AP_L, AR_1, AR_10, AR_100, AR_S, AR_M, AR_L] order. Bit-exact with cocoeval is by construction:
summarize_detection is just summarize_with(.., this, ..).
Sourcepub const fn lvis_default() -> [Self; 13]
pub const fn lvis_default() -> [Self; 13]
The canonical 13-entry LVIS detection plan (ADR-0026 AF1, AF4),
in the LVIS print_results order:
[AP, AP50, AP75, APs, APm, APl, APr, APc, APf, AR@300, ARs@300, ARm@300, ARl@300]
Differences from Self::coco_detection_default:
- 9 AP entries vs 6. Three additional rows (APr/APc/APf)
filter the K-axis by
Frequencytag.lvis-apireports them as separate entries, notBreakdownaxes (ADR-0016f64-keyed type doesn’t fit categorical tags). - 4 AR entries vs 6. No
AR@1/AR@10/AR@100— LVIS reports recall atmax_dets=300only (AF4). TheLargestselector resolves to whatever the user passes; pair the plan withmax_dets=[300]for parity withLVISEval.
Frequency-filtered entries route through
summarize_with_lvis; calling summarize_with on this
plan returns EvalError::InvalidConfig (the plain entry
point has no K-axis context).
Sourcepub const fn coco_keypoints_default() -> [Self; 10]
pub const fn coco_keypoints_default() -> [Self; 10]
The canonical 10-entry pycocotools keypoints plan, in the
[AP, AP50, AP75, AP_M, AP_L, AR, AR50, AR75, AR_M, AR_L]
order (cocoeval.py:478-499 under iouType="keypoints").
Differs from Self::coco_detection_default in three ways,
all per ADR-0012:
- 10 entries, not 12 — the small-area row is dropped on both AP and AR (quirk D5).
- Every entry uses
MaxDetSelector::Largest, which resolves to the kp-canonical(20,)ladder; there are noAR_1/AR_10/AR_100rows because the kp ladder has only one rung. - The
AreaRngindices0/1/2(all/medium/large) are re-indexed for the kp A-axis. Callers must pair this plan withcrate::AreaRange::keypoints_defaultso the A-axis indices line up; the constAreaRng::ALL/MEDIUM/LARGEcarry the four-bucket detection-grid indices and would index off the end of a three-bucket accumulator.
Trait Implementations§
Source§impl Clone for StatRequest
impl Clone for StatRequest
Source§fn clone(&self) -> StatRequest
fn clone(&self) -> StatRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for StatRequest
impl RefUnwindSafe for StatRequest
impl Send for StatRequest
impl Sync for StatRequest
impl Unpin for StatRequest
impl UnsafeUnpin for StatRequest
impl UnwindSafe for StatRequest
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.