- 1.3 billion metric tons (t): Yearly global food waste due to production losses and consumer waste, according to the Food and Agriculture Organization of the United Nations (FAO)
- 28%: Share of the globe’s agricultural land used to grow food that’s wasted, according to the FAO
- 60 million t: US households’ yearly food waste, according to the US Department of Agriculture.
- 21%: Share of the US’s landfill space taken up by food waste, according to the US Environmental Protection Agency.
- 47 million t: European Union households’ yearly food waste, according to Food Use for Social Innovation by Optimising Waste Prevention Strategies.
- 9.5–12%: Share of household food waste in the EU attributable to expiration date-marking issues, according to consulting firm ICF.
Food freshness has been paid great attention to due to its direct relationship with human health and safety, and approaches for food freshness evaluation have attracted much interest from researchers. We will be developing a direct and real-time food freshness evaluation kit by analyzing gases in a refrigerator (4 °C). The proposed system consists of a gas sampling module and a MOS gas sensor array. The gas sampling module was used to extract gases from the refrigerator and clean the gas path by controlling a pump and a three-way valve. The gas sensor array is composed of three MOS sensors to monitor odor changes in the refrigerator. Meanwhile, a food freshness assessment model was established based on the sensor array results and a comparison with human sensory evaluation results. In order to confirm the effectiveness of the system, we performed experiments on meat, vegetables, and fruits with three freshness levels including fresh, semi-fresh, and spoiled. The accuracy of the system to identify the three freshness levels is 84.8%, 68.0%, and 96.2% respectively.
I'll be using the Nordic Thingy:53 which has numerous in-built sensors (Temperature, Humidity, Pressure, Gas, Inertial measurement unit (IMU), Magnetometer, Low-power accelerometer, Color, and light sensor), and a Gas sensor to detect whether the food is fresh or not and create an alert.
- Connect the development board to your computer
- Use a USB cable to connect the development board to your computer. Then, set the power switch to 'on'.
- Download the latest Edge Impulse firmware: Edge Impulse firmware: nordic-thingy53-full.zip
- Open nRF Connect for Desktop and launch the Programmer app. Move the power switch SW1 to the OFF position. Take off the top cover to access the SW2 button. Press SW2 while switching SW1 to the ON position.
- Update the firmware
We will use edge impulse to build & train the TensorFlow Lite model. We will be collecting the gas sensor data for the following cases
- Ambient environment
- Purchase date (at room temperature 28C)
- Spoiled (at room temperature 28C)
We will be creating an edge impulse project named Thingy 53: Food spoilage prevention. Running the following command will require your edge impulse email & password.
edge-impulse-daemon
We can import this dataset to your Edge Impulse project using the Edge Impulse CLI Uploader. If you haven't done so, follow the Installation Instructions.
We have an 80% & 20% split for training and testing data. Next, we create Impulse and add the processing block with Flattern that Flatten an axis into a single value, useful for slow-moving averages like temperature data, in combination with other blocks. Next, we add a Keras Classification learning block, then click on Save Impulse. Next, we click the Generate features to train the model. After a few minutes, we can see the output in the Feature Explorer.
Now we click the Impulse Design > NN Classifier page and select the neural network architecture. We can see the accuracy and the confusion matrix for the output features.
Live classification & DeploymentWe run the live classification with the existing test samples as shown. Once we load samples for each feature, you can find the detailed results of the live classification.
Click on the model testing -> Classify all. Now the model is tested with all the test data. You can find 99.58% accuracy in the model testing results.
Deploy your impulse by selecting Nordic thingy53 in the Build firmware and clicking on the Build button. Unzip the downloaded zip and move the library bundle to the nrfConnect project source directory.
This project can be implemented to reduce the wastage of water by detecting the running faucet. This might be a simple/tiny project but can make a huge impact in saving water (Indicator 6.4.1 - Change in water use efficiency over time)
Resources:
Comments