streamlit-camera-input-live icon indicating copy to clipboard operation
streamlit-camera-input-live copied to clipboard

How to Prevent Page Refresh and Flickering with camera_input_live() in Streamlit?

Open JSP-GIJON opened this issue 10 months ago • 0 comments

When I used the cv2 library to capture the image from the webcam, I was able to get a real-time display when integrating it into the frontend interface based on Streamlit. However, when I use the frames obtained with camera_input_live(), the entire page refreshes, and the image appears to flicker in the frontend, no longer giving the impression of being continuous. I tried using st.session_state, but that only works for storing variables. For visual elements, it causes issues. Any help or suggestions?

JSP-GIJON avatar Feb 18 '25 13:02 JSP-GIJON