Menu

#72 CLI

open
nobody
None
2026-04-04
2026-03-29
Anonymous
No

Originally created by: brohoya

Discussion

  • Anonymous

    Anonymous - 2026-04-03

    Originally posted by: EHxuban11

    I have tried the cli and noted the following things:

    libreyolo models:

    It would be desirable for sizes to be ordered by parameters: e.g. Yolo9 has t,s,m,c
    image

    I also got this error, but the libreyolo models command still worked. Maybe we can add a warning filter so the cli output looks cleaner?
    % libreyolo models
    /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/albumentations/check_version.py:147: UserWarning: Error fetching version info <urlopen error="" <span="">[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1028)>
    data = fetch_version_info()</urlopen>

    libreyolo info --model MODEL_NAME

    It works well if the name exists, but if the name doesn't exist, it still tries to load it then throws an error. Instead it could check if the model exists before trying to load it, and if it doesn't exist, it could say something like: "Unknown model yolo9t. Available: libreyolo9t, libreyolo9s, ..."

    image

    Libreyolo predict with the --save option

    After saving, it should print the output path

    Libreyolo train

    instead of:
    Missing option '--data' (env var: 'None').
    It could say something like:

    Missing required option '--data'.                      
    Expects a YAML dataset config (YOLO format).           
    Try: libreyolo train --data coco8.yaml --model yolox-s 
    --epochs 3
    
     
  • Anonymous

    Anonymous - 2026-04-03

    Originally posted by: EHxuban11

    Generally speaking the errors are not very helpful/actionable. They should tell you what you did wrong and what the library expects.

     
  • Anonymous

    Anonymous - 2026-04-04

    Ticket changed by: brohoya

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-04-04

    Originally posted by: brohoya

    @EHxuban11

    • Reordered the model sizes
    • Cleared the warnings on the CLI
    • For model names: it now finds a close match suggestion and shows available models:

      :::bash
      libreyolo info --model yolo9t
      2026-04-04 12:31:53 | ERROR | Error [model_not_found]: Unknown model 'yolo9t'. Did you mean 'yolo9-t'?
      2026-04-04 12:31:53 | INFO | Suggestion: Available: yolox-n, yolox-t, yolox-s, yolox-m, yolox-l, yolox-x, yolo9-t, yolo9-s, yolo9-m, yolo9-c, rfdetr-n, rfdetr-s, rfdetr-m, rfdetr-l

      libreyolo info --model banana
      2026-04-04 12:32:28 | ERROR | Error [model_not_found]: Unknown model 'banana'.
      2026-04-04 12:32:28 | INFO | Suggestion: Available: yolox-n, yolox-t, yolox-s, yolox-m, yolox-l, yolox-x, yolo9-t, yolo9-s, yolo9-m, yolo9-c, rfdetr-n, rfdetr-s, rfdetr-m, rfdetr-l

    • The predict command now shows the path where the output is saved:

      :::bash
      libreyolo predict --source libreyolo/assets/parkour.jpg --save
      2026-04-04 12:33:10 | INFO | Loading yolox-s...
      2026-04-04 12:33:10 | INFO | Running inference on libreyolo/assets/parkour.jpg...
      image 1/1 parkour.jpg: 1280x852 3 persons, 2 skateboards, 103.1ms
      Results saved to runs/detect/predict3

    • About the train command, the CLI is showing this now:

      libreyolo train
      Usage: libreyolo train [OPTIONS]
      Try 'libreyolo train --help' for help.
      ╭─ Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
      │ Missing option '--data'. │
      ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
      libreyolo train --help

      Usage: libreyolo train [OPTIONS]

      Train a detection model on a dataset.

      ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
      │ * --data TEXT Path to dataset YAML (YOLO format, e.g. coco8.yaml) [required]
      │ --model TEXT Model name or path to weights [default: yolox-s]
      │ --epochs INTEGER Training epochs [default: 300]
      │ --batch INTEGER Batch size per device [default: 16]
      │ --imgsz INTEGER Training image size [default: 640]
      │ --device TEXT Device: 0, cpu, mps, auto [default: auto]
      │ --workers INTEGER Dataloader workers [default: 4]
      │ --seed INTEGER Random seed [default: 0]
      │ --resume TEXT Resume training: true, or path to checkpoint │
      │ --amp --no-amp Automatic Mixed Precision [default: amp]
      │ --pretrained --no-pretrained Use pretrained weights [default: pretrained]
      │ --optimizer TEXT Optimizer: sgd, adam, adamw [default: sgd]
      │ --lr0 FLOAT Initial learning rate [default: 0.01]
      │ --momentum FLOAT SGD momentum / Adam beta1 [default: 0.937]
      │ --weight-decay FLOAT L2 regularization [default: 0.0005]
      │ --nesterov --no-nesterov Nesterov momentum [default: nesterov]
      │ --scheduler TEXT LR schedule type [default: yoloxwarmcos]
      │ --warmup-epochs INTEGER Warmup duration [default: 5]
      │ --warmup-lr-start FLOAT Initial warmup LR [default: 0.0]
      │ --min-lr-ratio FLOAT Minimum LR ratio [default: 0.05]
      │ --mosaic FLOAT Mosaic probability [default: 1.0]
      │ --mixup FLOAT Mixup probability [default: 1.0]
      │ --hsv-prob FLOAT HSV jitter probability [default: 1.0]
      │ --flip-prob FLOAT Horizontal flip probability [default: 0.5]
      │ --degrees FLOAT Rotation +/- degrees [default: 10.0]
      │ --translate FLOAT Translation ratio [default: 0.1]
      │ --shear FLOAT Shear angle [default: 2.0]
      │ --mosaic-scale TEXT Mosaic scale range [default: (0.1,2.0)]
      │ --mixup-scale TEXT Mixup scale range [default: (0.5,1.5)]
      │ --no-aug-epochs INTEGER Disable augmentation for final N epochs [default: 15]
      │ --ema --no-ema Exponential Moving Average [default: ema]
      │ --ema-decay FLOAT EMA decay factor [default: 0.9998]
      │ --val --no-val Validate during training [default: val]
      │ --eval-interval INTEGER Validate every N epochs [default: 10]
      │ --patience INTEGER Early stopping patience (0=disabled) [default: 50]
      │ --project TEXT Output directory root [default: runs/train]
      │ --name TEXT Experiment name [default: exp]
      │ --exist-ok --no-exist-ok Reuse existing output directory [default: no-exist-ok]
      │ --save-period INTEGER Save checkpoint every N epochs [default: 10]
      │ --log-interval INTEGER Log loss every N batches [default: 10]
      │ --json JSON output to stdout │
      │ --quiet Suppress stderr │
      │ --dry-run Validate without executing │
      │ --help-json Dump command schema as JSON │
      │ --help Show this message and exit. │
      ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

     
  • Anonymous

    Anonymous - 2026-04-04

    Ticket changed by: brohoya

    • status: closed --> open
     

Log in to post a comment.

Auth0 Logo