Welcome to DOFBOT-Pi repository
9. Model Prediction
Model Prediction
Note: If using the docker container from the factory image, you don't need to rebuild the environment. The environment is already set up, you just need to enter the docker according to the previous tutorial and run the corresponding function commands to use it.
1. Program Description
Use Python to call USB cameras or depth cameras to use your own trained models. Here we use our trained orange recognition model as an example. If you need personal training models, you can refer to the following two links, but training on Raspberry Pi is not recommended
Training: Use Ultralytics YOLO for Model Training - Ultralytics YOLO Documentation
2. Program Startup
2.1 Start Camera
Open another terminal and enter the code folder:
xxxxxxxxxxcd /root/ultralytics/ultralytics/yahboom_demo
Run the code: Click on the preview screen and press q key to terminate the program!
xxxxxxxxxxpython3 06.orange_camera_usb.py
Effect Preview
yolo recognition output video location: /root/ultralytics/ultralytics/output/

Example code path:/root/ultralytics/ultralytics/yahboom_demo/06.orange_camera_usb.py