ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.45k stars 906 forks source link

[style transfer] Style Transfer with Webcam - Video - Not working or very slow #889

Open palmierieugenio opened 6 years ago

palmierieugenio commented 6 years ago

I've tried to use the "Style Transfer with Webcam" demo both online and offline with the source code, but it's not working on my computer. It loads the model, but when I press "start", it just freeze the camera. The online version on Chrome (not on Firefox) worked after waiting a lot, but it was still very laggy. Is it possible to make it faster and make the source code work?

cvalenzuela commented 6 years ago

How many FPS you get largely depends on your computer specifications. What are your specifications?

palmierieugenio commented 6 years ago

Yes, I didn't considered my computer, because it usually works well (I have tried also on my phone and the computer of a friend of mine, with same results: webcam freezed).

I expected it to not be computationally intensive, since it was part of the tutorials.

Here my specifications:


System Information

Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7601) BIOS: Default System BIOS Processor: Intel(R) Xeon(R) CPU X3470 @ 2.93GHz (8 CPUs), ~2.9GHz Memory: 8192MB RAM AMD Radeon HD 5700

PS: I'd like to use ml5 also to make graphics for a musical project, so for me it would be important to be able to make the program run smoothly. Thanks for your work by the way, this project is really cool!

cvalenzuela commented 5 years ago

I'm not able to reproduce the problem. Any updates on your side?

aagarwal1012 commented 5 years ago

@cvalenzuela Is the example is working on your PC?

cvalenzuela commented 5 years ago

yep, it is. Are you having the same issue?

aagarwal1012 commented 5 years ago

@cvalenzuela, yes! Actually I am running a 5 fps 100×100 video on a gaming laptop, then also I am facing the same issue as above.

marksirvine commented 5 years ago

At first I wasn't able to run the code locally, only after I ran a server using cd ml5-examples, python -m SimpleHTTPServer and connected to it via http://localhost:8000/ was I able to get it to run!

Hope this helps.

palmierieugenio commented 5 years ago

I'm not able to reproduce the problem. Any updates on your side?

No, I still have the same problem. I think it's not a problem if it needs some requirements: this functionality has a lot of potential and can be worth buying some hardware, but I think it would be useful to quantify them, having some suggested minimum requirements to make it run and requirements to make it run smoothly.

I think it could be useful also to understand if it's a hardware or software problem, since it seems it could be related to the kind of browser/server.