SUGISAKAMASANORI

Journal of Robotics, Networking and Artificial Life
Vol. 10(3); December (2023), pp. 257–260
ISSN (Online): 2352-6386; ISSN (Print): 2405-9021
https://alife-robotics.org/jrnal.html

Research Article

Automatic Selection of High-Quality Dried Shiitake Mushrooms
using Machine Learning
Kaoru Ohe1, Ota Hamasuna2, Kakeru Takemura2, Kodai Hasebe2, Fumito Hamakawa2, Bidesh Biswas Biki2, Satoshi Ikeda1,Amane Takei1, Makoto Sakamoto1, Kazuhide Sugimoto3
Faculty of Engineering, University of Miyazaki, Japan
Graduate School of Engineering, University of Miyazaki, Japan3SUGIMOTO Co., Ltd., Japan
12ABSTRACT

ARTICLE INFO

Miyazaki Prefecture is blessed with a rich natural environment, where many mushrooms havegrown wild since ancient times, and the production of dried shiitake mushrooms ranks second inJapan after Oita Prefecture. Our partner, Sugimoto Co., Ltd., is a long-established company
founded in 1970, and sometimes it is necessary to sort over 1 ton. Sorting is still done manually,making it very difficult for employees to sort. The purpose of this study is to determine the qualityof shiitake mushrooms using deep learning and video image processing.

Article History
Received 24 December 2023
Accepted 15 March 2024
Keywords© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

Image classification
Video processing
CNN
OpenCVsoftware

1. Introduction

iVCam
OpenCV

SUGIMOTO Co., Ltd. collects dried shiitake
mushrooms directly from approximately 600 producers
in Takachiho Town. Shiitake mushrooms are at theirpeak in spring and fall, and at their peak, more than 1
ton of shiitake mushrooms can be harvested a day.

softwarePIL
NumPy
Pandas

3. Method

2. Development environment

3.1. Target of selection

In creating this program, we developed it in thefollowing environment (Table 1). In the experiment, astand was fixed to a conveyor belt, and the smartphone
camera was attached to the end of the stand with thecamera facing down.

The following two targets are selected. The one on theleft (Fig. 1) is a good shiitake mushroom, and the oneon the right (Fig. 2) is a bad one.

Table 1 Development environment
OSWindows10

language

Pythoncameramoto g30

Fig. 1 Good item
Fig. 2 Bad item
The following four main examples of bad items arelisted below. Fig. 3 shows a state where the pileus of a
shiitake mushroom part is broken. Fig. 4 shows a state

Corresponding author E-mail: saka2000@cc.miyazaki-u.ac.jp257

in which the pileus of a shiitake mushroom is greatly
deformed. Fig. 5 shows a state where there are holes
caused by insect damage. Fig. 6 shows the pileus of ashiitake mushroom part being rubbed.

Fig. 3 Cracked

Fig. 7 Classification of handwritten digits [2]Fig. 4 Deformed

3.3. Video image processing
In this research, we extract still images of shiitake
mushrooms from moving images and select them usinga model learned by CNN. The video image used in theexperiment was taken from directly above the conveyor
belt, and the shiitake mushrooms were flowing from left
to right. Fig. 8 shows an image of the program beingexecuted.
A still image extracted from a moving image isdisplayed at the top left of the screen. Extract three still
images of the shiitake mushroom using OpenCV. The
extraction location is when the shiitake mushrooms
flow to the left, center, or right side of the screen. The
three images are selected by the model, and the one witha majority of selection results is the final result. At thebottom center of the screen, a "〇" is displayed if theitem is good, and an "×" is displayed if the item is bad.
If the test is in progress, "・・・" is displayed. The
number of good items and bad items is displayed at thetop right of the screen. The count is performed when thefinal result is obtained.

Fig. 5 HoleFig. 6 Rubbed
example of a bad item mentioned this time is the front
side with a pileus of a shiitake mushroom on top.
Although there are characteristics of bad items on theback side as well, this experiment focused on the front
side. The reason why we focused on the front side is thatit takes a huge amount of time to collect samples fromthe front and back sides, and the camera can only
capture either the front or back side due to the sorting
process on the conveyor belt.
3.2. CNN
In the experiment, CNN was used as an algorithm todetermine whether an image was a good item or a baditem. Explain about CNN. CNN (Convolution NeuralNetwork) is a network often used in image recognition
research. This CNN is characterized by being
constructed by stacking layers with several uniquefunctions, such as convolutional layers and poolinglayers [1]. Currently, it is attracting increasing attention
as it is being used in a variety of fields. The image inFig. 7 shows the flow of handwritten digit classification
using CNN. First, handwritten digits are given as aninput image, the features of the image are extracted byconvolution, and the extracted features are aggregatedin a pooling layer. Finally, the fully connected layertransforms the output into a one-dimensional form andoutputs each selection result as a probability.

Fig. 8 Program running
4. Experiment content
An evaluation experiment was conducted to verify
the usefulness of the developed sorting system. They
sort out 17 good and 23 bad mushrooms, and tally up
whether the final result matches the shiitake mushrooms
that were flushed. The number of matches is defined as
the number of correct answers, and the accuracy isdefined as follows. Since the final result is updated
sequentially until the flow is finished, the last displayed
final result is taken as the detection result. The number258

of cards trained on the CNN was 668 for good and 759
for bad, split 8:2 between training and testing.
𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 =decreased more than that of still images. The reason forthe low video accuracy is that the shiitake mushrooms
on the conveyor belt were shaking and an accurate
image could not be obtained, and that the images usedto train the CNN were different from the video. In theimages on the conveyor belt, the brightness and size ofthe shiitake mushrooms within the frame were different.
Future issues include the following.

𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎
× 100(%)
𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑜𝑜𝑜𝑜 𝑠𝑠ℎ𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑚𝑚𝑚𝑚𝑚𝑚ℎ𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑠𝑠ℎ𝑒𝑒𝑒𝑒

5. Experimental result

As a result, the accuracy was low, with 41.1 % of good
items and 91.3 % of bad items. Most of the shiitake
mushrooms thrown away by the model were sorted outas bad shown in Table 2.

Increase the number of learning images
Collecting images of the back side of shiitake
mushrooms● Organizing the still image collection environment
and video shooting environment● Reconstruction of CNN model.
●●Table 2 Program execution results
Good item
bad item
number of17
23
flows
The number of7
21
correct answers
accuracy
41.1%
91.3%

Acknowledgment
I would like to thank my supervisor, Professor Masato
Sakamoto, for his guidance in preparing this thesis. We
would like to thank Kazuhide Sugimoto of Sugimoto
Shoten Co., Ltd. for providing information on shiitake
mushrooms for this study.

The figure below (Fig. 9) shows the selection results of
the CNN model in the still image state. Although theaccuracy of sorting out bad items as bad items was high,the accuracy in sorting out good items as good items
was poor.

References
1.

2.

AIsmiley編集部.”
画像認識でよく聞く「CNN」とは？仕組みや特徴を1から解説 (in Japanese)”.AISmiley.2023.[Online]
https://aismiley.co.jp/ai_news/cnn/,(accessedon2023/12/5).
Saha, S.” A Comprehensive Guide to Convolutional
NeuralNetworks—theELI5way“.Medium.2018.[Online]https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neuralnetworks-the-eli5-way-3bd2b1164a53,(accessedon2023/12/05)

Authors Introduction
Fig. 9 Results of still image selection using CNN

Dr. Kaoru Ohe

She received her Ph.D. degrees from
University of Miyazaki, Japan, in2014. Currently she is an Associate
Professor of the Center for Science andEngineering Education, Faculty ofEngineering.
Her research
isseparation engineering especiallyadsorption hazardous heavy metals and oxyanions

6. Conclusion
This research is still in its early stages, and theexperimental results were poor. First, it is difficult todistinguish between good CNNs at the learning stage.
The point is that it is difficult to classify by looking only
at still images. In fact, for sorting, not only the front side
but also the back side is important. This time, since theexperiment was conducted only on the front side,information on the back side was missing, resulting in adecrease in accuracy. As a result, the accuracy of videos259

Dr. Satoshi Ikeda
He received PhD degree fromHiroshima University. He is anassociate professor in the Faculty ofEngineering, University of Miyazaki.
His research interest includes graphtheory, probabilistic geometry, fractalgeometry and measure theory.

Mr. Ota Hamasuna
He is a master student at Departmentof Computer Science and System
Engineering, University of Miyazaki.
His current research interests areaugmented reality, computer graphics,and so on.

Dr. Amane Takei
He is working as a professor for
Department of Electrical and systems
Engineering, University of Miyazaki,
Japan. His research interest includes
high performance computing forcomputational
electromagnetism,
iterative methods for the solution ofsparselinearsystems,
domaindecomposition methods for large-scale problems. He is amember of IEEE, an expert advisor of IEICE, a delegateof IEEJ, a director of JSST.

Mr. Kakeru Takemura
Currently enrolled in the Master's
course in Mechanical Information
Systems, Graduate School ofEngineering, University of Miyazaki.
His current research theme is museum
support using AR technology.

Mr. Kodai Hasebe

He is a master student at Departmentof Computer Science and System
Engineering, University of Miyazaki.
His current research interests areimage processing, machine learning,and so on.

Dr. Makoto Sakamoto
He is presently a professor in theFaculty of Engineering, University ofMiyazaki. His first interests lay inhydrodynamics and time series
analysis, especially the directional
wave spectrum. He is a theoreticalcomputer scientist, and his current main
research interests are automata theory, languages andcomputation. He is also interested in digital geometry,
digital image processing, etc.

Mr. Fumito Hamakawa
He is a master student at Departmentof Computer Science and System
Engineering, University of Miyazaki.
His current research interests arecomputergraphics,
cellularautomaton simulation, and so on.

Mr. Kazuhide Sugimoto

He was Born in Takachiho town,
Miyazaki Prefecture. After working insales in the food service and apparelindustries, he joined SUGIMOTO Co.,
Ltd., a wholesaler of dried shiitake
mushrooms produced in Takachiho
town, in 2011 after the Great East Japan
Earthquake. In response to the current harsh situation,such as aging contract farmers and sluggish demand for
dried shiitake mushrooms, he decided to protect theproducers by promoting new business development,
which he had experienced in sales. New items developed
using shiitake mushrooms from Takachiho Townshiphave become a standard item at supermarkets anddepartment stores outside the prefecture. In March 2020,
he was appointed as Representative Director, and in 2021,
he was selected as a Small and Medium Enterprise
Supporter and GFP Ambassador.

Mr. Bidesh Biswas Biki
He is master's student in Data Scienceat Department of Statistics from TU
Dortmund. He is an enthusiast ofMachine Learning and Deep Learning.
He has done some research work andindividual projects on supervised
learning especially on “Classification”
and “Regression” techniques. etc.

260