CLI#
These flags allow you to define the kind of task and the model to process your image or a directory with images. Check out how to use them in Command Line.
- -i path/to/dir/or/file, --input path/to/dir/or/file#
Path to the input image or the directory with images.
- -o path/to/dir/or/file, --output path/to/dir/or/file#
Path to the output file or the directory. If not provided, then, if input is a file, the prediction will be printed (or shown if it is an image), otherwise, if input is a directory, the predictions will be written to a directory with the same name with an added suffix
_preds. If provided as a file, then the prediction(-s) will be saved to this file (supported extensions include:.txt,.csv,.json,.npy,.pkl,.jpg,.png). If provided as a directory, then the predictions will be saved to this directory use--extensionflag to specify the file extensions in that directory.Default:
None
- -e <ext>, --extension <ext>#
Only used if
--outputis a directory. The extension to use to save the predictions as files. Common extensions include:.txt,.csv,.json,.npy,.pkl,.jpg,.png. If not specified, it will be set automatically to.jpgfor image predictions and to.txtfor all other formats.Default:
None
- -f <format>, --format <format>#
The format to use to map the raw prediction to.
For classification, common formats are
bool,proba,str- checkGlassesClassifier.predictfor more detailsFor detection, common formats are
bool,int,img- checkGlassesDetector.predictfor more detailsFor segmentation, common formats are
proba,img,mask- checkGlassesSegmenter.predictfor more details
If not specified, it will be set automatically to
str,img,maskfor classification, detection, segmentation respectively.Default:
None
- -t <task-name>, --task <task-name>#
The kind of task the model should perform. One of
classificationclassification:anyglassesclassification:sunglassesclassification:eyeglassesclassification:shadowsdetectiondetection:eyesdetection:solodetection:wornsegmentationsegmentation:framessegmentation:fullsegmentation:legssegmentation:lensessegmentation:shadowssegmentation:smart
If specified only as
classification,detection, orsegmentation, the subcategoriesanyglasses,worn, andsmartwill be chosen, respectively.Default:
classification:anyglasses
- -s <model-size>, --size <model-size>#
The model size which determines architecture type. One of
small,medium,large(ors,m,l).Default:
medium
- -b <batch-size>, --batch-size <batch-size>#
Only used if
--inputis a directory. The batch size to use when processing the images. This groups the files in the input directory to batches of sizebatch_sizebefore processing them. In some cases, larger batch sizes can speed up the processing at the cost of more memory usage.Default:
1
- -p <pbar-desc>, --pbar <pbar-desc>#
Only used if
--inputis a directory. It is the description that is used for the progress bar. If specified as""(empty string), no progress bar is shown.Default:
"Processing"