tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.36k stars 1.92k forks source link

Stop Models and clear the video when toggle on and off #3759

Closed Aditya-Ace closed 4 years ago

Aditya-Ace commented 4 years ago

I am on Angular and using models,

Posenet

COCO SSD

BodyPix B&W Pixels

BodyPix RGB Pixels

Face API Image Recognition

Face API Emotion and Age Detection

Hand Tracking

in my project, as you can see in the picture. I load all the models when the page loads in ngAfterViewInit(). I have provided the toggle option and getting true when turned on and false when turned off. My Models work when turning it on, I start the method that does the job but the problem is I have no idea how to toggle them off or turn it off when toggled. I wanna add this functionality to my project, I added a method to just refresh the component to get rid of the problem for now but in the production, I want toggle to work turning on or off. Please help. Thanks in advance. example

toggle

rthadur commented 4 years ago

Hello, this sort of question is better suited for StackOverflow. This issues list is for bugs and feature requests. Thanks and please use the tag 'tensorflow.js' on your StackOverflow question to makes sure it's discoverable.

Aditya-Ace commented 4 years ago

Hello, this sort of question is better suited for StackOverflow. This issues list is for bugs and feature requests. Thanks and please use the tag 'tensorflow.js' on your StackOverflow question to makes sure it's discoverable.

https://stackoverflow.com/q/63345529/12459278

Please help me there