Fruit recognition
We trained a Convolution Neural Networks (CNNs) to recognize the photo. Instead of training a new model, we use existing trained CNNs to extract features and finetune the model with Kaggle’s fruit360 Dataset.
Our model architecture consist of MobileNet and 2 fully connected layers. Given a image of size (128, 128), we feed the image into trained MobileNetV2[ref]’s convolution layers, and perform 2D global Average pooling. The first dense layer consists of 512 ReLU units, and the second consists of 80 units(which indicate 80 classes) with softmax activation function. The model has 2.6 million parameters, including 340 thousands trainable parameters in the Dense layers. |
Alert
We use a table to store the average date that the fruits are about to expire. And every time we add a fruit to database, we will store the current time, and look up the table to calculate the expected expire date of that fruit.
Expire date = Current time + Table[fruit] where expire date is the estimated expire date, current time is the current timestamp, and table is the table store the estimate expire time of a fruit. |
Recommendation
We do recommendation based on the fruit that the uses have taken. We store the weight of the fruit when the user put a fruit on weight scale. We also record the time that users eat the fruit if they decrease the amount of fruit on Android application. Then we calculate all of vitamin that users have taken based on the historical data. We calculate vitamin A, B1, B2, B6 and C. We store the estimate vitamin each fruit contains per gram, and using the following equation to calculate the total of every kind of vitamin.
Android Application
To help user keep track of their fruits and nutrition conveniently, we implement an android application for user to interact with our refrigerator system. The application is implemented in Android Studio and tested on real Samsung S9 plus.
The application provide signup and login page. By providing machine code on the Raspberry Pi, user can link their Raspberry Pi to their account during registration. The recommendation page allows user to choose whatever past days to see their nutrition intake and recommended fruits.
The application provide signup and login page. By providing machine code on the Raspberry Pi, user can link their Raspberry Pi to their account during registration. The recommendation page allows user to choose whatever past days to see their nutrition intake and recommended fruits.