Pith. sign in

REVIEW 4 major objections 4 minor 6 references

The smart-fridge paper's own reliability curves show BCE beats the focal-loss variants it proposed for calibration.

Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →

A smart fridge system uses YOLO and compares BCE, focal, and adaptive focal losses, finding BCE best calibrated despite the abstract's claim that focal loss fixes calibration.

T0 review reviewed 2026-08-04 challenge →

load-bearing objection The abstract promises a focal-loss calibration fix, but the paper's own results show that BCE calibrates better and the focal variants are underconfident; the experimental reporting is too thin to trust the numbers. the 4 major comments →

arxiv 2509.07400 v1 pith:GILRS75W submitted 2025-09-09 eess.SY cs.CVcs.SEcs.SY

A smart fridge with AI-enabled food computing

classification eess.SY cs.CVcs.SEcs.SY
keywords smart fridgeIoT food monitoringYOLO object detectionfocal loss calibrationmodel calibrationbinary cross entropyESP32-CAMfood computing
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper describes a smart-fridge system that photographs the fridge interior with an ESP32-CAM, detects and counts vegetables and fruits with a YOLO model, streams results over MQTT to a cloud backend, and presents them on a web dashboard with temperature and humidity history. The authors' stated goal is to make the model's confidence scores trustworthy by replacing plain loss with a calibration-aware variant of focal loss. In the reported experiments, the opposite happens: both focal-loss variants produce underconfident predictions that sit far from the ideal calibration line, while binary cross-entropy (BCE) tracks the diagonal closely. So the paper's contribution is a working end-to-end fridge-monitoring pipeline plus a loss comparison whose clear winner—BCE—contradicts the abstract's claim that focal-loss calibration improved reliability. A sympathetic reader learns that confidence calibration must be evaluated on the actual task, not assumed from a loss function's design.

Core claim

The authors report building a complete pipeline—ESP32-CAM image capture, YOLOv7 detection on a YOLO UNO board, MQTT publish-subscribe to the CoreIoT cloud, a NodeJS/MongoDB backend, and a ReactJS dashboard—that detects and counts vegetables and fruits in a refrigerator and charts temperature and humidity over time. Their stated technical contribution is a calibration-aware focal loss intended to correct overconfident predictions; the reliability diagram they present shows instead that CALFOCAL and ADAFOCAL are underconfident, while the BCE-trained model's confidence curve hugs the ideal diagonal. Taken on the paper's own terms, then, the system works end to end and reaches mAP@0.5 of 0.769 a

What carries the argument

The key mechanism is the reliability/calibration curve (predicted confidence versus actual accuracy) used to judge three loss objectives: CALFOCAL, a calibration-aware focal loss that down-weights easy examples through a focusing parameter; ADAFOCAL, an adaptive variant that adjusts the focusing parameter per class from validation error; and plain BCE, which scores each class independently. The curve's diagonal marks perfect calibration, so the distance from that line is the paper's yardstick for trustworthiness. The supporting hardware/software path—ESP32-CAM to YOLO UNO to MQTT broker to cloud, then to NodeJS/MongoDB and ReactJS—is what makes the comparison an end-to-end fridge monitoring

Load-bearing premise

The loss comparison collapses if the dataset was not split cleanly between training and testing; the paper does not say how big the dataset is, what classes it contains, or how the split was made.

What would settle it

Retrain the same YOLOv7 model on a fixed, publicly documented vegetable/fruit dataset with a seeded random split, using identical hyperparameters for BCE, CALFOCAL, and ADAFOCAL, and plot the reliability curves on the unseen test split; if BCE no longer lies closest to the diagonal, or if the focal variants move onto it, the paper's reported ordering fails.

Watch this falsifier. Get emailed when new claim-graph text bears on it.

