ml5js / ml5-library

Friendly machine learning for the web! πŸ€–
https://ml5js.org
Other
6.48k stars 902 forks source link

Adding Dog dataset upto 15830 images Knn Classifier Feature Extractor #356

Closed VitalJeevanjot closed 5 years ago

VitalJeevanjot commented 5 years ago

β†’ Description πŸ“

index.html Hi, I am trying to add Examples of all dogs with labels (above index.html) from Stanford dataset 120 breeds of dogs with up to 20000 images Adding examples stuck at 15830 and give these errors while I save 150 MB of dataset created up to that but the images of some of the errors I get while adding images or start predicting them from loading my 15830 images of dataset (I didn't try adding more images after loading 150 MB of dataset (JSON file) but I get errors whenever I try with all 20000 images).

β†’ Screenshots πŸ–Ό

Or link :- https://imgur.com/a/J9rooYH ## β†’ Helpful Information πŸ¦„ I used p5 canvas and loadImage() or get images from files and used .canvas function to load images i think it may work, You can see that in index.html file attached above. - **Web browser and version** Chrome Version 73.0.3683.103 - **Operating System** Windows 10 - ### Steps to reproduce the issue Use my index.html -> Then download this [dataset](https://www.kaggle.com/jessicali9530/stanford-dogs-dataset) -> Then extract it and add **images** folder that will point to all folders of dogs images and it automatically start adding example and then save the model and you may get error thier and all that I explained above like predicting etc. - ### ml5 version you're using Latest from github
joeyklee commented 5 years ago

Hi @genievot - I wonder if in this instance transfer learning with Feature Extractor and KNN Classifier may not be the right methods for your use case. It sounds like if you have this massive dataset, you'll be wanting to train your own image classifier and generate a model from there (e.g. in tensorflow or python) then uploading your trained model to ml5?

As an aside: we are working on a generic neural network class that will allow you to do training in the browser, but I'd imagine that 20,000 images in the browser will cause the browser to crash. Usually when we're using the FeatureExtractor or KNN classifier, we're not loading in nearly that much data I think.

Unless @yining1023 has any other tips, I will close this issue since I this seems to be more of an issue of data size and your project specific requirements rather than an issue of the library itself.

Note to self: make clear recommendations about training image number, image size, image resolution, and limits of in browser transfer learning in documentation

VitalJeevanjot commented 5 years ago

Awesome, Thanks for replying with such explanation. Thanks for closing.