Closed Prana-S closed 1 year ago
Hello @Prana-S Streamlit integration with MediaPipe has not been tested explicitly. Please allow us sometime to recreate this issue at our end.
@Prana-S Are there any errors on the console?
@ayushgdev Sorry for the late response, yes there are logs:
Hello @Prana-S The logs indicate that the OpenCV is not able to open the webcam. Camera index out of range is a common error which can come due to multiple reasons at the core, but all arise due to webcam being inaccessible by the opencv. Since multiple reasons can be the root cause, multiple things can be tried:
streamlit-webrtc
. Check this QnA. (This looks like the most probable cause) .That seemed to work but now I have a different issue. The video feed isn't showing up, but the camera is turned on. I proved this with the activity light on the camera. Here is a screenshot of what I see after I click the start button. This function works on localhost, just not on Streamlit Cloud.
@Prana-S From what could be inferred from the forums, cv2.VideoCapture would not work with streamlit-cloud. Please check this thread.
This is a streamlit specific issue since the webcam and MediaPipe solution works in the local setup. We would suggest opening a new thread in streamlit community forum.
@ayushgdev It isn't using Opencv as the webcam input. It is using Streamlit web-rtc.
@Prana-S Did you open any issue in the Streamlit community forum? This is a streamlit specific issue MediaPipe solution works in the local setup.
No, but will do. Thanks for the help.
For the past few days, I have been trying to put this demo of Mediapipe on Streamlit Cloud. The demo shows up and works fine on my computer, but when I upload it to Streamlit Cloud I see the text, but the webcam feed isn't there. Here's a photo of what i see: If you have any suggestions or questions please feel free to tell me. Below is my code: