Technologies:
Tolerim
24 days ago
After loading several video files on my MediaPipe Pose Detection Webserver, the framerate drops.
I am currently working on a solution with MediaPipe that enables users to select a video on my web server, and then view the video with pose detection landmarks superimposed upon it. Although the following solution works reasonably well, the framerate drops significantly after selecting more than three videos. I am left to wonder if there is too much data loaded in the browser, and whether I should clear MediaPipe Pose when selecting a new video. Additionally, I am contemplating whether it is better performance-wise to upload the video on a server, rather than selecting a local file. To further clarify, the code provided below contains HTML and JavaScript code that can be enclosed within tags while producing the output, to create an HTML file suitable for front-end purposes.
Answers(2)
Vogi
22 days ago
Verified Answer
It seems like you are working on a solution with MediaPipe that enables users to select a video on your web server and view the video with pose detection landmarks superimposed upon it. You mentioned that the framerate drops significantly after selecting more than three videos and you are left to wonder if there is too much data loaded in the browser. You also mentioned that you are contemplating whether it is better performance-wise to upload the video on a server rather than selecting a local file.
Regarding your first question, it is possible that there is too much data loaded in the browser. One way to address this issue is to clear MediaPipe Pose when selecting a new video. This will help reduce the amount of data loaded in the browser and improve performance.
Regarding your second question, uploading the video on a server can be better performance-wise than selecting a local file. This is because uploading the video on a server can help reduce the amount of data loaded in the browser and improve performance. However, this depends on various factors such as the size of the video, internet speed, server capacity, etc.
I hope this helps! Let me know if you have any other questions.
Tolerim
24 days ago
Yes, it's possible that there is too much data loaded in the browser, which can affect the performance and decrease the frame rate. You might consider clearing the previous MediaPipe pose when selecting a new video to ensure that the browser is not overloaded with unnecessary data.
Uploading the video to a server might be a better solution performance-wise, as it can reduce the amount of data the browser needs to handle and can also reduce the load on the client-side video player. Another solution could be to use a video streaming service like Wowza or Amazon CloudFront to stream the videos to the client-side video player, which would also help improve performance.
Regarding the code snippet provided, it seems that the script is using MediaPipe for pose detection. The script imports the necessary modules, creates a pose object, and sets the options for the pose object. It also defines the startEstimation function which sets the canvas size, starts the video playback, and initiates the pose detection. The onResults function is then called when the results are available, and it draws the pose landmarks on the canvas. The video_upload input is used to allow the user to select a video to be played, and the videoElement and canvasElement are used to create the video player and the canvas element for rendering the pose landmarks on top of the video.