Failed Predictions with Math CNN Model #10
Madacool01
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After the successful training of a Math Symbol detector CNN, I have downloaded the mappings & weights, and now am integrating it into my webcam interface. However, I faced a major bug in my integration. Here's what happened:
The Domain Gap: When I fed the model my symbols, it always either predicted 'z', 'A', or '6'. After lots of experimentation, I could not figure out the problem, and therefore asked my dear friend Gemini for help, and it helped me identify the problem. When a model gets 98.5% accuracy in training but spits out nonsense in the real world, it means the data we are feeding it from the webcam does not physically look like the data it was trained on. The specific bug here was a Color Inversion Problem. The Kaggle dataset consisted of math symbols in black ink written on white paper. My webcam is drawing white ink on black paper. Giving this to the model breaks all the math (The AI thinks the massive background is giant blob of ink).$\rightarrow$ Invert the colors of our sliced image (so it looks like black on white paper)
The solution is relatively simple
All reactions