Skip to content
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

Merged
merged 2 commits into from
Dec 31, 2016
Merged

Conversation

sladomic
Copy link
Contributor

No description provided.

@sladomic sladomic requested a review from jo-elimu December 31, 2016 15:05
Copy link
Member

@jo-elimu jo-elimu left a 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);
Copy link
Member

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?

Copy link
Contributor Author

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();
Copy link
Member

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");

Copy link
Contributor Author

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
Copy link
Member

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");

Copy link
Contributor Author

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)
Copy link
Member

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

@jo-elimu jo-elimu merged commit 2a78d54 into elimu-ai:master Dec 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants