jakaskerl, This is what I thought as well, but then I'm unsure about the correct way to reintegrate the updated background model with a new preview frame. Would this process require an additional script node to merge the updated background model back into the pipeline? To clarify, I've outlined the proposed model structure below, incorporating two new script nodes into the DepthAI pipeline:
Where we see fg_mask
and updated_background_model
, these are one output that scriptnode_out
will split. It will then send the updated_background_model
to scriptnode_in
where this one will combine the new preview frame with it and send it into the model that will split this input.
Is this what you thought as well? Or am I missing something simpler?
Additionally, to address the challenge of a cold start, these models typically initialize with a background-only image and utilize a different learning rate. How can we effectively implement this? My thought is to modify the model to accept a variable learning rate or to enable the DepthAI pipeline to detect whether it has already performed a "hot start." If not, it would repeatedly send the background frame through the model for $n$ iterations, mimicking the hot-start process. Would this approach work, and if so, how can we best implement it?
Looking forward to your insights and suggestions.