-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Resolve #289 Find similar students #316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #314 I'll add a temporarily requirement that only Students created on the same deviceId will be merged. Until we've tested device synchronization properly.
*/ | ||
public synchronized void findAndMergeSimilarStudents(){ | ||
Log.i(getClass().getName(), "findAndMergeSimilarStudents"); | ||
PreProcessorFactory ppF = new PreProcessorFactory(context); | ||
TensorFlow tensorFlow = getInitializedTensorFlow(); | ||
findSimilarStudentsUsingAvatarImages(ppF, tensorFlow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does an avatar image also include those taken manually in the fall-back registration activity? If so, you currently get a mix between 180px and 224px images. Will this inconsistency in image size/format cause problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because our library uses the default value 224 for resizing the image to 224 x 224 if no sharedPreference with the key "key_faceSize" exists (this key doesn't exist in our app because we don't have the Settings from the library included)
* @param tensorFlow | ||
*/ | ||
private synchronized void findSimilarStudentsUsingAvatarImages(PreProcessorFactory ppF, TensorFlow tensorFlow){ | ||
// Iterate through all Students | ||
List<Student> students = studentDao.loadAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add logging here so that we can see if the method was triggered
Log.i(getClass().getName(), "findSimilarStudentsUsingAvatarImages");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* @param tensorFlow | ||
*/ | ||
private synchronized void findSimilarStudentsUsingMeanFeatureVector(PreProcessorFactory ppF, TensorFlow tensorFlow){ | ||
// Iterate through all StudentImageCollectionEvents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Log.i(getClass().getName(), "findSimilarStudentsUsingMeanFeatureVector");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -365,5 +413,6 @@ public synchronized void findAndMergeSimilarStudents(){ | |||
*/ | |||
private synchronized void mergeSimilarStudents(Student student1, Student student2){ | |||
Log.i(getClass().getName(), "mergeSimilarStudents: student1: " + student1.getUniqueId() + " student2: " + student2.getUniqueId()); | |||
// TODO Implement merging of students (maybe in another class like StudentMergeHelper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be implemented in #314
No description provided.