Submitted:
15 August 2026
Posted:
18 August 2026
You are already at the latest version
Abstract
Food waste in the restaurant sectors represents a critical global challenge with significant environmental and economic impacts. Addressing this issue requires a transition toward automated and intelligent waste management systems within a circular economy framework. However, the deployment of deep learning-based solutions is largely limited by data scarcity, class imbalance, and the high cost of pixel-level annotation. In this paper, we propose a data-centric deep learning framework for food waste classification and semantic segmentation. Instead of relying solely on architectural modifications, our approach improves model performance by integrating a stability-driven study within a U-Net/VAE framework, where CLIP-in-the-loop supervision and performance feedback (IoU and Dice scores) are incorporated to guide and refine the learning process. The proposed framework combines classical augmentation techniques, annotation-free compositional fusion, and CLIP-guided Stable Diffusion models (with CLIP supervision set to 0.3 in most configurations to enhance semantic alignment and visual consistency) to generate realistic and balanced synthetic food waste scenes.The suggested framework creates realistic and balanced synthetic food waste scenes by combining traditional augmentation techniques, annotation-free compositional fusion, and CLIP-guided Stable Diffusion models (with CLIP supervision set to 0.3 in most configurations to improve semantic alignment and visual consistency).We provide structured pseudo-labels that are aligned with the synthesised compositions in order to further enhance supervision quality. This allows for the generation of scale datasets without the need for manual annotation. The efficiency of the suggested data-centric approach is confirmed by experimental findings on the FoodSeg103 dataset, which show strong improved performance with IoU and DICE values between 0.70 and 0.90 across the majority of new classes.By reintroducing the Dice score into the loss function and integrating CLIP into the prompt refinement loop, the proposed method ensures training stability while offering a scalable and useful solution for intelligent waste sorting and supporting the development of automated decision systems to be integrated in advanced computer vision–based sustainable food waste management.
Keywords:
food waste
; deep learning
; image segmentation
; stable diffusion
; intelligent sorting
; circular economy
; computer vision
Introduction
One of the biggest sustainability issues facing the globe is food waste, which has serious negative effects on the environment, the economy, and society. The Food and Agriculture Organization (FAO) estimates that every year, around one-third of the food produced for human use is lost or wasted (FAO, 2019). A major amount of this waste is produced by the hospitality and restaurant industries, where resource losses are caused by inadequate monitoring procedures, erratic customer behavior, and a lack of broadly applicable management systems. In addition to the financial cost, food waste contributes significantly to greenhouse gas emissions and strains the infrastructure for waste treatment. To ensure a resilient and equitable future, governments, businesses, and communities must consistently put out their best efforts in order to transition to a sustainable and circular economy (Papamichael et al. 2024; Mirindi et al. 2024; Mirindi 2025). Several studies have explored sustainable food waste valorization pathways within circular economy frameworks. Anaerobic digestion has demonstrated significant potential for converting food waste into renewable bioenergy and valuable by-products, (Chaher et al, 2021a), while composting strategies have proven effective for transforming organic residues into nutrient-rich soil amendments (Chaher et al, 2021b). Although these approaches contribute substantially to waste recovery, their efficiency remains strongly dependent on the accurate characterization, monitoring, and sorting of food waste streams at the source. Reducing food losses necessitates actions throughout the whole food supply chain, from recovery and recycling to prevention and monitoring, according to recent studies on food waste management (Urugo et al., 2024). Strategies like food redistribution, composting, anaerobic digestion, smart packaging technologies, and waste-to-energy conversion have been extensively studied within circular economy frameworks to reduce environmental impacts and recover valuable resources from discarded food (Urugo et al., 2024; Chaher et al., 2021a; Chaher et al., 2021b). However, the ability to precisely detect, measure, and classify food waste sources is essential to the efficacy of these strategies.Specifically, real-time food residue analysis by intelligent monitoring systems can accelerate resource recovery procedures, enhance sorting effectiveness, assist data-driven decision making, and eventually lead to more sustainable food management practices (Urugo et al. 2024). The development of automated visual analysis tools has become essential for providing scalable and cost-effective food waste monitoring within circular economy ecosystems. Computer vision-based food picture segmentation has emerged as a key enabling technology for automated dietary assessment, smart kitchen monitoring, and intelligent food waste management (Liu et al., 2016). By assigning semantic labels at the pixel level, segmentation models are able to accurately identify, locate, and measure food components inside complicated scenes. Recent advances in deep learning architectures, particularly convolutional neural networks and encoder-decoder frameworks, have significantly improved segmentation performance on a range of visual recognition tasks. However, the effectiveness of these models still depends on the availability of large, diverse, and accurately annotated datasets.
Two factors contribute to the poor performance of current food image segmentation models: first, there aren’t many high-quality food image datasets with pixel-wise location masks and fine-grained ingredient labels; these datasets are either small in size or contain coarse ingredient labels; second, food’s complex appearance makes it challenging to locate and identify ingredients in food images (Wu et al. 2021). The paper present standard benchmarks such as FoodSeg103 and provide high-quality pixel-level annotations across numerous food categories.However, the visual complexity found in real-world settings—such as ingredient overlap, heterogeneous textures, food mixing, and varying illumination conditions frequently seen in restaurant and cafeteria settings—is not adequately captured by these datasets, which frequently display cultural and geographic biases. Moreover, producing pixel-level annotations is an expensive and time-consuming procedure that restricts dataset scalability and impedes the creation of reliable segmentation models.
To address these limitations, this paper proposes a data-centric deep learning framework, as illustrated in Figure 1, combining CLIP-guided Stable Diffusion, compositional fusion, and automated pseudo-labeling for food waste segmentation and intelligent sorting. Rather than modifying the segmentation architecture itself, the proposed approach focuses on improving the quality, diversity, and balance of the training data.
In particular, the system combines CLIP-guided Stable Diffusion models for creating synthetic food images, an annotation-free compositional fusion technique for creating realistic multi-ingredient food scenes, and traditional geometric and photometric augmentations. The suggested approach reduces class imbalance and enhances the visual variety of the training set by automatically generating realistic food waste distributions and matching pseudo-labels. Improved segmentation accuracy and resilience are shown by experimental findings, underscoring the potential of data-centric AI as a scalable solution for circular economy and intelligent food waste management applications.
Recent deep learning techniques have also been used in this area for problems involving the comprehension of environmental images. (Nahiduzzaman et al. 2024) created an automated waste classification system that classifies various waste materials from photos using convolutional neural networks. In difficult real-world scenarios, this work demonstrates how deep learning models may learn discriminative visual features for classification.
Furthermore, global classification tasks were the main focus of early deep learning applications in food intake computation. By introducing the DeepFood framework and proving that Convolutional Neural Networks (CNNs) could successfully identify multi-ingredient plates for computer-aided dietary evaluation, (Liu et al. 2016) accomplished a fundamental milestone. However, global image recognition fails to capture precise volume or distinguish individual ingredient boundaries on a mixed plate. To resolve this, the field shifted toward pixel-level understanding.
(Wu et al., 2021) introduced the FoodSeg103 dataset, which comprises 7,118 images annotated with pixel-level semantic masks across 103 fine-grained food categories. While FoodSeg103 remains a widely adopted benchmark for food image segmentation, it inherits certain biases from its source data (Recipe1M), (Salvador et al. 2017), which is predominantly composed of curated and visually appealing culinary images.
Additionally, FoodSeg154, an expanded version of the dataset with 9,490 photos and 154 ingredient-level classes, was introduced in the same paper. Both benchmarks, however, are still unable to accurately depict real-world food waste scenarios, which are frequently marked by highly unstructured, mixed, and degraded food appearances frequently seen in institutional catering and restaurant waste environments, despite their increased category granularity.
Conventional pipelines mostly rely on data augmentation to address data scarcity and overfitting in semantic segmentation. To replicate different sensor and illumination conditions, standard methods include geometric operations (such as random cropping, flipping, and affine transformations) and photometric modifications (such as color jittering, brightness shifts, and contrast manipulation). Although these transformations make the model more resilient to low-level visual variations, they are unable to address the high semantic gap between curated food datasets and real-world food waste scenarios, which are characterized by complex occlusions, mixed ingredients, and severe structural degradation.
Avanced data mixing approaches such as CutMix (Yun et al., 2019) and Mosaic (Bochkovskiy et al., 2020) were published in order to blend regions from many pictures into a single training sample. Nevertheless, they frequently produce unrealistic boundaries and fail to preserve natural lighting conditions, and spatial coherence.
In the context of food waste analysis, simply pasting food items onto a plate cannot accurately recreate the complex blending and occlusion patterns commonly observed in real waste situations. Therefore, more realistic and context-aware compositional methodologies are required to reproduce the visual complexity of food waste ecosystems. Synthetic data generation has also greatly benefited from recent advances in deep generative models (DGMs), particularly denoising diffusion probabilistic models (DDPMs) (Ho et al., 2020).
In order to produce high-fidelity, photo-realistic visuals conditioned on textual cues, advanced architectures like Stable Diffusion (Rombach et al., 2022) use latent space representations. Crucially, the integration of Contrastive Language–Image Pre-training (CLIP) (Radford et al., 2021) enables strong cross-modal alignment between text and vision, ensuring that generated images better adhere to complex semantic descriptions, our framework adopt this contrastive learning during training.
According to our knowledge, these generative approaches have not been extensively explored in early works on food waste analysis. This gap motivated us to investigate and compare these techniques with classical architectures such as U-Net and VAE for food waste image generation and subsequently to downstream tasks. Recent methodologies in computer vision applications, utilize synthetic generation not only to expand dataset size but also to mitigate long-tailed class imbalances by generating rare classes on demand (Chou et al., 2020; Li et al., 2022). The lack of alignment between the generated image and its matching pixel-level ground truth, however, continues to be a problem when employing generative data for semantic segmentation. In order to overcome this particular bottleneck, our study combines CLIP-guided generative models with annotation-free compositional fusion to provide structurally complex, auto-labeled training.
Compositional learning paradigms in computer vision aim to construct complex, multi-object scenes by strategically combining individual segmented objects or distinct image regions (Deng et al., 2020; Zellers et al., 2019). Rather than treating an image as a holistic, monolithic entity, these approaches deconstruct visual environments into discrete, reconfigurable semantic components. This approach allows models to encode richer, context-aware representations and greatly improves downstream deep learning architectures’ capacity for spatial reasoning.
Compositional learning is extremely important when it comes to automated food waste monitoring. From a single text input, generative models like as Stable Diffusion are excellent at creating isolated, high-fidelity food items, but they frequently fail to produce highly complicated, multi-ingredient waste layouts with realistic overlapping occlusions and chaotic inter-class borders. Our methodology methodically overlays several synthesized food constituents by integrating a specific compositional fusion mechanism post-generation. This method bridges the gap between clean generating outputs and the disorganized visual reality of institutional waste streams by artificially reproducing the realistic, disorganized, and chaotic distribution of leftovers commonly seen in commercial kitchens.
The remainder of this paper is organized as follows. Section I, reviews related work in food recognition, semantic segmentation, and generative modeling. Section II presents the proposed data-centric framework, including CLIP-guided Stable Diffusion, compositional fusion, and pseudo-label generation strategies. Section IV details the mathematical formulation of the proposed methodology, including image generation, mask construction, and optimization objectives. Section V describes the experimental setup and implementation details. Section III presents the results and discusses the effectiveness of the proposed approach in improving segmentation performance on food waste datasets. Finally, Section VI concludes the paper and outlines future research directions.
Materials and Methods
Our approach is based on a hybrid encoder–decoder architecture. While U-Net (Ronneberger et al., 2015) and diffusion-based variants (Ho et al., 2020; Rombach et al., 2022) have proven to be powerful tools for image segmentation, often benefiting from large-scale training on datasets such as ImageNet (Deng et al., 2009), they may struggle to generalize when training data are limited or not sufficiently representative. To address this limitation, the proposed model integrates a VAE-based decoder, which enhances data efficiency by learning a meaningful latent representation and enabling the generation of additional samples conditioned on input prompts.
. To implement the proposed generative framework, the Food-103 dataset is structured as a Hugging Face DatasetDict, partitioning the data into training () and validation () subsets. The FoodSeg103 dataset is organized as a DatasetDict composed of two subsets: a training set and a validation set. The training subset contains 4,983 annotated images, while the validation subset includes 2,135 images. Each sample is represented by four attributes:
- image: the original RGB food image.
- label: the corresponding pixel-level segmentation mask, where each pixel is assigned to a food category.
- classes_on_image: a list containing the identifiers of all food categories present in the image.
- id: Refers to unique identifier representing each sample.
The dataset is appropriate for food segmentation, identification, and multi-class semantic segmentation problems since it offers both visual information and semantic annotations. 7,118 annotated samples, split across training and validation subsets, are included. A class title, a list of food categories included in the image, a unique identifier, and an image encoded as a PIL (Python Imaging Library) object are all included in each sample. This structured annotation approach provides the metadata needed for segmentation and automated labeling processes, as well as multi-ingredient analysis and data traceability.
Synthetic Food Dataset Generation Framework
We provide a system for building synthetic datasets for food image recognition challenge, using prompt-driven ingredient sampling, ground truth-based pseudo segmentation mask generation, and a diffusion-based generative model.
This enhances the spatial reasoning capabilities of downstream deep learning architectures and enables models to encode richer, context-aware representations.
- Prompt Generation: To generate food-related prompts, a predefined pool of materials, including rice, chicken, tomatoes, and pasta, is randomly sampled.
- Image Generation: A pretrained Stable Diffusion model is used to generate realistic food images based on the given prompts.
- Pseudo Mask Generation: We use geometric random region partitioning to create approximate segmentation masks that act as weak supervision labels because pixel-level annotations are not available.
- Dataset Construction: A synthetic dataset for subsequent learning tasks is created by storing the generated images and their matching pseudo-labels.
This framework enables scalable generation of food datasets with controllable diversity, addressing data scarcity and class imbalance in food recognition and segmentation tasks.
Model Loading Using Stable Diffusion and CLIP Guidance
Stable Diffusion is a powerful CLIP-guided conditional generative model that progressively transforms random noise into a realistic image through an iterative denoising process, Figure 2. The generation is conditioned on textual descriptions encoded by a CLIP text encoder, which maps the input prompt into a semantic latent space. This CLIP-guided representation steers the U-Net denoising network, ensuring that the generated image remains aligned with the textual description throughout the diffusion process. Pseudo labels refer to automatically generated or indirectly inferred annotations that approximate ground-truth labels without manual pixel-level or instance-level annotation. As described, the proposed generation framework, our approach builds on diffusion-based generative models for food waste image synthesis, extending existing methods by introducing a structured pipeline for food-specific image generation.
The pre-trained Stable Diffusion model runwayml/stable-diffusion-v1-5 is used as the core backbone for text-to-image generation. The model is implemented using the diffusers library, which provides a modular and flexible interface for diffusion pipelines. Specifically, the Stable Diffusion pipeline is initialized from pre-trained weights, integrating three main components: a CLIP text encoder, a U-Net-based denoising network, and a VAE decoder within a unified architecture.
The image generation process follows these steps:
- Text Encoding: The input prompt is encoded into a latent representation using a text encoder (CLIP).
- Noise Initialization: A random Gaussian noise image is initialized in the latent space.
- Iterative Denoising: A U-Net neural network gradually removes noise while being conditioned on the text embedding.
- Scheduler: Controls the number of denoising steps and the update rule at each iteration.
- VAE Decoding: The final latent representation is decoded into a high-resolution image.
Mathematical Foundations
Given a text prompt p, the diffusion model generates an image x as:
where denotes a pretrained CLIP-guided Stable Diffusion model.
Since ground-truth segmentation masks are not available, we construct weak supervision signals by exploiting region-based sampling of synthetic images together with prompt-derived annotations.
The pseudo segmentation mask is defined as:
where indicates foreground food regions and 0 denotes background.
The mask is constructed as an aggregation of region-level masks:
where each represents a spatially coherent pseudo-object region corresponding to a food ingredient.
The synthetic dataset is defined as:
where is the generated image, is the pseudo segmentation mask, and is the input prompt.
We formulate the segmentation task as a pixel-wise prediction problem:
The model learns a mapping:
where represents the predicted probability map.
Loss Function and Optimization Objective
The training objective is defined as a weighted combination of Binary Cross-Entropy and Dice loss:
The optimal parameters are obtained by minimizing:
From Raw Data to a Generalized Dataset
Reverse Diffusion Process
The reverse diffusion process in latent space is defined as:
where:
- is the latent noisy representation at timestep t,
- c is the CLIP text conditioning embedding,
- denotes the U-Net denoising network.
Stable Diffusion progressively transforms a Gaussian noise sample into a structured latent representation conditioned on text embeddings.
Classical Augmentation
Given an image x, a transformation is applied:
where includes geometric and photometric transformations such as rotation, scaling, flipping, brightness, and contrast adjustments.
Compositional Fusion (Mixup-based Augmentation)
We introduce a compositional augmentation strategy inspired by Mixup:
where and are two images and controls the mixing ratio.
Synthetic Data Generation
We generate synthetic samples using a diffusion model conditioned on text embeddings:
where c denotes the CLIP text conditioning.
Training Dataset Construction
The final dataset is defined as:
where each component contributes to increasing diversity and improving generalization under limited annotation settings.
Mathematical Performance Analysis Using Evaluation Scores
The CLIP score measures the semantic alignment between a textual prompt and a generated image. It is computed as the cosine similarity between the image embedding and the text embedding produced by the CLIP model:
where and denote the image and text feature vectors, respectively, extracted by the CLIP encoder. The resulting score ranges from to 1, with higher values indicating stronger semantic consistency between the generated image and the corresponding textual prompt.
In this work, the CLIP score is used to evaluate the semantic relevance of the generated food images with respect to the ChatGPT-enhanced prompts. Unlike segmentation metrics such as Dice and IoU, which assess pixel-level agreement, the CLIP score provides a high-level semantic evaluation of text-image correspondence. The quality of the fused segmentation masks is quantitatively evaluated using the Dice coefficient and the Intersection over Union (IoU). These metrics measure the similarity between the fused mask () and the reference mask (), obtained from the union of the original segmentation masks.
The Dice coefficient is defined as:
where denotes the number of overlapping pixels between the fused mask and the reference mask , while and represent the total number of foreground pixels in the fused and reference masks, respectively.
The Intersection over Union (IoU) metric is computed as:
Results and Discussion
This approach allows models to encode richer, context-aware representations and greatly improves downstream deep learning architectures’ capacity for spatial reasoning. The key features of PyTorch, TensorFlow, and Flax (JAX) are compiled in Table 1. PyTorch is especially well-suited for quick prototyping, debugging, and research-focused experimentation because of its great flexibility and dynamic computation graphs. Effective execution on edge devices and large-scale production systems is made possible by TensorFlow’s robust scalability and deployment features. Conversely, Flax (JAX) provides high-performance computation via automatic vectorization and functional programming, which makes it ideal for large-scale and accelerator-optimized research, particularly on TPUs.
All things considered, these environments guarantee effective model development, scalability, and reproducibility in both experimental and deployment contexts.
Using large-scale datasets like Food-101 (L. Bossard 2014) and FoodSeg103 (X. Wu, 2021), as well as deep learning architectures like CNNs (I. Goodfellow et al., 2016), (Krizhevsky et al. 2012), VGGNet (K. Simonyan, 2015), YOLO (J. Redmon, 2016), Faster R-CNN (S. Ren, 2015), and Mask R-CNN (K. He, 2017). Although these methods have shown impressive results in food segmentation and classification, they are still unable to handle complicated food waste scenarios found in real-world settings. Such scenes are characterized by high visual variability, ingredient occlusions, overlapping food items, cluttered plate arrangements, and ambiguous object boundaries. The model has been preprocessed to enhance variability of the data through transformation or de-blurring, Figure 3. Furthermore, existing methods rarely exploit generative models to enhance semantic consistency or synthesize realistic food compositions, thereby limiting their applicability to robust food waste analysis and intelligent food understanding in circular economy applications, (G. Garcia et al, 2017), (S. Abusin, 2023) and (daCosta et al. 2023).
Our contribution, on the other hand, focuses on creating a reliable image production and analysis pipeline for intricate situations involving food. The suggested method combines structured preprocessing techniques with text-conditioned diffusion models. In particular, we present a latent diffusion-based generation framework that combines VAE-based decoding, U-Net-based iterative denoising, and CLIP-based text encoding. To further boost model generalization, we apply data improvement methods such rotation invariance, blur robustness, and feature fusion. The model is loaded in half-precision floating-point format (float16) to increase computational efficiency and decrease memory use during inference. This technique is appropriate for downstream food picture analysis applications since it speeds up computation while maintaining high-quality image production. Our experimental results demonstrate improved robustness in generated and processed food images, compared to those without augmented data (baseline foodseg 103), particularly under challenging visual conditions, thereby supporting more reliable downstream tasks such as segmentation and food waste understanding. The presented methods as well as our key contributions are summarized in Table 2.
Prompt-Based Image Generation
While Stable Diffusion enables high-quality and realistic image synthesis guided by textual prompts, prompt-based generation remains inherently limited in terms of structural control and semantic consistency. In particular, it does not natively support dataset-specific constraints such as FoodSeg103 class labels or enforce precise object presence and spatial arrangement.
As a result, generated food images may contain missing, merged, or partially visible ingredients, particularly in complex multi-object scenes. As shown in Figure 4, the prompt generated without a diffusion model omits the rice, while the diffusion-based prompt generates all requested ingredients. Nevertheless, broccoli is positioned outside the plate, producing unrealistic compositions and false-positive prompt–image alignments. Therefore, constraint-guided prompt generation is introduced by incorporating spatial constraints into the prompt. In order to eliminate ingredient displacement and enhance semantic authenticity, spatial consistency, and visual realism, the model is specifically told to arrange all created ingredients completely inside the plate. These drawbacks emphasize the need for more organized generation techniques, including composition-based methods or mask-guided diffusion, to provide better control, enhanced semantic alignment, and increased dependability for tasks involving the comprehension of food images.
The Stable Diffusion pipeline is a text-to-image generative model based on a probabilistic diffusion process, Listing . It transforms a natural language prompt into a realistic image through multiple stages.
| Listing 1. Prompt generation for synthetic food image creation. |
|
import random ingredients_pool = [ "rice", "chicken", "beef", "salad", "tomato", "cucumber", "pasta", "cheese", "fish", "sauce" ] def generate_prompt(): n = random.randint(2, 5) ingredients = random.sample(ingredients_pool, n) prompt = ( "top view of a realistic plate of food, " + ", ".join(ingredients) + ", ultra realistic food photography, studio lighting" ) return prompt, ingredients |
Performance Evaluation and Reference-Based Prompting
As shown in Figure 5, the suggested fusion technique maintains the structural information of food regions. High overlap scores are the outcome across multiple FoodSeg103 dataset samples. These metrics offer an unbiased evaluation of the efficiency of the fusion process and its capacity to preserve consistent segmentation following the combination of food photos.
Historically, the stable diffusion, was not specifically tailored for complex food scenes, we adapt this model to especially those involving fine textures like sauces or intricate food presentation. Therefore, we were still able to generate visually realistic images from descriptions of meat dishes and sauces.
Despite this, our method satisfactory shows a level of quality even when the model is tuned with a generic image production model. As shown in Figure 6, the quantitative evaluation based on the CLIP score indicates generally correct performance, with values slightly above 0.3. The scores indicate an acceptable match between the generated visuals and the written descriptions provided.
However, the model often misses some elements of the instructions, resulting in incomplete ingredient compositions and sometimes false positives during evaluation, but theses errors are avoided by adding some contrastive prompts and adding a loop correction based on dice loss refinement.
These findings show that even though the model is not a food expert, it has the generalization skills required to produce visually realistic food compositions and scenarios that match the input instructions.
The CLIP score is a semantic evaluation scale that evaluates the degree of correspondence between the created image and its corresponding written instructions. Because the CLIP score projects the image and text into a single, integrated space, it embodies high-level semantic coherence in contrast to pixel-level metrics, making it capable of handling feedback loops.
As seen in Figure 7, the evaluation process shows several combined samples and their matching hash masks across various samples.
The evaluated foodseg-103 dataset, shows inconsistent initial scores, compared to the newly generated dataset.
To guarantee precise scaling, the evaluation approach depends on strict preprocessing standards. Both the reference mask and the prediction mask are transformed into binary images and their resolution is normalized prior to evaluation in order to ensure pixel uniformity and spatial alignment. In addition to ensuring that the computed scaling appropriately represents the structural similarity between the prediction mask and the original reality mask, this step is essential for preventing biases brought on by image scale fluctuations or interpolation distortions.
The Dice coefficient and IoU, which quantify the spatial overlap and intersection ratio between the predicted and reference regions, respectively, are the primary evaluation measures. These metrics quantify pixel-level agreement mathematically, and enhances the stability of the model whereas the CLIP score offers an additional semantic-level assessment of text-image consistency.
System performance is influenced by the diffusion model’s validity, prompt quality (enhanced by the prompt engineering), and the rigor of the evaluation pipeline, which includes accurate alignment and normalization of reference data.
Advanced Computer Vision Fostering Food Waste Management in Circular Economy
The shift towards a circular economy, which reduces the significant contribution of food waste to greenhouse gas emissions, land degradation, water scarcity, and energy inefficiency, is being promoted through several innovative approaches, such as technological waste reduction solutions, supply chain optimization strategies, consumer behavior-focused initiatives, and waste recovery, particularly of food waste (Klein et al., 2022).
Recovered food waste can be transformed into valuable products such as bioenergy, compost, or animal feed, providing additional revenue streams for businesses and reducing disposal costs (Taron et al., 2022).
Moreover, food recovery and redistribution initiatives focus on rescuing surplus food from businesses, institutions, and households and redistributing it to those in need (Abusin et al., 2023). By minimizing over-purchasing, spoilage, and disposal of edible food, food waste prevention efforts help conserve resources, save money, and reduce environmental impact. The circular economy models can further improve resource efficiency by promoting waste valorisation in industrial applications aligns with sustainable development goals, fostering the creation of bio-based products and reducing dependence on non-renewable resources (Esposite et al., 2025). Moreover, turning food waste into animal feed is one way that can contribute to the creation of a circular economy as well as the achievement of sustainable development (Nath et al., 2023), it is therefore necessary to ensure that these foods are safe. Technologies for real-time monitoring and management of food inventory play, subsequently, a crucial role in reducing food waste by providing greater visibility, control, and effi ciency throughout the supply chain. Deep learning is increasingly used to automate food waste sorting by combining IoT sensors, computer vision, and machine learning models (like CNNs and YOLO). In fact, visually identifying classifing and separating food waste promote the conversion of food into nutritious ingredients of animal feed. Predictive analytics utilizes historical data, statistical algo rithms, and machine learning models to forecast future events and trends, including demand fluctuations, inven tory turnover rates, and expiration dates (da Costa et al., 2023). These AI-driven systems have demonstrated significant reductions in food waste, offering economic savings and environmental benefits. By analyzing historical data and predicting future demand patterns, inventory management software helps organizations optimize procurement, production, and distribution processes, minimizing excess inventory and reducing the risk of food waste (Jawad and Balázs, 2024); (Tan and Sidhu, 2022). The potential of computer vision systems to automatically identify and segregate thrown food items is demonstrated by the examination of our food waste dataset. Food waste can be tracked in real time in kitchens, cafeterias, restaurants, and institutional eating facilities by combining cameras with deep learning models. This allows for the collection of useful data regarding the kinds of food that are being thrown out. Precise localization of food remains is made possible by our method’s generation of pixel-level masks, which also establishes the basis for future quantity estimate techniques based on the segmented area and geometric properties of the identified trash. Stakeholders can use this information to identify goods that are frequently wasted, optimize portion proportions, and enhance meal planning techniques. Furthermore, suitable food waste can be redirected toward animal feed or other recovery pathways, supporting a circular economy while reducing environmental and economic losses.
Cameras capture real-time data, allowing kitchens and consumers to track waste patterns, adjust purchasing habits, optimize portion sizes, and drastically reduce food loss without manual logging (Clark et al., 2025). The economic feasibility for households to invest in AI-driven systems may differ significantly from commercial entities, which could limit the potential impact of these technologies at the household level (Fang et al., 2023).
Finally, Figure 8 illustrates our proposed unified framework, which integrates U-Net, VAE, and a CLIP-guided scoring loop within a circular economy pipeline to enhance robustness, stability, for more decision-level interpretability. Although the present work focuses on the model design, the proposed framework provides a promising foundation for future deployment on AI-enabled edge devices, such as smart cameras, enabling real-time food waste monitoring and supporting circular economy applications directly at the source.
Conclusions
In this research, a framework to overcome the lack of food waste datasets is presented. The framework generates enriched training environments that more accurately represent the complexity of real-world food waste scenarios, such as multi-ingredient mixtures, occlusions, and heterogeneous visual appearances, by combining synthetic image generation, annotation-free compositional scene construction, and automatic mask generation. This approach lessens reliance on expensive pixel-level annotations while facilitating the creation of scalable training datasets.
A hybrid data augmentation technique that included text-guided image synthesis and mask fusion was used to improve the training dataset. To create realistic composite food arrangements while maintaining object boundaries, segmentation masks from two distinct food plates were first fused using high-overlap criteria (IoU and DICE between 0.7 and 0.9 in most cases). The efficacy of the suggested data-centric paradigm was then confirmed by carefully crafted text prompts that described various meal compositions in order to produce further synthetic images using CLIP-guided Stable Diffusion models. These findings confirm that, despite not being specialized in the food domain, the model has the generalization ability to produce convincing culinary scenarios that correspond with the input prompts. The CLIP score, a semantic assessment metric, is used to evaluate the alignment of the generated image and its corresponding textual prompt. Unlike pixel-level measurements, CLIP captures high-level semantic consistency by projecting both text and image into a single embedding space, which is why it is used to control the loop. Overall, a unified computational framework for food picture segmentation is established using the suggested UNet-VAE framework in conjunction with the mask fusion technique, CLIP-guided synthetic data creation, and similarity score computation. The learned latent representations and encoded features provide a promising basis for integration into intelligent computer vision-based food waste management systems and future deployment on AI-enabled edge devices, such as smart cameras, to enable automated food recognition, waste monitoring, sorting, and real-time decision support. These abilities support the transition to a circular economy by fostering more sustainable resource management and offering a scalable foundation for next-generation food waste reduction solutions.
References
- Abusin, S., Al-Emadi, N., & Mandikiana, B. (2023). An evaluation of the alignment of surplus food recovery and redistribution technologies with the circular economy. Sustainability, 15(16), 12355.
- A. Bhatia and S. Kumar, “IoT-Based Smart Waste Management System Using Machine Learning,” IEEE Access, vol. 9, pp. 14820–14830, 2021.
- Bochkovskiy, A., Wang, C.-Y., & Liao, H.-Y. M. (2020). YOLOv4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934. https://arxiv.org/abs/2004.10934.
- L. Bossard, M. Guillaumin, and L. Van Gool, “Food-101 – Mining Discriminative Components with Random Forests,” in Proceedings of the European Conference on Computer Vision (ECCV), 2014, pp. 446–461.
- G. E. P. Box and G. M. Jenkins, Time Series Analysis: Forecasting and Control, Holden-Day, San Francisco, CA, 1976.
- M.-A. Carbonneau, K. Laframboise, and R. Vahidov, “Application of Machine Learning Techniques for Supply Chain Demand Forecasting,” European Journal of Operational Research, vol. 184, no. 3, pp. 1140–1154, 2008.
- Chaher NEH, Nassour A, Hamdi M, Nelles M (2021) Monitoring of food waste anaerobic digestion performance: conventional co-substrates vs. unmarketable biochar additions. Foods 10:2353. [CrossRef]
- Chaher NEH, Chakchouk M, Nassour A, Nelles M, Hamdi M (2021) Potential of windrow food and green waste composting in Tunisia. Environmental Science and Pollution Research 28:46540–46552. [CrossRef]
- Chou, H.-P., et al. (2020). Learning to generate synthetic data for imbalanced classification. arXiv preprint arXiv:2007.07040. https://arxiv.org/abs/2007.07040.
- Q. M. Clark, D. B. Kanavikar, J. Clark, and P. J. Donnelly, “Exploring the potential of AI-driven food waste management strategies used in the hospitality industry for application in household settings,” Frontiers in Artificial Intelligence, vol. 7, 2025. [CrossRef]
- T. P. da Costa, J. Gillespie, X. Cama-Moncunill, S. Ward, J. Condell, R. Ramanathan, and F. Murphy, “A Systematic Review of Real-Time Monitoring Technologies and Its Potential Application to Reduce Food Loss and Waste: Key Elements of Food Supply Chains and IoT Technologies,” Sustainability, vol. 15, no. 1, p. 614, 2023.
- Deng, Y., et al. (2020). Compositional visual reasoning and representation learning. arXiv preprint arXiv:2006.11172. https://arxiv.org/abs/2006.11172.
- L. Esposito, F. Accardo, B. Prandi, and T. Tedeschi, “How food wastes can be converted into new products: European legislation and analysis of enzymatic hydrolysis,” New Biotechnology, vol. 90, pp. 122–133, 2025. [CrossRef]
- B. Fang, J. Yu, Z. Chen, A. I. Osman, M. Farghali, I. Ihara, et al., “Artificial Intelligence for Waste Management in Smart Cities: A Review,” Environmental Chemistry Letters, vol. 21, pp. 1959–1989, 2023.
- Food and Agriculture Organization (FAO) (2019) The State of Food and Agriculture: Moving Forward on Food Loss and Waste Reduction. FAO, Rome. https://www.fao.org/3/ca6030en/ca6030en.pdf.
- G. Garcia et al., “A Methodology for Sustainable Food Waste Management,” Journal of Cleaner Production, vol. 143, pp. 220–231, 2017.
- I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning, Cambridge, MA, USA: MIT Press, 2016.
- K. He, G. Gkioxari, P. Dollár, and R. Girshick, “Mask R-CNN,” in Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017, pp. 2961–2969. [CrossRef]
- Ho, J., Jain, A., & Abbeel, P. (2020). Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems (NeurIPS). https://arxiv.org/abs/2006.11239.
- T. Hong and S. Fan, “Probabilistic Electric Load Forecasting: A Tutorial Review,” International Journal of Forecasting, vol. 32, no. 3, pp. 914–938, 2016.
- R. J. Hyndman and G. Athanasopoulos, Forecasting: Principles and Practice, 3rd ed., OTexts, Melbourne, Australia, 2021.
- Z. N. Jawad and V. Balázs, “Machine learning-driven optimization of enterprise resource planning (ERP) systems: A comprehensive review,” Beni-Suef University Journal of Basic and Applied Sciences, vol. 13, no. 1, p. 4, 2024.
- H. Kagaya, K. Aizawa, and M. Ogawa, “Food Detection and Recognition Using Convolutional Neural Network,” in Proceedings of the 22nd ACM International Conference on Multimedia, 2014, pp. 1085–1088. [CrossRef]
- Kaggle Datasets, 2025. https://www.kaggle.com.
- O. Klein, S. Nier, and C. Tamásy, “Circular agri-food economies: Business models and practices in the potato industry,” Sustainability Science, vol. 17, no. 6, pp. 2237–2252, 2022.
- A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks,” in Advances in Neural Information Processing Systems (NeurIPS), 2012, pp. 1097–1105.
- Li, Y., et al. (2022). Balanced contrastive learning for long-tailed visual recognition. CVPR 2022. https://arxiv.org/abs/2203.00136.
- C. Liu, Y. Cao, Y. Luo, G. Chen, V. Vokkarane, and Y. Ma, “DeepFood: Deep Learning-Based Food Image Recognition for Computer-Aided Dietary Assessment,” in Lecture Notes in Computer Science (LNCS): Inclusive Smart Cities and Digital Health (ICOST 2016), vol. 9677, C. Chang et al., Eds., Springer, Cham, 2016, pp. 37–48. [CrossRef]
- S. Makridakis, E. Spiliotis, and V. Assimakopoulos, “Statistical and Machine Learning Forecasting Methods: Concerns and Ways Forward,” PLOS ONE, vol. 13, no. 3, e0194889, 2018.
- D. Mirindi, D. Sinkhonde, and F. Mirindi, “An Advance Review of Urban-AI and Ethical Considerations,” in Proceedings of the 2nd ACM SIGSPATIAL International Workshop on Advances in Urban-AI (UrbanAI ’24), Atlanta, GA, USA, Oct. 29–Nov. 1, 2024, pp. 24–33. [CrossRef]
- D. Mirindi, “Urban–artificial intelligence and system dynamics modelling of the water–energy–food nexus in Goma (DR Congo) and Euro-Mediterranean regions,” Euro-Mediterranean Journal for Environmental Integration, vol. 10, pp. 4313–4332, 2025. [CrossRef]
- M. Nahiduzzaman, M. F. Ahmed, M. Rahman, N. Rahman, M. J. Karim, H. Kibria, et al., “An Automated Waste Classification System Using Deep Learning Techniques: Toward Efficient Waste Recycling and Environmental Sustainability,” Knowledge-Based Systems, Elsevier, 2024.
- P. C. Nath, A. Ojha, S. Debnath, M. Sharma, P. K. Nayak, K. Sridhar, and B. S. Inbaraj, “Valorization of food waste as animal feed: A step towards sustainable food waste management and circular bioeconomy,” Animals, vol. 13, p. 1366, 2023.
- Papamichael I, Voukkali I, Stylianou M, Naddeo V, Ksibi M, Zarra T, Zorpas AA (2024) Sustainable production and consumption. Euro-Mediterranean Journal for Environmental Integration 9:2003–2008. [CrossRef]
- Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., Krueger, G., & Sutskever, I. (2021). Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020. https://arxiv.org/abs/2103.00020.
- S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” in Advances in Neural Information Processing Systems (NeurIPS), 2015. [CrossRef]
- F. Ricci, L. Rokach, and B. Shapira, Recommender Systems Handbook, New York, NY, USA: Springer, 2015.
- Rombach, R., Blattmann, A., Lorenz, D., Esser, P., & Ommer, B. (2022). High-resolution image synthesis with latent diffusion models. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). https://arxiv.org/abs/2112.10752.
- Ronneberger, O., Fischer, P., & Brox, T. (2015). U-Net: Convolutional networks for biomedical image segmentation. Medical Image Computing and Computer-Assisted Intervention (MICCAI). https://arxiv.org/abs/1505.04597.
- Salvador, A., Hynes, N., Aytar, Y., Marin, J., Ofli, F., Weber, I., & Torralba, A. (2017). Learning Cross-Modal Embeddings for Cooking Recipes and Food Images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 3020–3028). [CrossRef]
- S. Shi, X. Li, and J. Zhang, “Deep Learning for Time Series Forecasting: A Review,” Neurocomputing, vol. 363, pp. 112–125, 2019.
- K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” in International Conference on Learning Representations (ICLR), 2015.
- I. Sosunova and J. Porras, “IoT-enabled smart waste management systems for smart cities: A systematic review,” IEEE Access, vol. 10, pp. 73326–73363, 2022. [CrossRef]
- W. C. Tan and M. S. Sidhu, “Review of RFID and IoT Integration in Supply Chain Management,” Operations Research Perspectives, vol. 9, p. 100229, 2022.
- A. Taron, S. Gebrezgabher, S. Sanfo, R. Ouedraogo, S. Salack, K. Diarra, et al., “Circular bioeconomy business models—Recovering food products to reduce agricultural waste: Cases from Burkina Faso,” CGIAR, 2022.
- N. B. D. Thi et al., “Food Waste Management and Reduction Strategies: A Review,” Waste Management, vol. 38, pp. 299–308, 2015.
- Urugo, M. M., Teka, T. A., Gemede, H. F., et al. (2024). A comprehensive review of current approaches on food waste reduction strategies. Comprehensive Reviews in Food Science and Food Safety, 23, e70011. [CrossRef]
- Y. Wang et al., “Deep Learning for Supply Chain Demand Forecasting and Optimization,” IEEE Transactions on Engineering Management, vol. 67, no. 4, pp. 1234–1248, 2020.
- X. Wu, X. Fu, Y. Liu, E.-P. Lim, S. C. H. Hoi, and Q. Sun, A Large-Scale Benchmark for Food Image Segmentation (FoodSeg103), arXiv preprint arXiv:2105.05409, 2021. Available: https://arxiv.org/abs/2105.05409.
- J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779–788. [CrossRef]
- Yun, S., Han, D., Oh, S. J., Chun, S., Choe, J., & Yoo, Y. (2019). CutMix: Regularization strategy to train strong classifiers with localizable features. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). [CrossRef]
- S. Zhang, L. Yao, A. Sun, and Y. Tay, “Deep Learning based Recommender System: A Survey and New Perspectives,” ACM Computing Surveys, vol. 52, no. 1, pp. 1–38, 2019.
- Zellers, R., et al. (2019). From recognition to cognition: Visual commonsense reasoning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). https://arxiv.org/abs/1811.10830.
- Y. Zhang, X. Li, J. Wang, and H. Zhao, “Hybrid artificial intelligence systems for smart cities and sustainable resource management,” Sustainable Cities and Society, vol. 76, p. 103450, 2022. [CrossRef]
Figure 1.
Detailed data-centric pipeline combining CLIP-guided Stable Diffusion, compositional fusion for chaotic scene simulation, and automated pseudo-labeling for intelligent sorting.
Figure 1.
Detailed data-centric pipeline combining CLIP-guided Stable Diffusion, compositional fusion for chaotic scene simulation, and automated pseudo-labeling for intelligent sorting.

Figure 2.
CLIP-guided prompt selection and Stable Diffusion-based synthetic food image generation with pseudo label extraction.
Figure 2.
CLIP-guided prompt selection and Stable Diffusion-based synthetic food image generation with pseudo label extraction.

Figure 3.
Data augmentation examples showing different transformations applied to input images.

Figure 4.
Comparison between images generated with and without a diffusion model.

Figure 5.
Examples of fused food images and their corresponding segmentation masks generated from pairs of FoodSeg103 samples. IoU and Dice values indicate better preservation of segmented food regions after the fusion process.
Figure 5.
Examples of fused food images and their corresponding segmentation masks generated from pairs of FoodSeg103 samples. IoU and Dice values indicate better preservation of segmented food regions after the fusion process.

Figure 6.
Stable Diffusion outputs for grilled meat with different sauces. CLIP score evaluates semantic alignment between prompts and generated images.
Figure 6.
Stable Diffusion outputs for grilled meat with different sauces. CLIP score evaluates semantic alignment between prompts and generated images.

Figure 7.
Visual results of representative samples from different food seg-103 dataset ranges, showing, masks, and their corresponding Dice (D) and IoU (I) scores.
Figure 7.
Visual results of representative samples from different food seg-103 dataset ranges, showing, masks, and their corresponding Dice (D) and IoU (I) scores.

