Welcome to ROSMASTER A1 PRO repository
2.Object Detection
Object Detection
Object Detection1、Enable Optimal Board Performance1.1、Enable Jetson Clocks2、Object Prediction: ImagesPreview3、Object Prediction: VideoPreview4、Object Prediction: Real-Time Detection4.1、CameraPreviewReferences
This document demonstrates Ultralytics Object Detection with Python, showing its performance on images, videos, and real-time detection.
1、Enable Optimal Board Performance
1.1、Enable Jetson Clocks
Enabling Jetson Clocks ensures that all CPU and GPU cores run at maximum frequency: (Not required on RDK and Raspberry Pi boards)
sudo jetson_clocks
RDK boards can use the officially pre-quantized models for BPU inference. If required, you can also choose to use ONNX for inference — just modify the following location:
xxxxxxxxxx~\yahboomcar_ros2_ws\MODELS\yolov26\yahboom_demo\model_utils.py
Change it to ONNX to use the ONNX model.

2、Object Prediction: Images
Use yolo26n.pt to run prediction on the images bundled with the ultralytics project.
Navigate to the code folder:
xxxxxxxxxxcd ~/MODELS/yolov26/yahboom_demo
Run the code:
xxxxxxxxxxpython3 01.detection_image.py
Preview
Location of the images output by yolo: ~/MODELS/yolov26/assets/output/

3、Object Prediction: Video
Use yolo26n.pt to run prediction on a video in the ultralytics project (a video not bundled with ultralytics).
Navigate to the code folder:
xxxxxxxxxxcd ~/MODELS/yolov26/yahboom_demo
Run the code:
xxxxxxxxxxpython3 01.detection_video.py
Preview
Location of the videos output by yolo: ~/MODELS/yolov26/videos/output/

4、Object Prediction: Real-Time Detection
4.1、Camera
Use yolo26n.pt to run prediction on the USB camera feed.
Start the camera:
xxxxxxxxxx#USB cameraros2 launch usb_cam camera.launch.py #Nuwa cameraros2 launch ascamera hp60c.launch.pyNavigate to the code folder:
xxxxxxxxxxcd ~/MODELS/yolov26/yahboom_demo
Run the code: click the preview window and press the q key to terminate the program!
xxxxxxxxxxpython3 01.detection_camera_usb.py
Preview
Location of the videos output by yolo: ~/MODELS/output/ (On RDK and Raspberry Pi boards, refer to the actual path printed in the terminal)
