Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[macro_use]
- extern crate clap;
- use clap::{App, ArgMatches, Arg};
- fn main() {
- let matches = parse_args();
- println!("Input video is: {}", matches.value_of("INPUT").unwrap());
- }
- fn parse_args() -> ArgMatches {
- let matches = App::new("My bachelor's diploma")
- .version("1.0")
- .author("Anton P.")
- .about("Analyze road traffic to predict crashes")
- .arg(Arg::with_name("INPUT")
- .help("Sets the input video to use")
- .required(true)
- .index(1))
- .arg(Arg::with_name("OUTPUT")
- .help("Sets the output video file name")
- .required(true)
- .index(2))
- .arg(Arg::with_name("YOLO")
- .help("Sets the input YOLO config path")
- .required(true)
- .index(3))
- .arg(Arg::with_name("confidence")
- .help("Minimum probability to filter weak detections")
- .default_value("0.5")
- .required(false)
- .long("confidence")
- .short("c"))
- .arg(Arg::with_name("threshold")
- .help("Threshold when applying non-maxima suppression")
- .default_value("0.3")
- .required(false)
- .long("threshold")
- .short("t"))
- .get_matches();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement