Welcome to Jetson Orin NANO Developer Kit repository
02.CLI use
Using the CLI
Using the CLI1. Downloading the Source Code2. Enabling Best Performance of the Mainboard2.1. Enabling MAX Power Mode2.2. Enabling Jetson Clocks3. Prediction Using the CLI3.1. CLI Syntax3.2. Image PredictionResult Preview3.3. Video Prediction3.4. Real-Time PredictionReferences
1. Downloading the Source Code
git clone https://github.com/ultralytics/ultralytics.git
2. Enabling Best Performance of the Mainboard
2.1. Enabling MAX Power Mode
Enabling MAX Power Mode on the Jetson ensures that all CPU and GPU cores are turned on:
xxxxxxxxxxsudo nvpmodel -m 2
2.2. Enabling Jetson Clocks
Enabling Jetson Clocks ensures that all CPU and GPU cores run at their maximum frequency:
xxxxxxxxxxsudo jetson_clocks
3. Prediction Using the CLI
CLI (Command-Line Interface) is a way for users to interact with a computer or software program by typing text commands to run programs or perform tasks, instead of clicking icons or buttons through a graphical user interface (GUI).
3.1. CLI 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 images bundled with the ultralytics project: if the system cannot find the corresponding model file in the directory where the command is run, it will be downloaded automatically (if the download fails, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics/
Use yolo11n.pt to detect the images in the target folder and output the results:
xxxxxxxxxxyolo predict model=yolo11n source='/home/jetson/ultralytics/ultralytics/assets'
The default output location: /home/jetson/ultralytics/runs/detect. With each run, the predict folder under it is automatically incremented by 1. To specify a location, you can enter the command:
xxxxxxxxxxyolo predict model=yolo11n source='/home/jetson/ultralytics/ultralytics/assets' project='/home/jetson/yolo-output' name='asset-test'
The results will be written to /home/jetson/yolo-output/asset-test/.

Result Preview

3.3. Video Prediction
Use yolo11n.pt to predict a video in the ultralytics project (not a video bundled with ultralytics): if the system cannot find the corresponding model file in the directory where the command is run, it will be downloaded automatically (if the download fails, 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'
The default output location: /home/jetson/ultralytics/runs/detect. With each run, the predict folder under it is automatically incremented by 1. To specify a location, you can enter the command:
xxxxxxxxxxyolo predict model=yolo11n source='/home/jetson/ultralytics/ultralytics/videos' project='/home/jetson/yolo-output' name='video-test'
The results will be written to /home/jetson/yolo-output/video-test/.

To view the video you can use ffmpeg. If ffmpeg is not installed, install it with the following command:
xxxxxxxxxxsudo apt updatesudo apt install ffmpeg -y
Play the video:
xxxxxxxxxxffplay <video_name>.avi

You can also preview with vlc:
xxxxxxxxxxvlc <video_name>.avi

3.4. Real-Time Prediction
Use yolo11n.pt to predict the USB camera feed: if the system cannot find the corresponding model file in the directory where the command is run, it will be downloaded automatically (if the download fails, you can copy the model in yourself)
Enter the project folder:
xxxxxxxxxxcd /home/jetson/ultralytics/ultralytics
Use yolo11n.pt to detect the camera feed and output the results: currently only USB cameras can be used directly with the CLI to predict live feeds; no documentation has been found for using CSI cameras directly as an input source
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 the terminal and press the "Ctrl + C" shortcut to terminate the program!
Parameter Description
model: Specifies the YOLO model
source: Specifies the recognition source: switch the number when using multiple cameras
save=False: Disables saving results
show: Displays in real time
