Smart Technology for “Clean Your Plate” Campaign against Wasting Food in University Canteens


Food security is becoming increasingly prominent due to the impact of the COVID-19 and extreme weathers. The Smart Project for “Clean Your Plate” Campaign has been designed and implemented to address food waste on campus. The project takes advantage of technologies such as IoT, dynamic QR code, and visual recognition. Smart devices for clear plate recognition can be installed in multiple locations in campus cafeterias and canteens. Users can login onto a public account and a Mini Program for points reward, exchange and sale. Combining offline clear plate recognition and online points exchange, the project encourages food saving and reduces human cost for university canteens.

Share and Cite:

Wei, L. (2022) Smart Technology for “Clean Your Plate” Campaign against Wasting Food in University Canteens. Journal of Computer and Communications, 10, 165-176. doi: 10.4236/jcc.2022.106013.

1. Introduction

The UN Food and Agriculture Organization, the World Food Program, and the European Union jointly published the Global Food Crisis Report 2021. According to this report, at least 155 million people in 55 countries and regions have been at severe risk for lack of food due to conflicts, COVID-19 and extreme weathers. This has been an increase of about 20 million people over the previous year and the highest level in the past five years [1].

Since 2010, China’s per capita grain holdings have continued to be above the world average, exceeding 470 kg in 2019, well above the standard line of 400 kg per capita for international food security. The domestic self-sufficiency rate of staple grains such as rice, wheat, and corn is above 97% on average, but the supply of soybeans and meat, eggs, and milk will be seriously affected by global food security. China is the world’s largest soybean consumer, with soybean consumption set to reach 104 million tonnes in 2020, accounting for 30% of global consumer demand. In 2019, China’s imported soybeans accounted for about 84.86% of total domestic consumption. Soybeans, in addition to oil extraction, are a by-product of the feed industry, the main raw material for the production of livestock feed, such as pig farming, and aquaculture. Therefore if the food security crisis hits, then it will affect the supply of China’s oil consumption as well as meat, eggs, and milk.

The project comes up with specific measures for clear plate supervision and saving behavior stimulus through creative combination of devices and online operation.

2. Project Structure

First, clear plate recognition terminals are set up in university canteens (or later in government and enterprise canteens). Users can upload a photo of their plates to the server or the photo of the plate can be automatically captured at recognition table. Once the plates are recognized as clear, users will receive reward points that can swap for or purchase products. The project structure is shown in Figure 1.

The project has a new model that combines online and offline operation. Users can purchase or swap for products at the credit mall in the online WeChat Mini Program or at offline stores.

The project has a comprehensive points system. The points can be exchanged for special goods for public welfare and environmental protection in the online credit mall. 1% of the profit from each order of goods purchased with points is used to set up a “Clean Your Plate” Campaign fund, which can be used to provide book donations for rural primary schools and other public welfare projects. Other products are also available that can be traced in origins to guarantee safety and quality.

Figure 1. Project composition structure diagram.

The project proposes a clear plate recognition algorithm based on the ResNet101 neural network model. An image acquisition system was first designed using the Jetson nano AI development board and deployed above the residue collection table for real and effective image acquisition of dinner plates, which was used as the experimental data set. To improve the recognition rate and enhance the robustness of the algorithm model, two types of four neural networks with different depths and widths, ResNet50, ResNet101, ResNeXt50_32x4d, and ResNeXt101_32x8d, were trained experimental results show that the disc recognition algorithm based on the ResNet101 neural network model has higher accuracy and moderate depth and width, and the recognition rate is higher. The results show that the disc recognition algorithm based on the ResNet101 neural network model has high accuracy and moderate depth width, and the recognition accuracy reaches 95.312%.

The “‘Clean Your Plate’ Campaign-Save” project (hereinafter referred to as “Clean Plate Campaign”) is a comprehensive use of IoT, intelligent AI recognition, and dynamic QR code technology. It is an initiative to reduce food waste and promote a culture of saving. The research includes a check-in credit, a credit mall, a Wechat Mini Program, and a “Clean Plate” public account. Users can use their credits for products or coupons in the credit mall. The “Clean Plate” Campaign public account serves as a promotion platform for campus stores.

Clear plate recognition and check-in credits are realized on the Wechat Mini Program or at the recognition table. Users upload a photo of the plate after the meal or just place the plate at the recognition table for automatic recognition. If the recognition table detects the result as a clear plate, the system will prompt the user to present the Clear Plate QR code or scan the face for check-in as shown in Figure 2. Credits will be given upon successful check-in. Retest or

