-
Notifications
You must be signed in to change notification settings - Fork 56
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
Multivariate Normal Issue #3
Comments
@jacobgil I can confirm. Here is the main code modification I made before encountering this issue. em = cv2.ml.EM_create()
em.setClustersNumber(N)
em.trainEM(descriptors)
return np.float32(em.getMeans()), np.float32(em.getCovs()), np.float32(em.getWeights())[0] |
What is 'pdf' in line 38 'gaussians[index] = np.array([g_k.pdf(x) for g_k in g])' ????? |
@hugos94 hi sorry to bother you .how you solve the problem numpy.linalg.linalg.LinAlgError: singular matrix |
i have tired to implement this modification but is showing error in |
I am using the latest version of opencv and several functions have been modified. I adapted the code to work with the current version, however, when function
g = [multivariate_normal(mean=means[k], cov=covs[k]) for k in range(0, len(weights)) ]
is applied the following error is returned:numpy.linalg.linalg.LinAlgError: singular matrix
.I know that some function is returning a singular matrix, which makes it impossible to apply the function multivariate_normal.
What should I do? I'm really needing FisherVector applied to the Bag Of Words, and that was the only implementation I found.
Sorry for the bad english and thanks for the help.
The text was updated successfully, but these errors were encountered: