use clap::Parser; | |
use crate::YOLOTask; | |
pub struct Args { | |
/// ONNX model path | |
pub model: String, | |
/// input path | |
pub source: String, | |
/// device id | |
pub device_id: u32, | |
/// using TensorRT EP | |
pub trt: bool, | |
/// using CUDA EP | |
pub cuda: bool, | |
/// input batch size | |
pub batch: u32, | |
/// trt input min_batch size | |
pub batch_min: u32, | |
/// trt input max_batch size | |
pub batch_max: u32, | |
/// using TensorRT --fp16 | |
pub fp16: bool, | |
/// specify YOLO task | |
pub task: Option<YOLOTask>, | |
/// num_classes | |
pub nc: Option<u32>, | |
/// num_keypoints | |
pub nk: Option<u32>, | |
/// num_masks | |
pub nm: Option<u32>, | |
/// input image width | |
pub width: Option<u32>, | |
/// input image height | |
pub height: Option<u32>, | |
/// confidence threshold | |
pub conf: f32, | |
/// iou threshold in NMS | |
pub iou: f32, | |
/// confidence threshold of keypoint | |
pub kconf: f32, | |
/// plot inference result and save | |
pub plot: bool, | |
/// check time consumed in each stage | |
pub profile: bool, | |
} | |