I have been using darknet YOLOv3 to perform object detection from an RTSP source on my Xavier. YOLOv5 is supposed to be much faster but not supported by darknet. I followed the detect.py example for YOLOv5 on GitHub - ultralytics/yolov5: YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite but cannot get past some python dependancies espcially nump/scipy incompatibility. Has anyone gotten these repo instructions to work on Xavier/Nano? TIA
pip3 install --user --upgrade scipy
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpemj_eboc Check the logs for full command output.
Update: Ran training for 600 iterations on the Xavier. Model works but the accuracy and performance of this detect.py on an RTSP stream is inferior to the old darknet C binary.
You’ll see I created Dockerfiles to build a base image and a repo-specific image.
Look in the Notes file for simple instructions.
I have not attempted training using these images yet, so there may still be parts missing. The run_xavier_detect scripts seems to work.
My next steps:
get a video stream running
then work on training on the Docker images.
I’ll be leaning on what @dennis.faucher posted about RTSP, earlier.
Thanks for your helpful notes.
Update. As planned, I now have a 512x640 RTSP input stream running. I kludged detect.py to dump pngs of the annotated frames to the inference/output folder, just to get an idea of what’s happening.
Next, I want to have a look at training, just to check that the docker image has all components needed for train/test.
repo: GitHub - topiaruss/yolov5: YOLOv5 in PyTorch > ONNX > CoreML > iOS
I’ve been running detect.py from Yolov5 within Docker.
Yesterday I allowed some Ubuntu updates, and I’m dead in the water at the moment, trying to get back to my successful recent CUDA/Docker environment from Friday. In the meantime, the repo I link to above has two Dockerfiles that create a base and an app image. You should probably be able to get something running.
I’d welcome your comments.
In my slightly out-of-date fork of ultralytics repo, you can find aarch64.Dockerfile, and yolov5.app.Dockerfile. They build on an image provided by nvidia that includes pre-built pytorch. Look at how they work with run_xavier_detect.py.
There are brief instructions, here: yolov5/Xavier_NV_Notes.md at master · topiaruss/yolov5 · GitHub
I’m running on Xavier NV, but had a frustrating day, yesterday, due to accepting some upgrades, so I can’t be of much more help until I rebuild a dev environment.
did u convert yolov5 to tensorrt?
I could run yolov5 without docker at the end although detects images but it writes:
segmentation fault (core dumped)
I think it’s because of trt. and even frame rate is about 3 on yolovs5. that’s very low.
what was your framerate?