Maybe an update to the text in the article is warranted. This is the second yolo I got working and the first had a different issue that was only resolved in the video discussion and not the text article, which is usually more useful to anyone copying and pasting code instructions.
Look forward to going through the rest of the article.
Seems to only work with the 8n and the 5n versions. The 11 did not work even when I copied the .pt file which was a remnant in the directory from the first crashing installation. Could not find a 10n version of the .pt with a search of the installed files.
We are waiting for Ultralytics to put out a fix for this, but we will update the guide as needed.
The version we rolled back to might of been a pre-version 11 release so maybe this one a go:
pip install “ultralytics[export]<8.3.90”
I’m currently trying to run Yoloe and also looking for a version that’s new enough to have it, but old enough to not of broken. This is also only a temporary thing as I trust that Ultralytics will fix it, Raspberry Pis are a big platform for them.
Also at the nano model size, the only advantages of Yolo11 are that it’s about 3-5% faster, and uses a few megabytes less RAM, so it’s not that much of an upgrade at nano. The larger models it is more of a difference though.
The NCNN conversion code is in the written guide, here it is as well:
from ultralytics import YOLO
# Load a YOLOv8n PyTorch model
model = YOLO("yolov8n.pt")
# Export the model to NCNN format
model.export(format="ncnn", imgsz=640) # creates 'yolov8n_ncnn_model'
Hi Jaryd, awesome video and cannot wait to get Yolo all working on my new Pi5 system. I have followed your commands exactly, but the ‘pip install ultralytics[export]’ command fails every time, even if I try 'pip install “ultralytics[export]<8.3.90”. The error I get is 'pip process to install build dependancies did not run successfully Exit:code1" and " preparing metadata (pyproject.tom]) did not run successfully: Exit code1" and “..numpy/_core/meson.build:145:31:ERROR: Can not run test applications in this cross environment” and “this error originates from a subprocess, and is likely not a problem with pip”. Have attached some screenshots. Any help in solving this issue would be very much appreciated !
thanks for your email. I tried running your code but I essentially got the same error as last few times (i.e.build dependencies did not run, preparing metadata (pyproject.tom]) did not run, numpy/_core/meson.build:145:31error:can not run test applications in this cross environment).
Additionally, I got a ‘package cython is not available … has no installation candidate’ error following the ‘sudo apt install etc etc’ command you gave me (typo ?).
I have attached the screen shots for your reference.
That is an interesting one. Looks like ‘cython’ doesn’t like being installed by apt anymore and will have to be setup using pip.
I couldn’t install it on one of our test Pis here with sudo apt install cython (which is the equivalent of the install command you have just run, but I did get it to install using the pip install method.
I see you are already inside a virtual environment (yolo_object). Try installing cython inside this environment with the following command pip install cython.
Once this has completed, hopefully this solves the dependency issue and lets you run pip install “ultralytics[export]<8.3.90"
If you are still having issues after this, let us know! It will be worth us running through this setup from scratch with fresh parts to see if we can put together a set of complete setup instructions that works on your exact hardware.
thanks for your info … I tried it and unfortunately it did not work … got the same response as before, although I got a strange ‘warning’ after entering the ‘pip install cython’ command (please attached attached photo).
The first 3 commands worked fine, but the final command ‘pip install ultralytics==8.3.90’ did not work and failed at exactly the same part of the process with the same errors as previously. I have attached a copy of photo’s to show these commands.
I spoke to Sam also and he said he was going to try a couple of things this afternoon !
Good news ! Had a chat to Sam yesterday afternoon, and he told me to wipe my Pi5 back to the factory default and reload my OS (with 64-bit) and try again, as he could get his Pi5 to work fine. What I was unaware was that my pre-packaged OS was 32-bit, and Yolo needs 64-bit OS to work. Once I did this, all worked superbly !! Many thanks to Sam, Dan and Zach !!
I will also add that while I was testing this issue, I had much more luck using a slightly older version of the Ultralytics package, as the current version seems to time out occasionally when using pip to download it.
I found that replacing the pip install ultralytics[export] with pip install ultralytics==8.3.100 worked more consistently.
I had the same problem trying to install ultrlytics packages and have just tried pip install ultralytics==8.3.100 after pip install ultralytics[export] failed.
I now get the following messages:
Hi Ryan and Jaryd
I was able to replicate the results of your tutorials on pose estimation and object recognition, and I am extremely grateful for the research and support that Core provides.
My ultimate objective is to build a camera tracker on a helmet to track fellow skiers on the slopes at a range of 5-20m. I tried OpenCV’s MOSSE tracking algorithm, which runs at 100fps on a Pi3, however it lacks the ability to restore tracking failures which are inevitable. Also, it requires the object to be identified with a bounding box in order for tracking to commence, which is impractical on the slopes. I found that camera tracking with RTK GPS was also deficient due to the demanding environment and signal reliability needed for RTK. I’d now like to see if a YOLO detection model on the Pi5 is fit for my purpose.
It seems that YOLO does not have a tracking model which follows initial detection? If not, I propose to use the yollo11n-pose_ncnn_model to get the bbox coordinates to turn servo motors.
Another potential improvement would be to train the standard (COCO?) model to detect only certain targeted people. It seems that one could potentially be able to refine an existing library to detect only certain individuals (on a busy slope), however I’m not sure if this is realistic, or if anybody else has attempted this?
Richard
Sounds like an awesome project! When I see someone skiing down the slopes with a predator-style mounted camera on their shoulder, I’ll know who it is
I don’t have direct experience with all the specific tracking challenges you mentioned, but your approach with YOLO and pose estimation sounds promising, especially on a Pi5. Training a model to detect certain individuals in a busy environment is definitely challenging but not impossible—fine-tuning a pre-trained COCO model with a good dataset is usually the way to go, though it takes time and data.
Wishing you all the best with your helmet camera tracker — it sounds like a really cool and ambitious build! If you come across any roadblocks or want to bounce ideas, feel free to reach out.
Hi, love your guides, really got me back into machine learning.
However, having real trouble getting past the Ultralytics install which falls over every time because pip can’t handle the number of dependencies.
I’m new to docker, which I’ve used to successfully install the Ultralytics package but it doesn’t play nice with the picam machinery. Any suggestions? This is on a Rpi5 4G with a module 3 camera. Ta.