ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.45k stars 905 forks source link

ImageNet and KNNImageClassifier #98

Closed shiffman closed 6 years ago

shiffman commented 6 years ago

I'm wondering what the best naming is forImageNet and KNNImageClassifier. The following to me is a little confusing:

screen shot 2018-03-12 at 9 14 21 pm screen shot 2018-03-12 at 9 14 24 pm

Is there a naming convention to distinguish between "image labeling" (it's a "cat"!) based on a pre-trained model and "image labeling" based on similarity to new images that you are feeding through the model (it's like that image you just showed me!)?

Would saying "Classifier" for both actually help? The "KNN" being the distinguishing aspect?

let classifier = new ImageClassifier('ModelNet');
let knnClassifier = new KNNImageClassifier('ModelNet');

Much like TransformNet becoming StyleTransfer I think ImageNet doesn't really say much to the end user. ImageNet is the database of images that the model was trained on so it is important, but maybe this could be more clearly stated in the documentation. Also, in theory couldn't we eventually have an ImageClassifier object with a model not trained with the ImageNet database?

cvalenzuela commented 6 years ago

Yes, that's totally true. The ImageNet name was inherited from the imagenet example in deeplearn.js (https://deeplearnjs.org/demos/imagenet/) but I agree that it does not makes much sense to the end user.

I like let classifier = new ml5.ImageClassifier('ModelNet');

shiffman commented 6 years ago

Great! I've added a new "API" label for discussions around function naming, etc.

cvalenzuela commented 6 years ago

Solved by #99

shiffman commented 6 years ago

Woohoo!