Having Array Dimension mismatch error

9 views
Skip to first unread message

Mehdi Nejadgholi

unread,
Sep 17, 2016, 2:23:11 AM9/17/16
to bob-devel
Hi

I have just started using facereclib, read some documents and now I am able to use faceverify on ATNT. And I added my custom face dataset using FileList. The problem is I have this error when I want to use pca tool on my dataset.

command
bin/faceverify.py --database test --preprocessing tan-triggs --features linearize --tool pca --sub-directory .

error
pca.py line 93
    self.m_machine(feature, self.m_projected_feature)
RuntimeError: Input and output arrays should have matching number of dimensions, but input array `input' has 2 dimensions while output array `output' has 1 dimensions


First I thought it was because of my RGB image as ATNT is grayscale. I've fixed it and having the same error. Also I tried other tools like lda. All the same.

Any help will be appreciated.
Thanks

Manuel Günther

unread,
Sep 17, 2016, 1:31:43 PM9/17/16
to bob-devel
Dear Mehdi,

this looks very strange. PCA and Linearize should work together without problems.

Anyways, note that the facereclib is outdated and superseded by the bob.bio packages, see http://pythonhosted.org/bob.bio.base/index.html
No worries, they are structurally the same, but exactly these kinds of problems (that feature dimensions do not fit) is tested better in the new version bob.bio.face https://pythonhosted.org/bob.bio.face/index.html

So, could you please switch to the new version and try again? If you obtain an error, could you please send the full error backtrace and the full command line that you were using?

@idiapers: I guess we should make it more clear the the facereclib is deprecated. Maybe, we should delete it from PyPI (at least remove the zip file so that it cannot be downloaded anymore) and have a link on the Pythonhosted webpage (http://pythonhosted.org/facereclib/index.html) that links to bob.bio.base...

Cheers
Manuel

Mehdi Nejadgholi

unread,
Sep 18, 2016, 4:14:16 AM9/18/16
to bob-devel
Hi Manuel,
Thanks for the fast reply.

I've found the problem. My sample pictures were in different sizes. Now it works like a charm. Thanks for introducing Bob.Bio.Face . I will migrate to it soon.

Regards
Mehdi

Tiago Freitas Pereira

unread,
Sep 19, 2016, 6:57:29 AM9/19/16
to bob-...@googlegroups.com
I agree @manuel, we should deprecate facereclib (https://pypi.org/project/facereclib/) and bob.spear (https://pypi.org/project/bob.spear/).
Could we do this in the next release of bob.bio.* ?

--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tiago

Manuel Günther

unread,
Sep 19, 2016, 9:22:15 PM9/19/16
to bob-devel
We can do that right now. In fact, the PyPI frontpage of the facereclib already states that it it outdated, and it links to the bob.bio.base PyPI page: https://pypi.python.org/pypi/facereclib
However, the PythonHosted.org page with the documentation does not reflect that: http://pythonhosted.org/facereclib/index.html

I think, deprecating the facereclib and uploading a new version without code should not have bad consequences. AFAIK, you can still download the package from the PyPI page, but you have to go through the web page (click on older versions) and it is not done automatically using pip.
Reply all
Reply to author
Forward
0 new messages