If this is right

  • A smart fridge can run on a low-cost ESP32-CAM plus a small YOLO board, giving households automatic per-minute inventory counts and remote web access.
  • Combining object counts with temperature and humidity history enables alerts when storage conditions threaten food quality, supporting waste reduction.
  • For food detection, BCE-trained confidence values should be preferred when users act on probability-based warnings, because BCE sits closest to the ideal calibration line.
  • Focal-loss variants should not be presumed to improve calibration in this setting; their underconfidence means extra post-hoc calibration or tuning would be required.
  • The mAP@0.5 of 0.769 after focal-loss training indicates the detector can handle common classes such as apples, water spinach, and purple sweet potato, though less-consistent classes like beetroot and spinach need more data.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The abstract credits the focal-loss variant with improving calibration, whereas the reliability curves and Section 5 say the focal variants are underconfident and BCE is best; the curves are the stronger evidence, so any citation of this paper for 'focal loss calibrates better' would misread it.
  • Because no dataset size, class distribution, or train/validation/test split is reported, a controlled rerun on a public food dataset with a seeded split is the cheapest way to confirm whether BCE's calibration advantage is real or an artifact.
  • Occluded and layered items are the stated hard case; counting accuracy would likely improve more from temporal aggregation across the per-minute frames than from swapping loss functions.
  • A practical next step is to pair the best-calibrated BCE detector with post-hoc temperature scaling and uncertainty estimates, giving users explicit confidence levels on inventory counts and spoilage alerts.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit.

Referee Report

4 major / 4 minor

Summary. The paper presents an IoT smart-fridge system built around an ESP32-CAM, a YOLO-based detector running on a YOLO UNO board, MQTT/HTTP communication, MongoDB storage, and a web dashboard. The authors evaluate three loss functions for the detector: standard focal loss (referred to as CALFOCAL), adaptive focal loss (ADAFOCAL), and binary cross-entropy (BCE). The abstract claims that a focal-loss variant mitigates over-confidence and under-confidence and that robust functional calibration significantly improves detection reliability. However, Section 5 reports the opposite: CALFOCAL and ADAFOCAL are underconfident and BCE achieves better calibration. The manuscript lacks dataset size, class distribution, train/validation/test split, and key hyperparameters, and it provides only qualitative calibration curves without quantitative metrics.

Significance. If the reported comparative findings were properly supported, the observation that focal-loss variants can produce underconfident predictions while BCE calibrates better in a food-detection task would be a modest but potentially useful negative result for practitioners. The system-level integration (ESP32-CAM, YOLO UNO, MQTT, web dashboard, temperature/humidity logging) is a tangible engineering contribution. However, the central claimed calibration benefit of the focal-loss variant is unsupported by the paper's own results, and the missing dataset and training details prevent reproducibility. There are no machine-checked proofs or released code; the evidence is entirely empirical and under-reported.

major comments (4)
  1. [Abstract and Section 5] The abstract claims that 'we implement a variant of focal loss that mitigates over-confidence and under-confidence' and that 'robust functional calibration significantly improves detection reliability.' Section 5 states the opposite: 'CALFOCAL and ADAFOCAL demonstrate underconfidence... despite their design to handle class imbalance and calibration,' and 'BCE achieves better calibration.' This is a direct internal contradiction between the paper's stated contribution and its own reported results. The central claim of the paper is therefore not supported; the abstract and introduction must be rewritten to present the work as a comparative evaluation in which focal variants fail to improve calibration, or the method must be changed and re-evaluated.
  2. [Section 4.1] The dataset is described only as 'a combination of real images captured by the ESP32-CAM and additional images sourced from online repositories.' No size, class counts, train/validation/test split, annotation protocol, or augmentation details are given. Section 4.2 states that 50 epochs were used, but the optimizer, learning rate, batch size, image resolution, gamma in Eq. (1), lambda in Eq. (2), and any temperature-scaling parameters mentioned in the abstract are not reported. Without these details, the reported mAP@0.5=0.769 and the calibration curves are not reproducible and the comparison across loss functions cannot be assessed.
  3. [Abstract and Section 3] The abstract promises 'adaptive, class-wise error calibration via temperature scaling,' but no temperature scaling is defined or implemented in Sections 3–4. The name CALFOCAL is used but never defined; the only equations are standard focal loss (Eq. 1) and adaptive focal loss (Eq. 2). No new loss variant is introduced, despite the abstract's wording. A reader cannot tell what method is actually being evaluated or how 'calibration-aware' focal loss differs from standard focal loss.
  4. [Section 4.2 and Figures 9-10] Calibration is assessed only qualitatively through reliability diagrams. No Expected Calibration Error (ECE), Maximum Calibration Error (MCE), or confidence histogram is reported, and no error bars or multiple-seed runs appear anywhere. The statement that focal-loss models are 'severely underconfident' is therefore not quantitatively supported. Additionally, the text says the precision-recall curve is shown in Figure 9, but Figure 9 is the reliability/calibration curve; Figure 8 is the precision-recall curve.
minor comments (4)
  1. [Section 4.2] The claim that several classes reach 'over 0.450 average precision' is an oddly low threshold in light of the reported mAP@0.5=0.769. Clarify whether these are per-class AP values at IoU 0.5 and consider reporting a less trivial threshold.
  2. [Figures 6-7] Figures 6 and 7 ('Before applying focal loss' and 'After applying focal loss') are not called out in the text and appear in the related-work section; move them to Section 4.2 and reference them explicitly.
  3. [References] Reference [2] (joint computation offloading) appears unrelated to the smart-fridge topic; reference [4] is given as an arXiv PDF link rather than an abstract page. Please verify and format all references consistently.
  4. [Throughout] There are typos such as 'as show in Figure 9' and missing spaces in author names (e.g., 'andKhanh'). The capitalization of 'Focal Loss'/'focal loss' is inconsistent.

Circularity Check

0 steps flagged

No circularity: the paper empirically compares existing loss functions; its abstract/conclusion contradiction is a correctness issue, not a circular derivation.

full rationale

The paper does not contain a derivation that reduces to its own inputs. It implements three existing loss functions (focal loss, adaptive focal loss, and binary cross-entropy) and reports an empirical comparison of their calibration on a YOLO-based detector. The published equations are standard external definitions (Eqs. 1–2), and the references point to outside work rather than to the authors' own prior results. No fitted parameter is relabeled as a prediction, no uniqueness theorem is imported from self-citation, and no ansatz is smuggled in through an author-overlapping citation. The only serious defect is that the abstract's headline claim—that the implemented focal-loss variant mitigates over-confidence and under-confidence—is contradicted by the paper's own Section 5 and Figure 9, which state that CALFOCAL and ADAFOCAL demonstrate underconfidence and that BCE achieves better calibration. This is an internal inconsistency between the stated contribution and the reported results, not a circularity in the mathematical or empirical chain. Similarly, the underspecified dataset description in Section 4.1 undermines evaluation quality, but it does not make the argument circular. Therefore the circularity score is 0.

Axiom & Free-Parameter Ledger

3 free parameters · 3 axioms · 2 invented entities

The central claim rests on the fairness and validity of the training and evaluation setup, none of which is documented. Hyperparameters gamma and lambda are unstated. The named losses CALFOCAL and ADAFOCAL are introduced without definitions, so they act as ad hoc entities.

free parameters (3)
  • Focal loss focusing parameter gamma
    Not reported in the paper; Eq. 1 defines it but no value is given, and it directly affects the calibration results.
  • Adaptive focal loss coefficient lambda
    Not reported; Eq. 2 includes it and the adaptation dynamics depend on it.
  • Temperature scaling parameter (mentioned in abstract)
    The abstract says the approach incorporates temperature scaling, but the body never describes it or reports a value; it is an unstated free parameter if used.
axioms (3)
  • domain assumption YOLO from Ultralytics is a valid object detector for this task
    The paper uses it as given with no comparison to other detectors; Section 4.1.
  • domain assumption The training dataset is representative of real fridge conditions and properly split
    Section 4.1 does not describe dataset size, class distribution, or split.
  • domain assumption All three loss models were trained under identical conditions except loss
    No training configuration is reported, so the fairness of the comparison is assumed.
invented entities (2)
  • CALFOCAL no independent evidence
    purpose: Presented as the proposed calibration-aware focal loss variant, but no unique definition is given; the paper only quotes standard focal loss from [3].
    No code, equation, or experimental protocol distinguishes it from prior focal loss.
  • ADAFOCAL no independent evidence
    purpose: Presented as adaptive focal loss, but the paper quotes Eq. 2 from [4] and does not describe how it is adapted in this work.
    No new implementation details are provided.

reviewed 2026-08-04 · how reviews work

