Professional Documents
Culture Documents
ResNet-18 architecture
Oscar Jhon Vera Ramirez José Emmanuel Cruz de la Cruz Wilson Antony Mamani Machaca
Electronic Engineering Electronic Engineering Electronic Engineering
Universidad Nacional de Moquegua Universidad Nacional del Altiplano Universidad Nacional del Altiplano
Moquegua, Perú Puno, Perú Puno, Perú
overar@unam.edu.pe josecruz@unap.edu.pe wilmamanimac@est.unap.edu.pe
Abstract— The avocado is the fruit with a growing trend in networks, of apples in four grades, grade 1 being the best
production due to its demand in the world market. Peru quality and grade 4 the damaged ones, I use preprocessing that
currently ranks third in the export of Hass type avocados. For consists of segmentation techniques and elimination of
the efficient classification of avocados in good or bad condition, antecedents to extract the area of the fruit, the network I used
a ResNet-18 algorithm applied to a robust agro-industrial plant 90% of data for training and obtained a precision of 85% [4].
was implemented. By using a non-invasive classification we [5] coincides with the image processing to identify the state of
reduce handling damage. The plant consists of a feeder system the avocado leaf, it uses k-means, in a saturation-value space
that continues with a conveyor belt, followed by the image at the superpixel level, to segment the leaf from the uniform
acquisition system with its lighting system, finally, there is the
background from images captured in the field under semi-
classification system formed by the pneumatic system consisting
of pistons that will deposit the avocados in the right containers.
controlled conditions; and a shallow neural network to classify
The treatment of the images was developed in three stages: histograms composed of leaves segmented into 4 states:
acquisition, training, and implementation of the neural network. healthy, iron deficiency, magnesium deficiency, and spider
The Deep Learning algorithm used is ResNet-18, and the mite infestation, the proposed method separates the leaf from
hyperparameters of the convolutional network were adjusted to the background with a mean F score of 0.98 and classifies the
obtain a precision of 98.72%, a specificity of 98.52%, and an F1 blade condition with an overall accuracy of 96.8%. For the
score of 98.08%. classification of the fruit by using the oriented gradient
function histogram and extreme learning machine, it uses the
Keywords— Classification, ResNet-18, Avocado, industrial oriented gradient histogram: Extreme Learning Machine
plant. (ELM), achieving a precision of 95%, in this study an SVM
comparison classifier obtaining a precision of 97.3%; To
I. INTRODUCTION extract the characteristics, the Gradient Histogram (HOG)
There are five hundred species of avocados of which the function was used with 9 containers representing gradient
most appreciated are Hass, Fuerte, Bacon, Reed, Pikerton, angles 0, 20, 40… 160 [6]. [7] maintains that for the maturity
Gween avocados. The worldwide consumption of Hass classification of the fresh palm fruit bunch oil (FFB), an
avocado represents 80% of production, with Peru being the artificial neural network (ANA) was used on a total of 80 oil
third-largest exporter of avocados of this type worldwide. The palm samples, the segmentation method used was k-means,
small and medium-scale agri-food industry has problems with applied on a multilayer perceptron (MLP). One of the types of
properly qualified personnel and long processing times, losing neural networks found in the state of the art in image
the quality of classification due to staff fatigue and classification is ResNet. For example [8] proposes a modified
subjectivities. By automating this process, the percentage of ResNet network through adjustable direct access connections,
quality is increased and the selected time is reduced. Sorting achieving a 3.66% improvement over the original ResNet
technology consists of hardware and software that are network, using the CIFAR 10 dataset to carry out its tests. [9]
integrated to speed up industrial processes. There are several It also proposes a modification of ResNet called LDS-ResNet
methods of fruit classification such as: [1] that for the inspired by residual blocks of linear dynamic systems, the test
detection of mangoes used CCD cameras in a real plant to is carried out on three image databases: CIFAR-10, CIFAR-
detect color, volume, size, shape, and density using artificial 100, and ImageNet, indicating that the proposed system
intelligence techniques, focusing on the physical design of the exceeds the original ResNet system. [10] proposes a
plant. Also [2] for the classification of diseases of banana, modification of a convolutional neural network called
apple, and cherry used convolutional neural networks, this FusionNet for the detection of invasive ductal carcinoma and
classification contains 28 layers that were trained from the subtypes of breast cancer lymphoma, achieving a 5.06%
Imagenet dataset achieving a precision of 78.1%, which is improvement in the F parameters compared to other methods
retrained using the technique of learning transfer. The system such as UNet and ResNet. [11] uses Inception ResNet to detect
proposed by [3] classifies the fruit based on the percentage of polyps, taking as a CVC-Clinic polyp frame database, the tests
infection, the system is developed in TensorFlow, the research are performed not only on images but also on videos. [12]
for classification that explores a convolutional neural network proposes a combination of optimized S transform and a
model taking into account the learning rate, the batch size, and ResNet network to detect from the respiratory sounds: normal,
epoch number, three parameters that influence network wheezing, and adventitious crunching diseases such as
performance. The experimental results show that when other asthma, obstructive pulmonary diseases, pneumonia,
parameters remain unchanged, the errors trained by the bronchitis, achieving an accuracy close to 99%. [13] uses
network model decrease significantly as the learning rate ResNet and VGG to identify people by voice, with the
increases. For the classification by deep convolutional neural VoxCeleb database improving performance by 0.9% over
The system first read the input resized images of 224 x 224
x 3 with the value of 3 representing the three color channels
used. After clustering in the last convolutional layer, it is fed
to the next stage which is a fully connected neural network to
achieve the final classification result.
C. Training
The size of the images was reduced to 224x224 pixels,
geometric transformations such as rotation, and translation
were performed. The learning range was established between
1x10-6 and 1x10-4 to obtain high accuracy and thus condition
the pre-trained network to classify the avocados in the plant.
D. Implementation of the trained network Fig. 6. Classification plant flow chart.
It is the stage responsible for identifying and making
decisions for the classification of each avocado, taking as Fig. 7 shows the number of images classified correctly and
reference the weights established in the neural network incorrectly, having 67 true negatives, 1 false positive, 2 false
acquired in the learning stage. negatives, and 77 true positives.
III. RESULTS AND DISCUSSION Fig. 8 shows the loss vs the learning rate of the ResNet-18
The equipment is turned on and the plant is initialized network, which has a linear learning rate model in the range
through Tia Portal, at the same time the python script is 1e-06 to 1e-01.
started. Subsequently, the avocados that enter the image
acquisition system are fed, which are transferred to the trained
algorithm (ResNet-18 architecture) for classification. The
ResNet-18 architecture sends a signal to the selection stage
composed of infrared sensors and pistons that deposit the
avocado in the appropriate container, performing this entire
process iteratively. In Fig. 6 the described system is detailed
through a flow chart: