googlecreativelab / teachablemachine-community

Example code snippets and machine learning code for Teachable Machine
https://g.co/teachablemachine
Apache License 2.0
1.51k stars 678 forks source link

keras model is not correct #75

Open plutorain opened 4 years ago

plutorain commented 4 years ago

When I try to use exported keras model. I can't get correct result from the model. I checked exported tensorflow.js is working well.

Test model Link https://drive.google.com/open?id=1cq7LmzqBMJKMwds2Sujt0BjYc7f9TJ6R

when I try twenty images of class2 but result is wrong(class 1 99%) (plz refere below results) Image files : https://drive.google.com/open?id=1eSijSOoJ5xKgafnEfr3O-lvg3C6o0H_7 image

outrag commented 4 years ago

Have the same issue, the inference result on the web UI is different from the offline result(inference by keras model).

GautamBose commented 4 years ago

Can you try taking a look at this Colab? I have tried to reproduce your issue with the exact Teachable Machine project and the examples you provided in twenty_images.zip, but I was seeing the correct classification output. I also went ahead and tested some Class 1 samples, and the model performed accordingly.

Collab Link

Classification output for the test images provided:

Screen Shot 2020-01-16 at 12 54 16 PM
outrag commented 4 years ago

The result in Colab-page is correct for me, and coded with local-side is correct too, thank you.

plutorain commented 4 years ago

I have tried above colab link.. but I've got same results...

My Colab Link

I am confused if there is a problem with my environment. I uploaded my exported model below Could you check again use below model ??

My Model files

plutorain commented 4 years ago

I found something It has been associated with the computer to create Keras-model Laptop1 can't make proper keras model well from TM site But I don't know actually what make this issue.

Laptop1 : window7/64b/i5-3337U (NG) Laptop2 : window10/64b/i3-8130U (OK)

GautamBose commented 4 years ago

We've had a lot of trouble reproducing this issue, even on windows 7 and windows 10 machines with chrome 79. What browser were you using when training these models?

AhmetEnesYalcinkaya commented 3 years ago

Is there any suggestion ? I have had same problem . What should I do for better result with h5 file ?

jeannafta commented 3 years ago

Hello, I am facing the same issue. Has anyone been able to find a solution?

monniiaa commented 2 years ago

I am also facing the same issues