Welcome to Jetson AGX Orin repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
02.CLI Usage
CLI Usage
CLI Usage1、CLI Introduction2、Enable Maximum Board Performance2.1、Enable MAX Power Mode2.2、Enable Jetson Clocks3、Using CLI for Prediction3.1、CLI Usage Syntax3.2、Image PredictionEffect Preview3.3、Video PredictionEffect Preview3.4、Real-time PredictionReferences
1、CLI Introduction
CLI (Command-Line Interface) is a user interface that interacts with computer systems or programs through keyboard text commands. It was the mainstream interaction method before the popularity of Graphical User Interfaces (GUIs) and is still widely used in system administration, automation scripts, development tools, and other fields.
2、Enable Maximum Board Performance
2.1、Enable MAX Power Mode
Enabling MAX Power Mode on Jetson will ensure all CPU and GPU cores are enabled:
sudo nvpmodel -m 0
2.2、Enable Jetson Clocks
Enabling Jetson Clocks will ensure all CPU and GPU cores run at maximum frequency:
xxxxxxxxxxsudo jetson_clocks
3、Using CLI for Prediction
The following CLI commands are all run in the desktop terminal.
3.1、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.2、Image Prediction
Use yolo26n.pt to predict images included in the ultralytics 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 manually)
Enter project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/
Use yolo26n.pt to detect images in the target folder and output results:
xxxxxxxxxxyolo predict model=yolo26n source='/home/jetson/ultralytics/ultralytics/assets'

Note: Each time it runs, the predict in the output folder automatically increments by 1. Record the path printed by the program.

Effect Preview
yolo recognition output location: /home/jetson/ultralytics/runs/detect
Note: The actual path should be based on the path printed above. /home/jetson/ultralytics/runs/detect/predict

3.3、Video Prediction
Use yolo26n.pt to predict videos in the ultralytics project (not videos that come with ultralytics, if the program cannot find the video, you need to manually place the video file in the /home/jetson/ultralytics/ultralytics/videos path): 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 manually)
Enter project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
Use yolo26n.pt to detect videos in the target folder and output results:
xxxxxxxxxxyolo predict model=yolo26n source='/home/jetson/ultralytics/ultralytics/videos'

Each time it runs, the predict in this folder automatically increments by 1. Record the path printed by the program.

Effect Preview
yolo recognition output video location: /home/jetson/ultralytics/runs/detect
You can use ffmpeg to view videos. Use the following command to install:
xxxxxxxxxxsudo apt install ffmpeg -y
Enter video input path:
Note: Since predict automatically increments by 1 each time the program runs, use the actual output as the standard. predict2 needs to be changed to the actual folder name.
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/runs/detect/predict2
Play video:
xxxxxxxxxxffplay people_animals.avi

3.4、Real-time Prediction
Please first connect the USB camera to the USB port of the motherboard.
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 manually)
Enter project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
Use yolo26n.pt to detect camera footage and output results. You can choose one of the following functions to run.
After the program runs, it will open the camera footage and detect it in real-time, displaying the output results on the screen.
xxxxxxxxxx# Object detectionyolo predict model=yolo26n.pt source=0 save=False show# 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
If this is the first time running the program, the model needs to be loaded, so the loading time will be relatively long. Please wait patiently.
Click the terminal and press the "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