0 comments
Cite this review

Pith. "Pith review of A smart fridge with AI-enabled food computing." pith.science (2026). https://pith.science/paper/GILRS75W

@misc{pith2026250907400,
  author       = {Pith},
  title        = {Pith review of: A smart fridge with AI-enabled food computing},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/GILRS75W}},
  note         = {Machine review of arXiv:2509.07400}
}
Share X Bluesky LinkedIn Reddit HN
read the original abstract

The Internet of Things (IoT) plays a crucial role in enabling seamless connectivity and intelligent home automation, particularly in food management. By integrating IoT with computer vision, the smart fridge employs an ESP32-CAM to establish a monitoring subsystem that enhances food management efficiency through real-time food detection, inventory tracking, and temperature monitoring. This benefits waste reduction, grocery planning improvement, and household consumption optimization. In high-density inventory conditions, capturing partial or layered images complicates object detection, as overlapping items and occluded views hinder accurate identification and counting. Besides, varied angles and obscured details in multi-layered setups reduce algorithm reliability, often resulting in miscounts or misclassifications. Our proposed system is structured into three core modules: data pre-processing, object detection and management, and a web-based visualization. To address the challenge of poor model calibration caused by overconfident predictions, we implement a variant of focal loss that mitigates over-confidence and under-confidence in multi-category classification. This approach incorporates adaptive, class-wise error calibration via temperature scaling and evaluates the distribution of predicted probabilities across methods. Our results demonstrate that robust functional calibration significantly improves detection reliability under varying lighting conditions and scalability challenges. Further analysis demonstrates a practical, user-focused approach to modern food management, advancing sustainable living goals through reduced waste and more informed consumption.

Figures

Figures reproduced from arXiv: 2509.07400 by Du Nguyen Hao Hong, Khanh Dinh Ba, Khoa Tran Nguyen Anh, Khue Nong Thuc, Tai Nguyen Huy.

Figure 1
Figure 1. Figure 1: System design diagram To enable efficient communication between distributed components, the system adopts a Publish–Subscribe ar￾chitecture using the MQTT protocol. This approach de￾couples components by allowing them to communicate asynchronously via a central broker, enhancing scalabil￾ity and flexibility. In this setup, the YOLO Uno module acts as a publisher, analyzing image data and detect￾ing predefi… view at source ↗
Figure 2
Figure 2. Figure 2: Design diagram of module 1 efficiently. In addition to detecting objects, the YOLO UNO board also collects temperature data from sensors placed inside the fridge. This temperature data, along with the detected object counts, is formatted into a struc￾tured JSON message and sent to the CoreIoT cloud. The MQTT protocol is used for transmission between the YOLO board and CoreIOT, ensuring lightweight and effi… view at source ↗
Figure 4
Figure 4. Figure 4: Design diagram of module 3 The interface consists of multiple components, including a real-time display of the latest fridge images, a table summarizing the detected vegetables and their quantities, and a temperature and humidity visualization graph. The images displayed on the web interface include bounding boxes, making it easy for users to identify the detected objects. The table provides a structured v… view at source ↗
Figure 3
Figure 3. Figure 3: Design diagram of module 2 Once the data is received, it is parsed and stored in a struc￾tured format within a database. The database is designed to efficiently store historical fridge data, enabling users to track changes over time. The system ensures that each received image is correctly linked with its corresponding object detection results and temperature values. This module is essential for maintainin… view at source ↗
Figure 5
Figure 5. Figure 5: Use case diagram of the whole system 3 [PITH_FULL_IMAGE:figures/full_fig_p003_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: Before applying focal loss (epoch = 50) [PITH_FULL_IMAGE:figures/full_fig_p004_6.png] view at source ↗
Figure 7
Figure 7. Figure 7: After applying focal loss (epoch = 50) 4 Numerical results and discussion 4.1 Testbed setup The detection feature is implemented using Python, Py￾Torch, and the Ultralytics YOLO model [6]. The dataset utilized for training and testing is a combination of real images captured by the ESP32-CAM and additional im￾ages sourced from online repositories. These images are pre-processed using Roboflow, a tool desig… view at source ↗
Figure 9
Figure 9. Figure 9: Reliability/Calibration curve of 3 models ap￾plied focal loss, adaptive focal loss, and BCE The calibration curve compares the alignment between predicted confidence and actual accuracy across three loss functions. The BCE model shows relatively good calibration, with predictions following the diagonal line of perfect calibration. In contrast, models using focal loss (CALFOCAL) and adaptive focal loss (ADA… view at source ↗
Figure 10
Figure 10. Figure 10: Comparison of under-confidence and over￾confidence between models We connect the ESP32-CAM to the system to perform end-to-end testing. The camera captures real-time im￾ages of the refrigerator’s interior, which are then pro￾cessed by the YOLO detection model. The detection results, including annotated images and object quantities, are displayed on the web interface. As shown in Fig￾ure 11 and [PITH_FULL… view at source ↗
Figure 11
Figure 11. Figure 11: The website page displays the real-time ob￾ject detection with ESP32-CAM [PITH_FULL_IMAGE:figures/full_fig_p006_11.png] view at source ↗
Figure 12
Figure 12. Figure 12: Home page after signing in successfully The system effectively visualizes both temperature and humidity inside the refrigerator. These values are not only displayed in real time but are also recorded and presented through interactive line charts, which show in [PITH_FULL_IMAGE:figures/full_fig_p006_12.png] view at source ↗
Figure 13
Figure 13. Figure 13: Graphs of temperature and humidity inside the fridge 5 Conclusions This study presents the deployment of an AI-driven sys￾tem for managing food inventory in a refrigerator through a web-based platform. To enhance the model’s calibra￾tion and performance, we integrated and evaluated three loss functions: Binary Cross-Entropy (BCE), Calibration￾aware Focal Loss (CALFOCAL), and Adaptive Focal Loss (ADAFOCAL)… view at source ↗

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

6 extracted references · 5 canonical work pages · 1 internal anchor

  1. [1]

    Global food losses and food waste

    Jenny Gustavsson Christel Cederberg Ulf Sonesson and Robert van Otterdijk Alexan- dre Meybeck. Global food losses and food waste. Technical report, Food and Agricul- ture Organization of the United Nations, 2011. Retrieved from https://openknowledge. fao.org/server/api/core/bitstreams/ 10388b16-5f1a-45d0-b690-e89bb78d33bb/ content

  2. [2]

    Joint com- putation offloading, sfc placement, and resource al- location for multi-site mec systems

    Phuong-Duy Nguyen and Long Bao Le. Joint com- putation offloading, sfc placement, and resource al- location for multi-site mec systems. In2020 IEEE Wireless Communications and Networking Confer- ence (WCNC), pages 1–6. IEEE, 2020

  3. [3]

    L. Tao, M. Dong, and C. Xu. Dual focal loss for calibration. InProceedings of the 40th Interna- tional Conference on Machine Learning (ICML), volume 202 ofProceedings of Machine Learning Research. PMLR, 2023. Retrieved from https: //arxiv.org/abs/2305.13665

  4. [4]

    Ghosh, T

    A. Ghosh, T. Schaaf, and M. Gormley. Adafo- cal: Calibration-aware adaptive focal loss, 2023. Retrieved from https://arxiv.org/pdf/2211. 11838. 6 A SMART FRIDGE WITH AI-ENABLED FOOD COMPUTING

  5. [5]

    Binary cross entropy with deep learning technique for image classification.International Jour- nal of Advanced Trends in Computer Science and Engineering, 9(4), 2020

    Dr.A.Usha Ruby, Prasannavenkatesan Theerthagiri, Dr.I.Jeena Jacob, and Dr.Y .Vamsidhar. Binary cross entropy with deep learning technique for image classification.International Jour- nal of Advanced Trends in Computer Science and Engineering, 9(4), 2020. Retrieved from https://www.warse.org/IJATCSE/static/ pdf/file/ijatcse175942020.pdf

  6. [6]

    Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detec- tors, 2022

    Chien-Yao Wang, Alexey Bochkovskiy, and Hong- Yuan Mark Liao. Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detec- tors, 2022. Retrieved from https://arxiv.org/ abs/2207.02696. 7

This paper was first reviewed by deepseek-v4-flash on August 4, 2026.