Figure 2. Clear plate QR code interface.

appeal is available for failure for recognition. Users can check in only three times per day and can only do so within the dining period in the canteen area. A successful check-in will earn two credits. Administrators can set the time limit for check-in.

The credit mall is set as the Wechat Mini Program, which is shown in Figure 3. The credit mall sells products from partner stores. For example, users can use credits to swap for products or coupons. The swapped products have a QR code that can trace the details of the products.

The “Clean Plate” public account releases posts about clear plate campaign, local catering culture, and campus news. In addition, users can make appeals by uploading photos of the plates that do not pass the identification test, and the administrator will return the credits to the users after reviewing. Users can also make suggestions in the account. The public account is designed to be shown as in Figure 4.

3. Project Design

Users enter the “Clean Plate” Campaign WeChat Mini Program and click on “Clean Plate” QR Code on the home page for check-in and credits. On the home page, users can click on “My Credits” to browse recent promotions and product details in the Credit Mall. Previous orders can be checked on the order interface, including price, completion time, order number as well as other information.

Figure 3. Credit mall interface.

Figure 4. “Clean Plate” campaign public account.

Users click on “Go Shopping” and click on “Add to Cart” on the product details page and then go to the “Order” page to confirm and submit the order as shown in Figure 5.

Users can view details of “My Orders”, “Credits”, “Delivery Address”, “Coupon Centre” and “My Coupons” respectively by entering the “My” interface as shown in Figure 6.

A MySQL database with all the user information has been designed for the “Clean Plate” Campaign Mini Program. The student information in the database is bound to the school’s student administration system so that users have independent accounts to avoid credit accumulation failure. The design is shown in Table 1.

The product information table for the Credit Mall is shown in Table 2. The table is designed with primary and foreign key identification information for each product, thus making each product independent and eliminating repeated information and misleading prices. In this way, administrators will have efficient access due to reduced data redundancy and sufficient data storage.

For user orders, a database is created for each order so that both the user and the administrator can view the details of each order, improving the after-sales service and preservation of transaction information, as shown in Figure 7 and Table 3.

Figure 5. “Order” page.

Figure 6. “My” interface.

Figure 7. System E-R diagram (see the two-dimensional table that follows for entity attributes).

Table 1. Customers information table.

Table 2. Goods information table.

Table 3. Order information table.

3.1. Clear Plate Recognition

Users can click the “Check in” button on the home page of the WeChat Mini Program to upload the photo of their plates for recognition, or place the plates on the “CLEAR PLATE” recognition table for automatic check-in.

In the algorithm of plate recognition, an artificial intelligence algorithm based on deep learning is designed to capture image features by constructing a 101-layer residual network model, and 3 fully connected layers are used to classify and produce results. The algorithm model is obtained by collecting a large amount of meal tray information, making a dataset, writing a deep learning network model for training, and selecting the most suitable neural network model through experimental comparison. The final model size is 170.45 MB, and the recognition accuracy rate can reach 95.312%; using the Jetson nano Ai [2] [3] development board to design an image acquisition system that is attached to the recognition table. The algorithm model was also packaged into an executable program and deployed to the server for the Mini Program calls. The algorithm training flowchart is shown in Figure 8.

To improve the recognition rate and enhance the robustness of the algorithm model, we trained two types of four neural networks with different depths and widths, ResNet50, ResNet101, ResNeXt50_32x4d, and ResNeXt101_32x8d, respectively, and the experimental results are shown in Table 4. Their accuracy rates were 79.688%, 95.312%, 75.000% and 98.438% respectively. The model sizes were 97.75 MB, 170.45 MB, 95.79 MB, and 339.56 MB, respectively.

The reason for the low accuracy of ResNet50 and ResNeXt50_32x4d is that the number of layers in the network is small, which leads to the low accuracy of the network due to the small number of features extracted and the small perceptual field of the network. To address this problem, we have considered the nature of residual networks and deepened the number of layers of the network and used ResNet101 and ResNeXt101_32x8d networks with deeper layers as feature extraction networks. Finally we selected the ResNet101 model with high accuracy and moderate depth width as the core algorithm. Figure 9 shows the result of the deployment of this model.

Figure 8. Neural network training flow chart.

Figure 9. Effect drawing of model recognition.

Table 4. Comparison of disc recognition accuracy and model size of various models.

3.2. Face Recognition

This project uses the multi-task convolutional neural network MTCNN [4] (multi-task convolutional neural network) to implement the face recognition algorithm, adding the function of recognizing faces wearing masks t. The MTCNN network model consists of three networks, Pnet, Rent, and Onet, as shown in Figures 10-12. The Pnet, Rent, and Onet thresholds of the MTCNN network were first adjusted and the facenet was retrained using the Casia-FaceV5 [5] dataset with masks, of which 95% was used as the training set and the remaining 5% was used for the test set, with a final accuracy of 92%. Combined with a Raspberry Pi development board it was designed as a face recognition door lock and also packaged as an executable to be deployed to the server for Mini Program calls.

Figure 10. P-Net network architecture.

Figure 11. R-Net network architecture diagram.

Figure 12. O-Net network architecture diagram.

There are generally two options for mask-wearing detection. The first is to use one-stage target detection algorithms such as SSD and Yolo directly to determine whether a mask is worn while a face is detected; the second is to use more mature face detection techniques such as MTCNN to first detect the position of a face, then intercept the face and pass it into a new neural network to determine whether the face is wearing a mask correctly. MTCNN first extracts a course image and then fine information through three sub-networks and is therefore robust to detect faces wearing masks. The face recognition algorithm in this project is the Mtcnn + Mobilent face recognition algorithm, the flowchart of which is shown in Figure 13.

The Casia-FaceV5 dataset with masks was chosen as the training data because it is an Asian face dataset and the number of samples in the dataset is relatively small including 500 people, 5 images per person, 2500 images in total. The image size is 640 × 480.

68 key points are used for recognition of faces wearing masks. The process for adding a mask to a face is as follows.

1) Detecting 68 key points on faces.

2) Identifying the human nose (the point labeled 29 in the figure above was used in this study) and the face profile.

3) Identifying of the left point of the face (the point labeled 2 in the above figure is used in this study), the bottom point of the face (the point labeled 8 in the above figure is used in this study), and the right point of the face (the point labeled 14 in the above figure is used in this study) by the face contour.

4) Deter ng the height, and centerline of the mask size from the nose and bottom point of the face.

5) Dividing the left and right sides of the mask evenly into two parts; adjusting the size of the left mask so that the width is the distance from the left point of the face to the centerline; adjusting the size of the right mask so that the width is the distance from the right point of the face to the centerline; and combining the left and right masks to form a new mask.

Figure 13. Flowchart of face recognition based on MTCNN network model for mask-wearing.

6) Rotating the new mask by the angle of rotation of the centerline relative to the y-axis and finally placing the mask in the appropriate position in the original picture.

4. Conclusion

The “Clean Plate” Campaign used to be scattered activities led by government policies and the results are not obvious. This project creates a new operation model that integrates government, industry and education institutions to encourage initiative on all parties. In addition, the public account and reward credit system reach out to the public as promotion and incentives for a saving culture in society in the long run. I would like to thank my instructor, Feng Yi Zhao, for her guidance and suggestion on the project, and my team members, Zi Yang Zhuo, Yue Zhang, Zheng Hao Zhou, Lina Zhang, and Run Tian Wang, for their help.


Supported by the innovation and entrepreneurship training program for college students of Nankai University Binhai College Project No: 202113663054.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.


[1] Wang, X.M., He, W., Lin, Q., Yang, X.W. and Jiang, W.W. (2022) The Current Situation, Problems, and Countermeasures of Food Security in the Post-Epidemic Era. Journal of China Agricultural University, 27, 257-266.
[2] Thair, A.S. and Basman, Gh.M. (2020) A Novel Face Recognition System Based on Jetson Nano Developer Kit. IOP Conference Series: Materials Science and Engineering, 928.
[3] Stephen, C. (2020) Nvidia Makes It Easy to Embed AI: The Jetson Nano Packs a Lot of Machine-Learning Power into DIY Projects-[Hands on]. IEEE Spectrum, 57.
[4] Florian, S., Dmitry, K. and James, P. (2015) Facenet: A Unified Embedding for Face Recognition and Clustering. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Boston, 2015, 815-823.
[5] Lu, L. (2019) Research on Face Recognition Method Based on the Convolutional Neural Network. Xi’an University of Science and Technology.

Copyright © 2023 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.