zaidalyafeai / ml-projects

Implementation of web friendly ML models using TensorFlow.js. pix2pix, face segmentation, fast style transfer and many more ...
MIT License
648 stars 254 forks source link

Can't reproduce the Quick Draw Example #22

Open maitrungduc1410 opened 4 years ago

maitrungduc1410 commented 4 years ago

Hi Zaid,

Thanks for you great works.

I tried your Quick Draw example in the folder Sketcher (in this repository), it's quite nice, both of your pre-trained models work great.

But after following your Google Colab Sketcher, I did exactly the same you wrote in that colab. But the model produced by the colab has very poor results. See my pictures below

Screenshot 2019-12-06 at 13 07 55 Screenshot 2019-12-06 at 13 08 25

I want to ask you whether the models in your Sketch folder using same model architecture with your Colab, do you use same dataset to feed your model?. Could you explain how can I train you model to get same results as your pre-train models?

Thank you for your time.

zaidalyafeai commented 4 years ago

Hey @maitrungduc1410 , I am using the same model/dataset in colab. You should be able to reproduce the resutlts using that notebook. Make sure that the predictions in the notebook and on the web produce the same output, try a matrix of zeros.

maitrungduc1410 commented 4 years ago

Hi @zaidalyafeai ,

After looking back I see that I made a really silly mistake. The model I trained is fine. But I forgot to change class_name list. That's why when model produce prediction, it maps to wrong class name

Thank you. I'm going to close this issue

maitrungduc1410 commented 4 years ago

Hi @zaidalyafeai,

I re open this issue just because I have one more question related to Quick draw example: The current data set has 100 classes. If I want to increase the number of classes, is there place in the Google Colab Sketch I need to change, or I just need to add more class in mini_classes.txt

Sorry if it's silly question, I'm new in ML.

Thank you

zaidalyafeai commented 4 years ago

@maitrungduc1410 , yes just change that file. However, make sure you don't run out of memory.

maitrungduc1410 commented 4 years ago

@maitrungduc1410 , yes just change that file. However, make sure you don't run out of memory.

In the Google Colab, in the section # Define model I see you add the layer like below:

model.add(layers.Dense(100, activation='softmax')) 

Does the number 100 above represents for the number of classes? So I need to change it also, right?

Thank you

zaidalyafeai commented 4 years ago

@maitrungduc1410 yes you are right.