Welcome to DOFBOT SE repository
9. Model Prediction
Model Prediction
Note: If you are using the factory-installed system image, there is no need to set up the environment from scratch; the environment is already configured. You simply need to follow the tutorial to execute the corresponding commands to utilize the features.
1. Program Description
This section demonstrates how to use Python to access a USB camera and apply your own custom-trained models. We will use our pre-trained orange recognition model as an example. If you wish to train your own custom models, please refer to the two links below:
Training: Model Training with Ultralytics YOLO - Ultralytics YOLO Docs
2. Launching the Program
3.1. Starting the Camera
Depending on your specific camera model, execute the program below. Enter the following command in the terminal:
xxxxxxxxxxcd /home/yahboom/ultralytics/ultralytics/yahboom_demo
Run the code: A preview window will appear; press the 'q' key to terminate the program!
xxxxxxxxxxpython3 06.orange_camera_usb.py
Preview of Results

Example Code Path: /home/yahboom/ultralytics/ultralytics/yahboom_demo/06.orange_camera_usb.py