biometrics / openbr

Open Source Biometrics, Face Recognition
www.openbiometrics.org
Other
2.85k stars 772 forks source link

makeMask bug #419

Open d4nst opened 9 years ago

d4nst commented 9 years ago

Whenever a mask is created using the makeMask method, the label of the first biometric-signature node in the sigset is not correctly extracted, it always return an empty string.

An example, to make it more clear. Consider we have the following at the beginning of a sigset:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<biometric-signature-set>
  <biometric-signature name="Person_1">
    <presentation file-name="Face_1_1.jpg" />
    <presentation file-name="Face_1_2.jpg" />
    <presentation file-name="Face_1_3.jpg" />
  </biometric-signature>
  <biometric-signature name="Person_2">
    <presentation file-name="Face_2_1.jpg" />
    <presentation file-name="Face_2_2.jpg" />
  </biometric-signature>
  ...

Then, when the labels are extracted here, the first three labels in targetLabels are empty strings and the forth and fifth labels are Person_2 (the same happens with the labels in the query sigset) .

jklontz commented 9 years ago

Just so I understand correctly, in the above example (considering only Person_1 and Person_2), do you expect the mask matrix to be 2x2 or 5x5?

d4nst commented 9 years ago

It should be a 5x5 matrix.

jklontz commented 9 years ago

In that case you want:

<biometric-signature name="Person_1">
    <presentation file-name="Face_1_1.jpg" />
</biometric-signature>
<biometric-signature name="Person_1">
    <presentation file-name="Face_1_2.jpg" />
</biometric-signature>
...

My interpretation of the above is that you want to construct a single template for each person from multiple images.

d4nst commented 9 years ago

I thought it was the same writing it my way or your way... what is the difference? I think in both cases the same mask matrix is generated. And. in any case, for evaluation it shouldn't make any difference, should it?

And back to the issue, even if you write it like that, the first node is still not taken into account properly because, as I said, the method that retrieves the labels in the makeMask method returns an empty string for all the images (in your example only one image) in the first node of the xml.

jklontz commented 9 years ago

Can't reproduce this one. If I qDebug() << targetLabels; I get ("Person_1", "Person_1", "Person_1", "Person_2", "Person_2") as expected...

d4nst commented 9 years ago

@jklontz I just made a clean installation using the master branch. I have tried qDebug() << targetLabels; using the provided MEDS_frontal_target.xml and MEDS_frontal_query.xml as input of the makeMask function and I get ("", "S0002", "S0003", "S0004", ...). Have you tried this on windows? it might be some platform specific issue...

jklontz commented 9 years ago

Yeah that does sound like a platform specific issue. Will take a look the next time I'm working on Windows.