# I tried to convert the model of an open source mask recognition project on GitHub into tflite, but the accuracy of the tflite model after the conversion is seriously lost. Where did I do wrong?

**URL:** <https://discuss.ai.google.dev/t/i-tried-to-convert-the-model-of-an-open-source-mask-recognition-project-on-github-into-tflite-but-the-accuracy-of-the-tflite-model-after-the-conversion-is-seriously-lost-where-did-i-do-wrong/31575>\
**Category:** General Discussion\
**Tags:** tflite, help\_request\
**Created:** [December 17, 2021, 9:19am UTC](https://discuss.ai.google.dev/t/i-tried-to-convert-the-model-of-an-open-source-mask-recognition-project-on-github-into-tflite-but-the-accuracy-of-the-tflite-model-after-the-conversion-is-seriously-lost-where-did-i-do-wrong/31575 "2021-12-17T09:19:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jun\_yin](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/jun_yin/32/9610_2.png) [@jun\_yin](https://discuss.ai.google.dev/u/jun_yin)\
**Post date:** [December 17, 2021, 9:19am UTC](https://discuss.ai.google.dev/t/i-tried-to-convert-the-model-of-an-open-source-mask-recognition-project-on-github-into-tflite-but-the-accuracy-of-the-tflite-model-after-the-conversion-is-seriously-lost-where-did-i-do-wrong/31575/1 "2021-12-17T09:19:41Z")

</div>

I am learning tensorflow, and now I am trying to convert the keras model into the tflite model. There is no error in the conversion process, but when I use the tflite model successfully converted, the value provided by it is completely wrong. Whether I wear a mask or not, it may be recognized as not wearing or wearing. This is the code of my identification part, The code of the conversion part and the code of the training part  
file/d/1qPSYkdWqduojMg5NPxTOTdLAzQiZRgEp/view?usp=sharing

---

<div class="post-metadata">

**Author:** ![jun\_yin](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/jun_yin/32/9610_2.png) [@jun\_yin](https://discuss.ai.google.dev/u/jun_yin)\
**Post date:** [December 17, 2021, 9:20am UTC](https://discuss.ai.google.dev/t/i-tried-to-convert-the-model-of-an-open-source-mask-recognition-project-on-github-into-tflite-but-the-accuracy-of-the-tflite-model-after-the-conversion-is-seriously-lost-where-did-i-do-wrong/31575/2 "2021-12-17T09:20:34Z")

</div>

In addition, it seems that I can’t directly publish the links of Google online disk, so I only publish the key parts. I don’t know whether this operation is in line with the rules of tensorflow community
