← Latest papers
💻 computer science

Transformer based Multi-task Fusion Network for Food SpoilageDetection and Shelf life Forecasting

This paper proposes a Transformer-based multi-task fusion network that integrates CNN, LSTM, and DeiT architectures to simultaneously perform vegetable classification, food spoilage detection, and shelf-life forecasting, demonstrating superior performance and reliability over existing deep learning models on a newly captured vegetable spoilage dataset.

Original authors: Mounika Kanulla, Rajasree Dadigi, Sailaja Thota, Vivek Yelleti

Published 2026-11-24
📖 5 min read🧠 Deep dive

Original authors: Mounika Kanulla, Rajasree Dadigi, Sailaja Thota, Vivek Yelleti

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Every year, a staggering amount of the food we grow never reaches a table. It rots in fields, warehouses, or on supermarket shelves, a loss driven by the simple, relentless fact that fruits and vegetables are living things that eventually decay. For centuries, the only way to judge if produce is still good to eat has been the human eye and hand, a slow and often unreliable process prone to error. In recent years, computers have begun to learn how to see these changes, using cameras and software to spot the first signs of spoilage. However, most of these digital systems are limited; they can tell you if a tomato is fresh or rotten, but they cannot tell you how many days are left before it turns, nor can they easily handle the messy, imperfect conditions of the real world, such as dim lighting or grainy camera images.

Researchers at SRM University in Andhra Pradesh, India, set out to build a system that does more than just classify food. They wanted a single digital brain that could identify the type of vegetable, determine its current state of freshness, and predict exactly how many days remain before it spoils. To do this, they created a new kind of artificial intelligence architecture that combines different types of learning models. Instead of relying on one method, they fused two distinct approaches: one that excels at spotting local details like color spots and texture changes, and another that looks at the entire image to understand global patterns and structural decay. They tested these systems not just on perfect, clear photos, but also on images deliberately corrupted with noise to simulate poor lighting and low-quality sensors, ensuring the technology would work in a real grocery store or farm, not just in a controlled lab.

The team began by building a unique dataset, capturing images of eight different types of vegetables, including tomatoes, bitter gourds, and lady's fingers, every single day from the moment they were harvested until they were completely spoiled. They took six photos of each vegetable daily, from morning to evening, to track the slow, steady progression of decay. This allowed them to label every image with three specific pieces of information: the vegetable's identity, its spoilage stage (fresh, slightly spoiled, or completely spoiled), and the exact number of days it had been in storage. With this rich data in hand, they trained several different artificial intelligence models to see which could best handle the three tasks simultaneously. They compared standard, single-model systems against their new "fusion" models, which merge the strengths of different algorithms into one.

The results showed that combining different models was far superior to using just one. The most successful system was a fusion of a lightweight image analyzer and a sophisticated transformer model, a type of architecture known for understanding relationships across an entire image. This combined system achieved a remarkable level of accuracy in identifying the vegetable type, correctly classifying it nearly every time. More importantly, it excelled at predicting the remaining shelf life. While other models struggled to guess the days left before spoilage, often making large errors, this fusion model predicted the timeline with a high degree of precision, keeping its errors to a very small margin. It also proved to be incredibly resilient; when the researchers tested it on images filled with visual noise, simulating the imperfect conditions of a real-world environment, the system's performance barely dipped. It maintained its ability to spot spoilage and count down the days, whereas many other models faltered significantly when the image quality dropped.

To ensure that this system was not just a "black box" making guesses, the researchers added a tool that highlights exactly which parts of the image the computer was looking at to make its decision. When they visualized these decisions, the system pointed to the correct features: the browning edges of a leaf, the softening of a skin, or the darkening of a spot. It did not rely on random patterns or background clutter. This transparency confirms that the model is learning the actual signs of decay that a human expert would recognize. The researchers also built a working web application to demonstrate how this technology could be used in practice, allowing a user to upload a photo and instantly receive the vegetable's identity, its spoilage status, and its predicted shelf life.

The study concludes that while single-model systems have their place, the future of food quality control lies in these fused architectures. By teaching computers to look at food through multiple lenses at once—combining the ability to see fine details with the ability to understand the whole picture—these systems can provide a level of insight that was previously impossible. They offer a way to reduce waste by giving farmers and retailers a reliable, automated way to know exactly how long their produce will last, even when the lighting is poor or the camera is not perfect. This approach does not just improve accuracy; it builds a system that is robust enough to be trusted in the chaotic, noisy reality of the global food supply chain.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →