Welcome to Jetson Orin NX SUPER repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
02.CLI use
CLI Usage
CLI Usage1. Using CLI for Prediction2. CLI Usage Syntax3. Image PredictionEffect Preview4. Video Prediction5. Real-time PredictionReference Materials
1. Using CLI for Prediction
CLI (Command-Line Interface) is a way for users to interact with computers or software programs, where users run programs or execute tasks by typing text commands, rather than clicking icons or buttons through a graphical user interface (GUI).
2. CLI Usage Syntax
xyolo TASK MODE ARGSWhere TASK (optional) is one of [detect, segment, classify, pose, obb]MODE (required) is one of [train, val, predict, export, track, benchmark]ARGS (optional) are any number of custom 'arg=value' pairs like 'imgsz=320' that override defaults.
3. Image Prediction
Use yolo26n.pt to predict the built-in images in the ultralytics26 project: If the system cannot find the corresponding model file in the directory where the command is run, it will automatically download (if download fails, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics/
Use yolo26n.pt to detect images in the target folder and output results:
xxxxxxxxxxyolo predict model=yolo26n.pt source='assets/bus.jpg'

Effect Preview
yolo recognition output image location: /home/jetson/ultralytics/runs/detect/predict2
Each time it runs, the predict under this folder automatically increments by 1


4. Video Prediction
Use yolo26n.pt to predict videos in the ultralytics project (not built-in ultralytics videos): If the system cannot find the corresponding model file in the directory where the command is run, it will automatically download (if download fails, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics
Use yolo26n.pt to detect the target video and output results:
Here we switched to yolo26n.engine, which is the TensorRT model we converted in the previous section. The performance on Jetson is better than yolo26n.pt
xxxxxxxxxxyolo predict model=yolo26n.engine source='/home/jetson/ultralytics/videos/car.mp4'

Alternatively, we can directly add the show parameter to watch the video
xxxxxxxxxxyolo predict model=yolo26n.engine source='/home/jetson/ultralytics/videos/car.mp4' show

5. Real-time Prediction
Use yolo26n.pt to predict USB camera footage: If the system cannot find the corresponding model file in the directory where the command is run, it will automatically download (if download fails, you can copy the model in yourself)
Note: CLI method does not support CSI cameras
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics
Use yolo26n.pt to detect camera footage and output results: Currently only USB cameras can directly use CLI to predict real-time footage. No relevant information found for CSI cameras as direct input sources
xxxxxxxxxxyolo predict model=yolo26n.engine source=0 save=False show # Object detection# Instance segmentation: yolo predict model=yolo26n-seg.pt source=0 save=False show# Image classification: yolo predict model=yolo26n-cls.pt source=0 save=False show# Pose estimation: yolo predict model=yolo26n-pose.pt source=0 save=False show# Oriented object detection: yolo predict model=yolo26n-obb.pt source=0 save=False show
Click the terminal and press "Ctrl + C" shortcut to terminate the program!
Parameter Description
model: Specify YOLO model
source: Specify recognition source: multiple cameras can switch numbers
save=False: Disable saving results
show: Real-time display
