-
Notifications
You must be signed in to change notification settings - Fork 239
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
Application error while recognizing an image #6
Comments
Does this happen with the app downloaded from the Google Play store as well: https://play.google.com/store/apps/details?id=com.lauszus.facerecognitionapp? |
A version that is in the store is approved, but I downloaded the source and reproduced, this is giving me this error. |
@jheimes-silveira you need to give me some more information, so I can reproduce it. When does this happen? Please try to describe it in more detail, so I can fix it. |
Good morning, I changed a version of eigen, it worked better, which version are you using? |
I have been using Eigen 3.1.0 and 3.3.3. |
Closing this issue due to lack of response. Feel free to reopen if it is still an issue. |
Hi.. Why always the value of mindist is returned as -1 ? |
Code: float minDist = bundle.getFloat(NativeMethods.MeasureDistTask.MIN_DIST_FLOAT);
Log.i(TAG,"min Dist"+ minDist);
try {
if (minDist != -1) {
int minIndex = bundle.getInt(NativeMethods.MeasureDistTask.MIN_DIST_INDEX_INT);
float faceDist = bundle.getFloat(NativeMethods.MeasureDistTask.DIST_FACE_FLOAT);
if (imagesLabels.size() > minIndex) { // Just to be sure
Log.i(TAG, "dist[" + minIndex + "]: " + minDist + ", face dist: " + faceDist + ", label: " + imagesLabels.get(minIndex));
String minDistString = String.format(Locale.US, "%.4f", minDist);
String faceDistString = String.format(Locale.US, "%.4f", faceDist);
if (faceDist < faceThreshold && minDist < distanceThreshold) // 1. Near face space and near a face class
showToast("Face detected: " + imagesLabels.get(minIndex) + ". Distance: " + minDistString, Toast.LENGTH_LONG);
else if (faceDist < faceThreshold) // 2. Near face space but not near a known face class
showToast("Unknown face. Face distance: " + faceDistString + ". Closest Distance: " + minDistString, Toast.LENGTH_LONG);
else if (minDist < distanceThreshold) // 3. Distant from face space and near a face class
showToast("False recognition. Face distance: " + faceDistString + ". Closest Distance: " + minDistString, Toast.LENGTH_LONG);
else // 4. Distant from face space and not near a known face class.
showToast("Image is not a face. Face distance: " + faceDistString + ". Closest Distance: " + minDistString, Toast.LENGTH_LONG);
}
} else {
Log.w(TAG, "Array is null");
if (useEigenfaces || uniqueLabels == null || uniqueLabels.length > 1)
// uniqueLabels.length is null
showToast("Keep training...", Toast.LENGTH_SHORT);
else
showToast("Fisherfaces needs two different faces", Toast.LENGTH_SHORT);
}
} catch (Exception e) {
e.printStackTrace();
e.getMessage();
} Since mindist is always -1 , it always shows array is null |
If it returns -1, then it means that there there were no Eigenvectors:
Is there printed any exceptions here: FaceRecognitionApp/app/src/main/java/com/lauszus/facerecognitionapp/NativeMethods.java Line 129 in 58835ee
or here: FaceRecognitionApp/app/src/main/java/com/lauszus/facerecognitionapp/NativeMethods.java Line 83 in 58835ee
|
When recognizing an image the application is stopped working...
The log that appears to me is:
The text was updated successfully, but these errors were encountered: