• u9_209351
  • 66.9MB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-05-10 01:27
欢迎来到我的Apple图片分类项目 在这个项目中,我探索了如何使用CNN和转移学习来建立图像分类器。 数据集包含从Google Image的“ iPhone”,“ iPad”和“ Macbook”的最高搜索结果中抓取的1500张图像。 完整的数据集可以在这里下载: : 。 目的是尝试创建图像分类器,以区分3种最主流的Apple产品-iPhone,iPad和Macbook。 从表面上看,它们可能会彼此混淆(没有缺口的旧版iPhone设计可能会误认为iPad,而带有键盘的新版iPad可能会误认为Macbook)。 虽然我们可以轻松区分它们,但我们可以教一个深度学习模型来做到这一点吗? 哪种方法可以使我们获得最高的准确性? 这些是将在本项目中回答的问题。 档案说明 该存储库中只有4个文件(自述文件和需求文件除外)。 该笔记本是一款Jupyter笔记本,可以在Google Colab(带有
  • apple-img-main
  • apple.jpg
  • model_inception_weights.h5
  • requirements.txt
  • Apple_Products_Image_Classification.ipynb
# Welcome to my Apple Image Classification Project In this project, I explore how we can use CNN and transfer learning to build an image classifier. The dataset consists of 1500 images scraped from Google Image's top results for 'iPhone', 'iPad', and 'Macbook'. The full dataset can be downloaded here: The aim is try to create an image classifier that can differentiate 3 of the most mainstream Apple products - the iPhone, iPad, and Macbook. On the surface, they might be mistaken for each other (older iPhone design without notches can be mistaken for iPad, while newer iPad with keyboards can be mistaken for Macbook). While we can easily differentiate them, can we teach a deep learning model to do the same? And what method gives us the best accuracy? Those are the questions that will be answered in this project. ## File Descriptions There are only 4 files in this repository (except the README and requirements file). - The notebook is a jupyter notebook which can be run on Google Colab (with GPU for faster training). It contains step-by-step on how to create the image classifier. - The apple.jpg is just an image for our home page - 'model_inception_weights.h5' is the trained weights of our deep learning model's layers. This is used to load the model in our web app. - '' is the python file to deploy our web app in Streamlit. To run the project locally, you can download this repo and type ```streamlit run``` inside this folder's directory. To view the project as a deployed online web app hosted by Streamlit, we can check out this link: ## Model Description The foundational model that we use is Inception-V3 from Keras' pretrained models. However, we cut it off until 'mixed7' layer, and then add our own layers. The upper layers are used to process the image files through multiple convolutions by using pretrained weights of the model. Here are the links to learn more about the pretrained model: - - We achieved 88% accuracy on validation set, and 92% accuracy on training set.