Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ornet.analysis.flow.region_flow: Rebuilding of GMM from serialized params #13

Open
magsol opened this issue Mar 20, 2020 · 0 comments
Open

Comments

@magsol
Copy link
Member

magsol commented Mar 20, 2020

In region_flow, the GMM for each frame of the video is rebuilt from the serialized means and variances (precisions). From what I can surmise, this is done so that predict_proba can be called on each pixel to derive a weighting scheme for the subsequent coloring.

However, the entire GMM fitting process has to play out first. At best, this introduces a lot of overhead; why not either serialize the pixel probabilities when the model is first run alongside the model parameters, or simply evaluate the probability of each pixel under each component (which is what the scikit GMM predict_proba does anyway!), for which you already have fully-specified parameters at the start of the function.

At worst, I fear there could be unobserved consequences--that the gmm.fit function performs some randomized or stochastic steps that can't be reproduced, resulting in a visualization that is entirely dependent on the specific run. The fact that the parameters are initialized is good, and in theory the resulting model training should be entirely deterministic, but without looking at the source there's no way to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant