Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

require model name for ImageClassifier transfer learning #26

Closed
shiffman opened this issue Jun 5, 2018 · 4 comments
Closed

require model name for ImageClassifier transfer learning #26

shiffman opened this issue Jun 5, 2018 · 4 comments

Comments

@shiffman
Copy link
Member

shiffman commented Jun 5, 2018

This is the present code for the transfer learning example:

classifier = new ml5.ImageClassifier(video, modelLoaded);

Since we are planning to eventually have an empty ImageClassifier (see ml5js/ml5-library#121 and ml5js/ml5-library#128) I think we should require that you explicitly reference the pre-trained model. There is no default one. This is also more clear to an end-user as to what is going on.

This might change a bit if we go with the FeatureExtractor idea, but for now the example should probably be:

classifier = new ml5.ImageClassifier('MobileNet', video, modelLoaded);

@cvalenzuela Is this already supported or do we have to add support for the above to the library?

@cvalenzuela
Copy link
Member

Yes, agree! We do need to add support for this. It shouldn't be much work.

Although maybe this is better to make together with the FeatureExtractor class. I started working on a branch for this yesterday. I hope to pick it up this weekend and submit a PR including it.

@shiffman
Copy link
Member Author

shiffman commented Jun 6, 2018

Great. I am starting to wrap my head around the idea of a FeatureExtractor and I think it could work really well. Since transfer learning with an image classification model a la "Teachable Machine" will likely end up one of the most common applications of this, maybe we should still allow it to happen via the ImageClassifier natively. But to do regression or other more custom stuff, the FeatureExtractor would be required?

@cvalenzuela
Copy link
Member

Yep, I think keeping the transfer learning inside ImageClassifier is a good idea.
I will continue to work on creating the feature extractor class then.

cvalenzuela added a commit that referenced this issue Jun 10, 2018
…ods and a clean up of methods.

-  Replace the 'I guess' for 'Mobilenet' following the discussion on #27
-  Adds model requirements for image classification, per #26
-  Fixes Posenet, closes #25
-  Fixes video on load, #16
-  Should fix #18
@cvalenzuela
Copy link
Member

Closed, see ml5js/ml5-library#142

AidanNelson pushed a commit to AidanNelson/ml5-examples that referenced this issue Oct 17, 2018
…ods and a clean up of methods.

-  Replace the 'I guess' for 'Mobilenet' following the discussion on ml5js#27
-  Adds model requirements for image classification, per ml5js#26
-  Fixes Posenet, closes ml5js#25
-  Fixes video on load, ml5js#16
-  Should fix ml5js#18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants