Related Experiment Video
Updated: Jul 17, 2025

Visualizing Early Infection Sites of Rice Blast Disease Magnaporthe oryzae on Barley Hordeum vulgare Using a Basic Microscope and a Smartphone
Published on: March 17, 2023
Early bread mold detection through microscopic images using convolutional neural network
Panisa Treepong1, Nawanol Theera-Ampornpunt1
1College of Computing, Prince of Songkla University, Phuket, Thailand.
Abstract:
Mold on bread in the early stages of growth is difficult to discern with the naked eye. Visual inspection and expiration dates are imprecise approaches that consumers rely on to detect bread spoilage. Existing methods for detecting microbial contamination, such as inspection through a microscope and hyperspectral imaging, are unsuitable for consumer use. This paper proposes a novel early bread mold detection method through microscopic images taken using clip-on lenses. These low-cost lenses are used together with a smartphone to capture images of bread at 50× magnification. The microscopic images are automatically classified using state-of-the-art convolutional neural networks (CNNs) with transfer learning. We extensively compared image preprocessing methods, CNN models, and data augmentation methods to determine the best configuration in terms of classification accuracy. The top models achieved near-perfect scores of 0.9948 for white sandwich bread and 0.9972 for whole wheat bread.
Insights
Detecting early bread mold is challenging. This study introduces a smartphone-based method using clip-on lenses and convolutional neural networks (CNNs) for accurate, early mold detection on bread.
Area of Science:
- Food science
- Microbiology
- Computer vision
Background:
- Early-stage mold growth on bread is visually undetectable.
- Current spoilage detection methods (visual inspection, expiration dates) are unreliable.
- Existing microbial detection technologies are not consumer-friendly.
Purpose of the Study:
- To develop a novel, consumer-accessible method for early bread mold detection.
- To utilize smartphone microscopy and deep learning for automated spoilage identification.
Main Methods:
- Capturing microscopic bread images (50× magnification) using smartphone clip-on lenses.
- Employing convolutional neural networks (CNNs) with transfer learning for image classification.
- Comparing various image preprocessing, CNN models, and data augmentation techniques.
Main Results:
- Achieved high classification accuracy for early mold detection.
- Near-perfect scores of 0.9948 for white sandwich bread.
- Near-perfect scores of 0.9972 for whole wheat bread.
Conclusions:
- The proposed method offers an effective and low-cost solution for early bread mold detection.
- Smartphone-based microscopy combined with CNNs provides a viable tool for consumers.
- This technology can enhance food safety and reduce food waste.

