There are plenty of use cases like object detection, segmentation, neural style transfer or even some basic image filters, where we require live video feed from webcam to process the image and do further inferences. It will be very interesting and helpful if future releases of streamlit will include this feature.
Sorry @Jose_Antonio_Taquia for not mentioning, but this works locally only in the browser. Streamlit currently doesn’t support webcam in shared app mode.
Thanks very much. It works perfectly with your code.
However, suppose I want to capture a frame by clicking a button in streamlit, how can I do this with your code. I tried a lot but it did not work.
For tasks like object detection, segmentation and neural style transfer etc., a better way is using Tensorflow.js, which only uses client’s CPU or GPU to do the calculation, otherwise, all will be done on the server side, this means you cannot use the app for mass deployement, also this may cause privacy concern.