# P5 library - YOLO / Web works well, but does not work in p5

**URL:** <https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790>\
**Category:** Libraries\
**Created:** [May 10, 2022, 1:14am UTC](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790 "2022-05-10T01:14:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [May 10, 2022, 1:14am UTC](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790/1 "2022-05-10T01:14:52Z")

</div>

[p5 library - YOLO / Web works well, but does not work in p5.]

hello.

1. Source code running on the web  
[https://editor.p5js.org/ml5/sketches/ObjectDetector\_YOLO\_single\_image](https://editor.p5js.org/ml5/sketches/ObjectDetector_YOLO_single_image)

It works fine.

1. If you copy the WEB source code as it is and run it with ‘Processing-P5’,  
Does not.  
(An error appears as shown in the figure.)  
What’s the reason?  
 ![figs_220510](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/2/1291a4a49f399ffe261c730d40838c15b7d62843.jpeg)

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 10, 2022, 1:24am UTC](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790/2 "2022-05-10T01:24:57Z")

</div>

> [@GWAK](#):
>
> What’s the reason?

> [@Embedding .pde to html does not work/ .pde to p5.js](https://discourse.processing.org/t/embedding-pde-to-html-does-not-work-pde-to-p5-js/16181/6):
>
> The problem is that browsers block loadings from “file://” scheme. You’re gonna need some local server in order to run “.js” scripts as “http://” scheme instead. Alternatively, you can install Firefox: Once installed, go to its about:config page. Then at the search box there, type in privacy.file\_unique\_origin, and toggle it to false. Now you can run most sketches from there via the “file://” scheme.

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [May 10, 2022, 6:35am UTC](https://discourse.processing.org/t/p5-library-yolo-web-works-well-but-does-not-work-in-p5/36790/3 "2022-05-10T06:35:39Z")

</div>

@GoToLoop

Thank you for answer.
