Welcome to DOFBOT-Ultra repository
2. CLI Usage
CLI Usage
Note: The environment is already configured. Simply follow the tutorial to run the corresponding functional commands.
1. Download Source Code
⚠️ If you are using the factory image, this step can be skipped.
git clone https://github.com/ultralytics/ultralytics.git
2. Using CLI for Prediction
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, rather than clicking icons or buttons in a graphical user interface (GUI).
2.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.2.2. Image Prediction
Use yolo11n.pt to predict images that come with the ultralytics project. If the system does not find the corresponding model file in the directory where the command is run, it will automatically download it (if unable to download, you can manually copy the model into it).
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics/ultralyticsUse yolo11n.pt to detect images in the target folder and output results:
xxxxxxxxxx# The image path can be customized to your own imageyolo predict model=yolo11n source='/home/sunrise/ultralytics/ultralytics/assets/bus.jpg' 
The above image indicates successful inference.
Result Preview
YOLO recognition output video location:
xxxxxxxxxx/home/sunrise/ultralytics/ultralytics/runs/detect
Each time it runs, predict under this folder increments by 1 automatically.

3.3. Video Prediction
Use yolo11n.pt to predict videos under the ultralytics project (not ultralytics built-in videos). If the system does not find the corresponding model file in the directory where the command is run, it will automatically download it (if unable to download, you can manually copy the model into it).
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics/ultralytics
Use yolo11n.pt to detect videos in the target folder and output results:
xxxxxxxxxx# The video path can be customized to your own pathyolo predict model=yolo11n source='/home/sunrise/ultralytics/ultralytics/videos/people_animals.mp4' 
The above image indicates successful inference.
Result Preview
YOLO recognition output video location:
xxxxxxxxxx/home/sunrise/ultralytics/ultralytics/runs/detect
Each time it runs, predict under this folder increments by 1 automatically.

You can use ffmpeg to view videos. Install it using the following command:
xxxxxxxxxxsudo apt updatesudo apt install ffmpeg -y
Play the video:
xxxxxxxxxxffplay -x 640 -y 480 <video_name>.mp4

3.4. Real-time Prediction
⚠️ This feature only supports USB cameras. Depth cameras are not compatible with CLI.
Use yolo11n.pt to predict the USB camera feed. If the system does not find the corresponding model file in the directory where the command is run, it will automatically download it.
Enter the project folder:
xxxxxxxxxxcd ~/ultralytics/ultralytics
Use yolo11n.pt to detect the camera feed and output results:
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 showClick on the terminal and press Ctrl + C to terminate the program!
Parameter Description
model: Specifies the YOLO model
source: Specifies the recognition source. Multiple cameras can switch by changing the number.
save=False: Disables saving results
show: Real-time display
