Welcome to Jetson Orin NX Developer Kit repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
02.CLI use
CLI use
CLI use1. Download the source code2. Enable the optimal performance of the mainboard2.1. Enable the MAX power mode2.2. Enable the Jetson clocks3. Predict with the CLI3.1. CLI usage syntax3.2. Image predictionEffect preview3.3. Video predictionEffect preview3.4. Real-time predictionReferences
1. Download the source code
git clone https://github.com/ultralytics/ultralytics.git
2. Enable the optimal performance of the mainboard
2.1. Enable the MAX power mode
Enabling the MAX Power Mode (the maximum power mode) on the Jetson ensures that all the CPU and the GPU cores are turned on:
xxxxxxxxxxsudo nvpmodel -m 0
2.2. Enable the Jetson clocks
Enabling the Jetson Clocks ensures that all the CPU and the GPU cores run at the maximum frequency:
xxxxxxxxxxsudo jetson_clocks
3. Predict with the CLI
CLI (Command-Line Interface, the command-line interface) is a way for a user to interact with a computer or a software program by typing text commands to run programs or perform tasks, instead of clicking icons or buttons in a graphical user interface (GUI).
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 yolo11n.pt to predict the pictures that come with the ultralytics project: if the system does not find the corresponding model file in the directory in which the command is run, it downloads it automatically (if it cannot be downloaded, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/
Use yolo11n.pt to detect the pictures in the target folder and output the results:
xxxxxxxxxxyolo predict model=yolo11n source='/home/jetson/ultralytics/ultralytics/assets'

Effect preview
The location of the videos that the yolo recognition outputs: /home/jetson/ultralytics/ultralytics/runs/detect;
Each time it runs, the predict under that folder is incremented automatically by 1

3.3. Video prediction
Use yolo11n.pt to predict the videos under the ultralytics project (not the videos that come with ultralytics): if the system does not find the corresponding model file in the directory in which the command is run, it downloads it automatically (if it cannot be downloaded, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
Use yolo11n.pt to detect the videos in the target folder and output the results:
xxxxxxxxxxyolo predict model=yolo11n source='/home/jetson/ultralytics/ultralytics/videos'

Effect preview
The location of the videos that the yolo recognition outputs: /home/jetson/ultralytics/ultralytics/runs/detect
Each time it runs, the predict under that folder is incremented automatically by 1
You can watch the video with ffmpeg; install it with the following command:
xxxxxxxxxxsudo apt updatesudo apt install ffmpeg -y
Play the video:
xxxxxxxxxxffplay <video_name>.avi

3.4. Real-time prediction
Use yolo11n.pt to predict the image of the USB camera: if the system does not find the corresponding model file in the directory in which the command is run, it downloads it automatically (if it cannot be downloaded, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
Use yolo11n.pt to detect the camera image and output the results: currently only the USB camera can use the CLI to predict the real-time image directly; for the CSI camera there is no information about using it directly as an input source.
Since the program has to load the model, the loading takes a while; please be patient.
xxxxxxxxxxyolo predict model=yolo11n.pt source=0 save=False show # Object detection# Instance segmentation: yolo predict model=yolo11n-seg.pt source=0 save=False show# Image classification: yolo predict model=yolo11n-cls.pt source=0 save=False show# Pose estimation: yolo predict model=yolo11n-pose.pt source=0 save=False show# Oriented object detection: yolo predict model=yolo11n-obb.pt source=0 save=False show
Click in the terminal and press the "Ctrl + C" shortcut to terminate the program!
Parameter description
model: specifies the YOLO model
source: specifies the recognition source: the number can be switched with several cameras
save=False: disables saving the results
show: displays in real time
