Skip to main content

yscv_eval/
lib.rs

1//! Evaluation and benchmarking utilities for yscv.
2#![forbid(unsafe_code)]
3
4mod camera_diagnostics;
5mod classification;
6mod counting;
7mod dataset;
8mod detection;
9mod error;
10mod metrics;
11mod pipeline;
12mod regression;
13#[cfg(test)]
14mod tests;
15mod timing;
16mod tracking;
17mod util;
18
19pub const CRATE_ID: &str = "yscv-eval";
20
21pub use camera_diagnostics::{
22    CameraDiagnosticsCapture, CameraDiagnosticsDevice, CameraDiagnosticsFirstFrame,
23    CameraDiagnosticsReport, CameraDiagnosticsRequested, CameraDiagnosticsThresholds,
24    CameraDiagnosticsTiming, CameraDiagnosticsViolation, load_camera_diagnostics_report_json_file,
25    parse_camera_diagnostics_report_json, validate_camera_diagnostics_report,
26};
27pub use classification::{
28    F1Average, accuracy, average_precision, classification_report, cohens_kappa, confusion_matrix,
29    f1_score, per_class_precision_recall, precision_recall_curve,
30};
31pub use counting::{CountingMetrics, evaluate_counts};
32pub use dataset::{
33    load_detection_dataset_coco_files, load_detection_dataset_jsonl_file,
34    load_detection_dataset_kitti_label_dirs, load_detection_dataset_openimages_csv_files,
35    load_detection_dataset_voc_xml_dirs, load_detection_dataset_widerface_files,
36    load_detection_dataset_yolo_label_dirs, load_tracking_dataset_jsonl_file,
37    load_tracking_dataset_mot_txt_files, parse_detection_dataset_coco,
38    parse_detection_dataset_jsonl, parse_detection_dataset_openimages_csv,
39    parse_detection_dataset_widerface, parse_tracking_dataset_jsonl, parse_tracking_dataset_mot,
40};
41pub use detection::{
42    CocoMetrics, DetectionDatasetFrame, DetectionEvalConfig, DetectionFrame, DetectionMetrics,
43    LabeledBox, detection_frames_as_view, evaluate_detections, evaluate_detections_coco,
44    evaluate_detections_from_dataset,
45};
46pub use error::EvalError;
47pub use metrics::{
48    auc, dice_score, mean_iou, per_class_iou, psnr, roc_curve, ssim, top_k_accuracy,
49};
50pub use pipeline::{
51    BenchmarkViolation, PipelineBenchmarkReport, PipelineBenchmarkThresholds, PipelineDurations,
52    StageThresholds, parse_pipeline_benchmark_thresholds, summarize_pipeline_durations,
53    validate_pipeline_benchmark_thresholds,
54};
55pub use regression::{mae, mape, r2_score, rmse};
56pub use timing::{TimingStats, summarize_durations};
57pub use tracking::{
58    GroundTruthTrack, TrackingDatasetFrame, TrackingEvalConfig, TrackingFrame, TrackingMetrics,
59    evaluate_tracking, evaluate_tracking_from_dataset, hota, idf1, tracking_frames_as_view,
60};