menpo / lsfm

Large Scale Facial Model (LSFM) - an automatic pipeline for constructing 3D Morphable Models from large collections of facial meshes
http://ibug.doc.ic.ac.uk/resources/lsfm/
BSD 3-Clause "New" or "Revised" License
503 stars 117 forks source link

e_values and e_vectors is [] #16

Open tsvetiko opened 7 years ago

tsvetiko commented 7 years ago

When I run lsfm -i ./input_dir -o ./output_dir I get the following error:

...
RuntimeWarning: invalid value encountered in true_divide
  C = np.dot(X, X.conj().T) / (n - 1)
...
RuntimeWarning: invalid value encountered in double_scalars
  return self._total_variance() / self.original_variance()
...File "/home/miniconda3/envs/lsfm/lib/python3.5/site-packages/menpo/model/pca.py", line 214, in n_active_components
    raise ValueError(err_str)
ValueError: Tried setting n_active_components to 0.985 - value needs to be a float 0.0 < n_components < self._total_kept_variance_ratio (nan) or an integer 1 < n_components < self.n_components (0)

When I tried to debug I found out that the eigenvalues and eigenvectors are empty.

Do you have an idea how to fix this?

patricksnape commented 7 years ago

Somehow your data matrix is badly formed? The warning is telling you that X contains either all zeros or a nan.

LeeTaiTai commented 5 years ago

i solve this error. first you must update ,menpo=0.8 menpo3d=0.6, menpofit=0.5,menpodetect=0.5,and put two or more meshes to train,if you put one mesh,then the (n-1)==0,so ,you get a NAN value.