If you're using a Raspberry Pi 4, Ultralytics just released an update that will cause an error when you try to use "yolo export model=yolo11n.pt format=ncnn" at 5:15 in the video. To fix the error, run "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20", then re-run the command. I created a GitHub issue asking Ultralytics to resolve this problem, and hopefully they will address it soon. Please comment on the issue to increase visibility if you experience this error: github.com/ultralytics/ultralytics/issues/19091
@amarachicyprian2262 ahh bummer. Thank you for posting the full error, that's helpful. You aren't the only one to encounter this issue. I'm not able to reproduce the error on my Pi 4, but it may have to do with the Ultralytics version - the version for my trained custom model is Ultralytics 8.3.67, and it works. I'll look into it!
Sigh, yep, they broke it. The latest version of Ultralytics causes the "yolo export model=my_model.pt format=ncnn" command to error out. Man it's rough trying to create these guides when versions are always changing 😢. Anyway, you can fix it by using "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20" and then re-running the export command.
Hmm... What model and OS of Raspberry Pi are you using? And are you using the yolo11n.pt model or something else? As a general troubleshooting step, try restarting with a fresh installation of Raspberry Pi OS and working through the steps again.
It's a problem with the latest version of Ultralytics and PyTorch. You can fix it by running "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20" and then running the export command again.
I'm using a Rapberry Pi Camera module 3. When i run your script with --source==picamera0 i don't get a window showing the camera view. Is this expected? How can I show what the camera sees? I'm not getting any error messages it just does seemingly nothing. Thank you in advance! You're videos amazing!
Hi. I have an issue where I have an errror code coming up when I try to install the ultralytics “getting requirements to build wheel” did not run successfully.. I hope you can help
No, the Coral is a bit obsolete now, so I don't use it anymore. If you're still interested, you can find instructions on how to use it here: docs.ultralytics.com/guides/coral-edge-tpu-on-raspberry-pi/ .
@ Yh I’ve checked it out and there guide doesn’t provide nearly enough needed to get it working, desperately needed it for a project I’m working on in university to get up the frame rate but haven’t been able to find good information for good integration with yolo
Excelent video mate, everything works perfectly. Only I have one question, I am using rapsberry pi 4 since I need to use ROS Noetic 1 (Raspberry pi 5 use ROS 2) but the resolution, which I reduce to 640x480, is about 2 fps and it looks a little slow. Do you know how can I improve the fps for the detecion? Or do you know for example how to run this using the TPU coral accelerator from google? Thanks!
@@FernandoLopez-pp3it hey! do you have any idea what your pi4 os is? also the python version you’re using? i have a problem with turning the model into an ncnn format and i’m not sure what the problem is
If you're using a Raspberry Pi 4, Ultralytics just released an update that will cause an error when you try to use "yolo export model=yolo11n.pt format=ncnn" at 5:15 in the video. To fix the error, run "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20", then re-run the command.
I created a GitHub issue asking Ultralytics to resolve this problem, and hopefully they will address it soon. Please comment on the issue to increase visibility if you experience this error: github.com/ultralytics/ultralytics/issues/19091
Excelente video!! de los mejores que he visto hasta ahora
Dude i am so glad you back.
You're the best sir 😊
Thanks a lot for your effort!
Genius as always!
going to try this today!
Great! Let me know if you have any issues getting it to work 👍
yolo export model=my_model.pt format=ncnn
Ultralytics 8.3.71 Python-3.11.2 torch-2.6.0+cpu CPU (Cortex-A72)
YOLO11n summary (fused): 238 layers, 2,583,127 parameters, 0 gradients, 6.3 GFLOPs
PyTorch: starting from 'my_model.pt' with input shape (1, 3, 480, 480) BCHW and output shape(s) (1, 9, 4725) (5.2 MB)
TorchScript: starting export with torch 2.6.0+cpu...
Illegal instruction
for more context i'm using a debian GNU/Linux 12 (bookworm) os and a raspberry pi4b (arm64)
@amarachicyprian2262 ahh bummer. Thank you for posting the full error, that's helpful. You aren't the only one to encounter this issue. I'm not able to reproduce the error on my Pi 4, but it may have to do with the Ultralytics version - the version for my trained custom model is Ultralytics 8.3.67, and it works. I'll look into it!
Sigh, yep, they broke it. The latest version of Ultralytics causes the "yolo export model=my_model.pt format=ncnn" command to error out. Man it's rough trying to create these guides when versions are always changing 😢. Anyway, you can fix it by using "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20" and then re-running the export command.
I can't do the command you did at 5:15. Torchscript says starting export with torch 2.6.0+cpu... Invalid instruction.
Hmm... What model and OS of Raspberry Pi are you using? And are you using the yolo11n.pt model or something else? As a general troubleshooting step, try restarting with a fresh installation of Raspberry Pi OS and working through the steps again.
It's a problem with the latest version of Ultralytics and PyTorch. You can fix it by running "pip install ultralytics==8.3.70 torch==2.5.1 torchvision==0.20" and then running the export command again.
I'm using a Rapberry Pi Camera module 3. When i run your script with --source==picamera0 i don't get a window showing the camera view. Is this expected? How can I show what the camera sees? I'm not getting any error messages it just does seemingly nothing.
Thank you in advance! You're videos amazing!
i have a yolo8 model which is trained on the custom dataset of grocery items , the model size is around 130mb will it run on pi 4?
Hi. I have an issue where I have an errror code coming up when I try to install the ultralytics “getting requirements to build wheel” did not run successfully.. I hope you can help
How did you get the coordinates of the couch?
Can you integrate SMS feature to the YOLO model when it has detected an object, let's say "banana"
Can you show how to do it on the Google coral ?
No, the Coral is a bit obsolete now, so I don't use it anymore. If you're still interested, you can find instructions on how to use it here: docs.ultralytics.com/guides/coral-edge-tpu-on-raspberry-pi/ .
@ Yh I’ve checked it out and there guide doesn’t provide nearly enough needed to get it working, desperately needed it for a project I’m working on in university to get up the frame rate but haven’t been able to find good information for good integration with yolo
Excelent video mate, everything works perfectly. Only I have one question, I am using rapsberry pi 4 since I need to use ROS Noetic 1 (Raspberry pi 5 use ROS 2) but the resolution, which I reduce to 640x480, is about 2 fps and it looks a little slow. Do you know how can I improve the fps for the detecion? Or do you know for example how to run this using the TPU coral accelerator from google? Thanks!
@@FernandoLopez-pp3it hey! do you have any idea what your pi4 os is? also the python version you’re using? i have a problem with turning the model into an ncnn format and i’m not sure what the problem is
@amarachicyprian2262 For sure, the python version I dont remeber well if it is python 3.8 or python 3.10 and the OS is Ubuntu 20.04 Budgie
How can I contact you. I have some questions I would like ask you. More like your opinion on something
hey does this work offline