How to save/load the whole internal states (not the parameters) of the BackgroundSubtractors, OpenCVSharp?

Aramoo

New member
Joined
Nov 8, 2023
Messages
2
Programming Experience
3-5
I have successfully used OpenCVSharp, specifically the BackgroundSubtractorGMG, BackgroundSubtractorKNN, and BackgroundSubtractorMOG2, to perform background subtraction on images. However, when attempting to save the trained model, I have found that I can only save and load the parameters used to configure it!

Do you have any suggestions on how I can save the entire model with its learned state for future use? If there isn’t a direct way to achieve this, is it feasible to make modifications to the library to enable such functionality?
 
You might have to look at the implementation of the class Save() method to see if it can save more internal state.
 
Search GitHub would be my first suggestion. This is what I found:

But it also depends on which OpenCVSharp implemenation you are using. I thought I saw at least 2 other implementations also called OpenCVSharp.
 

Latest posts

Back
Top Bottom