Current Research in Food Science 4 (2021) 724–728
Available online 16 October 2021
2665-9271/© 2021 The Author(s). Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/).
Short Communication
Detection of mold on the food surface using YOLOv5
Fahad Jubayer
a, *, 1
, Janibul Alam Soeb
b, 1
, Abu Naser Mojumder
c
, Mitun Kanti Paul
d
,
Pranta Barua
d
, Shahidullah Kayshar
a
, Syeda Sabrina Akter
a
, Mizanur Rahman
b
, Amirul Islam
b
a
Department of Food Engineering and Technology, Sylhet Agricultural University, Sylhet, 3100, Bangladesh
b
Department of Farm Power and Machinery, Sylhet Agricultural University, Sylhet, 3100, Bangladesh
c
Department of Computer Science and Engineering, Sylhet Engineering College, Sylhet, 3100, Bangladesh
d
Department of Electrical and Electronic Engineering, Sylhet Engineering College, Sylhet, 3100, Bangladesh
A R T I C L E INFO
Keywords:
YOLOv5
Object detection
Mold
Food spoilage
Deep learning
ABSTRACT
The study aimed to identify different molds that grow on various food surfaces. As a result, we conducted a case
study for the detection of mold on food surfaces based on the “you only look once (YOLO) v5” principle. In this
context, a dataset of 2050 food images with mold growing on their surfaces was created. Images were obtained
from our own laboratory (850 images) as well as from the internet (1200 images). The dataset was trained using
the pre-trained YOLOv5 algorithm. A laboratory test was also performed to confrm that the grown organisms
were mold. In comparison to YOLOv3 and YOLOv4, this current YOLOv5 model had better precision, recall, and
average precision (AP), which were 98.10%, 100%, and 99.60%, respectively. The YOLOv5 algorithm was used
for the frst time in this study to detect mold on food surfaces. In conclusion, the proposed model successfully
recognizes any kind of mold present on the food surface. Using YOLOv5, we are currently conducting research to
identify the specifc species of the detected mold.
1. Introduction
Mold is dangerous to human health and a serious threat to food
supply chains. They can grow on a wide range of acidic products, such as
fruits or fruit juices, as well as foods with intermediate moisture content,
like breads and bakery products, that many other microorganisms, such
as bacteria, cannot (Dagnas et al., 2013). Mold spoilage of food products
causes signifcant economic losses as well as diseases by inducing al-
lergies or asthma, or it may be associated with hypersensitivity diseases
like allergic bronchopulmonary aspergillosis or allergic fungal sinusitis
(Borchers et al., 2017). The prompt detection of fungal presence to
prevent further harmful effects is very important in food processing.
Object detection is a signifcant branch in the feld of computer
vision and image processing. Object detection is the process of identi-
fying occurrences of a specifc type of object in images and videos.
Object detection algorithms have received a lot of attention in deep
learning (Pan et al., 2020). Deep learning-based object detection algo-
rithms have advanced rapidly in recent years. These can roughly be
subdivided into two categories. The frst is the R–CNN (region-based
convolutional neural network) family algorithms, which are based on
regional proposals and have representative networks such as R–CNN,
Fast R–CNN, Faster R–CNN, Mask R–CNN, and so on. They are charac-
terized by the use of two-stage methods. Another one is the one stage
algorithms and its representative network, such as the YOLO (you only
look once) series (Wang and Yan, 2021). As object detection technology
has evolved, the YOLO series of algorithms with very high precision and
speed have been used in various scene detection tasks (Kuznetsova et al.,
2020). At the same time, the YOLO system computes all of the image’s
features and predicts all of the objects. YOLOv5 is the ffth generation of
YOLO, written in Python programming language (Thuan, 2021). Ac-
cording to various studies YOLOv5 outperforms the rest of the YOLO
model in terms of accuracy and speed (Kuznetsova et al., 2020; Thuan,
2021; Cengil and Cinar, 2021). In some recent studies, YOLOv5 was used
to detect various objects. The YOLOv5 model was used by Yan et al.
(2021) and Kuznetsova et al. (2020) to detect apples in orchards by
harvesting robots. In both studies, the detection speed and accuracy
were notable compared to other YOLO models. In another study, Cengil
and Cinar (2021) used a pre-trained YOLOv5 algorithm and a dataset of
eight poisonous mushroom species to detect poisonous mushroom
detection. In a number of researches YOLOv5 has been used to detect
* Corresponding author. ;
E-mail addresses: fahadbau21@hotmail.com, jubayer.fet@sau.ac.bd (F. Jubayer).
1
These authors have equal contribution.
Contents lists available at ScienceDirect
Current Research in Food Science
journal homepage: www.sciencedirect.com/journal/current-research-in-food-science
https://doi.org/10.1016/j.crfs.2021.10.003
Received 24 July 2021; Received in revised form 7 October 2021; Accepted 8 October 2021