I am using a YOLOv8 model trained on custom dataset with a size of 22 MB to detect objects and draw bounding boxes on an offline video and I am using streamlit as the UI to display the video. However, when processing the video frame by frame on my local machine (localhost), each frame takes a significant amount of time to process, causing a slowdown in the overall performance. I am seeking solutions to optimize and speed up the processing time for each frame.
And since i have not deployed it and am running locally, will using st.cache on model still be useful to speed up process ?