# 垃圾分类 **Repository Path**: tang_zhen_chao/refuse_classification ## Basic Information - **Project Name**: 垃圾分类 - **Description**: 这是一个基于深度学习的垃圾分类小工程,用深度残差网络构建 - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 53 - **Forks**: 6 - **Created**: 2020-05-18 - **Last Updated**: 2024-10-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Garbage classification #### Introduction This is a small project of garbage classification based on deep learning, built with a deep residual network #### Software Architecture 1. Use the deep residual network resnet50 as the cornerstone, add the required layers in the future to adapt to different classification tasks 2. The training of the model requires the generator to write the data set into the memory cyclically, while the image is enhanced to generalize the model 3. Use resnet50 weight file that does not include the network output part for migration learning, only training the layers we added after 5 stages #### Installation tutorial 1. The required third-party libraries are tensorflow1.x, keras, opencv, Pillow, scikit-learn, numpy 2. The installation method is very simple, open the terminal, for example: pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple 3. The data set and weight file are relatively large, so no upload 4. If there is a problem with the environment configuration or if you need data set and model weight files, you can explain your problem in the comment area, and I will help you remotely #### Instructions for use 1. The folder theory records the notes I got in this deep learning, and the information printed with the model training console 2. The initial weight and model definition file resnet50.py needed for transfer learning are placed under model 3. Train and run trainNet.py. At the end of the training, a models folder will be created and the result weight garclass.h5 will be written to this folder 4. The genit.py in the datagen folder is used for image preprocessing and data generator interface 5. Use the trained model for garbage classification and run Demo.py #### Results demo ![输入图片说明](https://images.gitee.com/uploads/images/2020/0518/125308_04d35409_5644878.jpeg "1.jpg") ![输入图片说明](https://images.gitee.com/uploads/images/2020/0518/125318_26b30013_5644878.png "2.png") ![输入图片说明](https://images.gitee.com/uploads/images/2020/0518/125326_9d80c57e_5644878.jpeg "3.jpg")