# Yolov5 into Processing Library

**URL:** https://discourse.processing.org/t/yolov5-into-processing-library/37297
**Category:** Libraries
**Created:** [June 3, 2022, 5:13am UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297 "2022-06-03T05:13:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Clifford](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@Clifford](https://discourse.processing.org/u/Clifford)
#### Post date: [June 3, 2022, 5:13am UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297/1 "2022-06-03T05:13:03Z")

</div>

Hi  
Ive been using processing for sometime now one thing that interest me is the open cv application .

is there is some way to incorporate ultralytics Yolo5v Vision AI into Processing and make it simple to implement . lets say servo control with the Arduino Libraries.

the Yolo application I wanted to implement

> **[GitHub - ultralytics/yolov5: YOLOv5 🚀 in PyTorch \> ONNX \> CoreML \>...](https://github.com/ultralytics/yolov5)**
>
> YOLOv5 🚀 in PyTorch \> ONNX \> CoreML \> TFLite. Contribute to ultralytics/yolov5 development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [June 9, 2022, 9:12pm UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297/2 "2022-06-09T21:12:33Z")

</div>

Hi @Clifford,

Welcome to the forum! 😉

You can check out this older post about YOLO detection in Processing:

> [@YOLO object detection](https://discourse.processing.org/t/yolo-object-detection/598):
>
> Hello guys, Is there a way to do YOLO real time object detection in processing (or P5.js/processing.py) using a library like this : I already know OpenCV for computer vision but it doesn’t include object detection. Thanks

And also the `deep-vision-processing` library by @cansik :

> [@Deep Vision - Machine Learning Computer Vision for Processing (Library)](https://discourse.processing.org/t/deep-vision-machine-learning-computer-vision-for-processing-library/30118):
>
> Hello Together I’m happy to present you a project I’ve been working on for over a year now. With OpenCV for Processing we have a good base library for traditional image processing. However, these algorithms are more and more pushed into the background by machine learning. Therefore I started a year ago to develop a library that (mainly) uses the Deep Neural Network (DNN) module of OpenCV to bring machine learning, especially CNN into the Processing world. The library is not about training the…

---

<div class="post-metadata">

### Author: ![Clifford](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@Clifford](https://discourse.processing.org/u/Clifford)
#### Post date: [June 10, 2022, 1:30am UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297/3 "2022-06-10T01:30:13Z")

</div>

yes I found the library for processing Yolov4 yet to see if anyone update it for Yolov5 as im using this version

---

<div class="post-metadata">

### Author: ![cansik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cansik/32/8815_2.png) [@cansik](https://discourse.processing.org/u/cansik)
#### Post date: [July 29, 2022, 12:48pm UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297/4 "2022-07-29T12:48:08Z")

</div>

Is there now an “official” yolov5 implementation? I guess there was more than one repo claiming to be the next yolov5…

---

<div class="post-metadata">

### Author: ![cansik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cansik/32/8815_2.png) [@cansik](https://discourse.processing.org/u/cansik)
#### Post date: [December 8, 2022, 3:23pm UTC](https://discourse.processing.org/t/yolov5-into-processing-library/37297/5 "2022-12-08T15:23:02Z")

</div>

@Clifford I have implemented the Ultralytics YOLOv5 into the DeepVision library for Processing: [Release Version 0.9.0 · cansik/deep-vision-processing · GitHub](https://github.com/cansik/deep-vision-processing/releases/tag/v0.9.0)

It is currently not released over the contribution manager, but you can download and install it directly from the releases. There is even an [example](https://github.com/cansik/deep-vision-processing/blob/master/examples/YOLOv5/YOLOv5.pde#L19) which shows how to execute YOLOv5. I would recommend to adjust the `setTopK(int k)` variable according to how many objects you have in your pictures (default is `100`). You can read more about this in the [YOLOv5 section](https://github.com/cansik/deep-vision-processing#yolov5).

At the moment implemented are the N, S, M, L and X models (640x640). But it would be simple to add custom models by exporting them to the ONNX format.
