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 cant save the state (or learned model)
(it’s not a csharp problem)
what is your actual use-case, which would require this ?
it’s meant to be used on continuous video streams to find moving objects (and assumes you have a few hundred frames to spare on startup to ‘train’ it.)
can it be, you’re looking for some more general object segmentation on single images ?
I aim to kick off the inference right from the get-go, skipping the training process every time the system starts. Consequently, I aim to store the most recent model state and start using it promptly upon startup.
As far as I am concerned, there is no direct way to do that. I want to know where can I modify the implementation or, maybe, add a new method for that functionality!