Figure 8.
Unified U-Net–VAE framework for circular economy-driven modeling and optimization.

Table 1.
Comparison of Deep Learning Frameworks for Model Development and Deployment
| Framework | Key Characteristics | Strengths | Limitations |
|---|---|---|---|
| PyTorch | Widely used in research (CVPR, NeurIPS), dynamic computation graph, flexible design | Easy debugging, fast prototyping, large community support | Less optimized for large-scale production deployment |
| TensorFlow | Developed by Google, production-oriented framework, supports mobile deployment (TensorFlow Lite) | Strong production scalability, deployment on edge devices, industrial adoption | More complex API, less popular in recent research papers |
| Flax (JAX) | Research-oriented framework from Google Research, built on JAX, functional programming style | Very fast on TPUs, highly optimized computation, suitable for advanced research | Smaller ecosystem, fewer pretrained models, less used in standard CVPR pipelines |
Table 2.
Summary of representative studies related to food waste classification, segmentation, and intelligent sorting.
Table 2.
Summary of representative studies related to food waste classification, segmentation, and intelligent sorting.
| Reference | Category | Method | Major Contribution |
|---|---|---|---|
| Bossard et al. (2014) | Food Dataset | Food-101 | Introduced a large-scale benchmark dataset containing 101 food categories, widely adopted for food image classification. |
| Kagaya et al. (2014) | Food Recognition | CNN | Proposed one of the earliest CNN-based food recognition systems for dietary assessment using food images. |
| Wu et al. (2021) | Food Segmentation | FoodSeg103 | Developed a large-scale benchmark with pixel-level annotations for semantic food segmentation. |
| Krizhevsky et al. (2012) | Deep Learning | AlexNet | Demonstrated the superiority of deep convolutional neural networks for large-scale image classification. |
| Simonyan and Zisserman (2015) | Deep Learning | VGGNet | Introduced very deep CNN architectures that significantly improved visual feature extraction and recognition accuracy. |
| Redmon et al. (2016) | Object Detection | YOLO | Presented a real-time single-stage object detector achieving high detection speed and competitive accuracy. |
| Ren et al. (2015) | Object Detection | Faster R-CNN | Introduced Region Proposal Networks (RPNs) for accurate and efficient object detection. |
| He et al. (2017) | Instance Segmentation | Mask R-CNN | Extended Faster R-CNN by incorporating pixel-level instance segmentation masks. |
| Goodfellow et al. (2016) | Deep Learning Theory | Deep Learning | Provided the theoretical foundations of deep neural networks, optimization methods, and representation learning. |
| Nahiduzzaman et al. (2024) | Waste Classification | Deep CNN | Developed an automated waste classification framework using deep learning for efficient recycling and environmental sustainability. |
| Fang et al. (2023) | Smart Waste Management | Artificial Intelligence | Reviewed AI techniques for intelligent waste management, highlighting deep learning and computer vision applications in smart cities. |
| da Costa et al. (2023) | Food Waste Monitoring | IoT & Monitoring | Reviewed real-time monitoring technologies and IoT solutions for reducing food loss and waste across food supply chains. |
| Abusin et al. (2023) | Circular Economy | Food Recovery | Investigated surplus food recovery and redistribution technologies aligned with Circular Economy principles. |
| Garcia et al. (2017) | Food Waste Management | Sustainable Management | Proposed a comprehensive methodology for sustainable food waste management and resource recovery. |
| This work | Deep Learning Food waste Recognition | Hybrid Unet VAE | An Enhanced U-Net–VAE–Stable Diffusion Framework for Intelligent Food Waste Sorting |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.