I didn’t try directly run the yolov8 in rock5b.
You need to run the yolov8 in a PC and convert the model (some modifications) using RKNN toolkit2.
Then, run the converted model in rock5b.
You can use this command to clone the yolov8 https://github.com/ultralytics/ultralytics.git
You may want to try the yolov5 examples in the rknn-toolkit2 before working on YoloV8.
Seems I have found a solution. Running the board using the Ameridroid power adapter, I had previously been using a USB-A to USB-C cable. Currently using a USB-C to USB-C and it trained all 3 epochs without a reboot.
This is a beginner question.
Is the rk3588 model (.rknn) created on an AMD64 linux machine (installed rknn-toolkit2)?
Also, if you simulate it (.rknn) on Rock5b (installed rknpu2),
Do I have to run it on rock’s debian11 instead of armbian? Is it not possible to simulate on armbian?
Hi, can you share a screenshot of your onnx model using the https://netron.app/?
Also, please find the node Add_243 and take a screenshot of that node with the connected nodes.
Something like this:
Yes. Some people also managed to create the .rknn in rock 5B but I never tried that.
Do you mean run the neural network model in the physical NPU?
Sorry, I’m using my customized Ubuntu. I didn’t try it in debian or armbian.
Maybe ask the radxa admins could get a better answer?
Hi,
It looks like your script isn’t run the inference simulation.
Can you check the code of rknn is configured as following? rknn.config(mean_values=[[0, 0, 0]], std_values=[[255, 255, 255]], target_platform='rk3588')
However this has pretty bad frames and I wanted to give OpenCV a try for more customization.
I can use OpenCV and open the webcam and even show it. However, using:
ret, frame = cv2.read()
results = model(frame)
I receive an error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
trying to use any() or all() results in an error that a file ‘None’ or ‘True’ does not exist. I’m not quite sure what’s happening, but I have found plenty of examples of OpenCV webcam frames being sent to YOLO this way without such an error.
Hi,
I didn’t try the YOLO+webcam before.
It looks like the camera device id, e.g., /dev/video20 is not properly specified in the both cases.
Can you check the camera device id is correct?
I missed your points.
If I understand correctly, you’re using the YoloV5/YoloV8s model generated from ultralytics, not the example one from rknn toolkit2.
For this step, you need replace the post-processing code, where the error comes from, in the test.py.
Yes, the video source is correct. /dev/video1 is the source, and it can be accessed how I showed there. The first code snippet runs perfectly fine other than poor frames. I can access the video source using OpenCV just fine as well using:
cap = cv2.VideoCapture(1) or cap = cv2.VideoCapture('/dev/video1')
The issue is when passing the OpenCV frame to model().
Yes, i take onnx, that i got on step 2 and try to convert it to rknn
Can you do the same?
Got these error, when tried to execute rknn on rk3588 board
E RKNN: [02:30:45.402] failed to submit!, op id: 190, op name: Add:/model.24/Add_2, flags: 0x5, task start: 942, task number: 36, run task counter: 18, int status: 0
Traceback (most recent call last):
File “/home/sitnikov/YOLOv5-RK3588-Python/inference_npu.py”, line 218, in
input1_data = outputs[1]
IndexError: list index out of range