A Conceptual Artificial Neural Network Model in Warehouse Receiving Management

The purpose of this research is to explore a suitable Artificial Neural Network (ANN) method applying to warehouse receiving management. A conceptual ANN model is proposed to perform identification and counting of components. The proposed model consists of a standard image library, an ANN system to present objects for identification from the real-time images and to count the number of objects in the image. The authors adopted four basic mechanical design shapes as the attributes of images for shape analysis and pre-defined features; the joint probability from Bayes theorem and image pixel values for object counting is applied in this research. Compared to other ANNs, the proposed conceptual model is straightforward to perform classification and counting. The model is tested by employing a mini image dataset which is industrial enterprise relevant. The initial result shows that the proposed model has achieved an accuracy rate of 80% in classification and a 97% accuracy rate in counting. The development of the model is associated with a few challenges, including exploring algorithms to enhance the accuracy rate for component identification and testing the model in a larger dataset.


I. INTRODUCTION
In today's highly competitive industrial environment characterised by high consumer's requirements for products with high quality, low-profit margins and short delivery times, the industry management team are forced to seek every opportunity to have their business processes at an optimisation level. However, information delays or data errors at the warehouse receiving stage have been problematic, which needs urgent management team attention [1]- [4].
The data at the receiving stage of the enterprise warehouse is the foundation of all supply chain management and company operations. The accuracy is considered one of the essential functions of manufacturing and business enterprises. The data often has a significant overall impact on the whole supply chain profit prediction. To resolve the inaccurate data, it depends on a suitable management model at the warehouse receiving stage [1]- [4].
Several Artificial Neural Network models can be learned to design a conceptual model application in industrial warehouse management. The current state-of-the-art object detection system, Faster R-CNN hypothesises bounding boxes, resamples pixels or features for each box, and applies a high-quality classifier [5]. The datasets of the Faster R-CNN were all from PASCAL VOC, MS COCO and ILSVRC [1]- [3], [6], 7]. Although its accuracy is over 80%, it has been too computationally intensive for embedded systems, even with high-end hardware, and too slow for real-time application in warehouse management [1]- [3], [6]- [8].
This paper is to propose an Artificial Neural Network model, named the ANN-CIC model (Artificial Neural Network for Components Identification and Counting). The model can be applied to perform identification and counting of components at the warehouse receiving management stage. The OpenCV [1] API and the relevant functions were adopted to build the conceptual model to perform classification, identification and counting. The model has two features. The first one is that four basic geometric shapes are introduced as the attributes of the images. The second feature is building a template image library which has a similar function as a sliding window in the complicated CNN model. The image template library is used for classifying and identifying the objects in the inputting photos captured by the camera [1]- [3], [9].
With this minor modification, the proposed model can achieve a relatively higher accuracy, which meets the design goal.
The rest of the paper is organised as follows: Section II proposes the ANN-CIC model. Section III presents the experimental results. Section IV discusses the related work, and the final Section V concludes the paper and indicates the future work.

A. Proposed Model Architecture
The model consists of an industrial camera and a workstation. The workstation includes four subsystems: an input images transforming system, a built-in template images library, an image feature extraction system, and an identification and counting system. The output of the ANN-CIC system can be interfaced with the enterprise management system. Fig. 1 illustrates the proposed ANN-CIC model architecture.

B. Principle of the ANN-CIC Model
To improve the classification accuracy of objects, a standard image components database is introduced. an objects classification function, is adopted to perform classification of images. The Bayes classifier analyses and compares a series of standard templates with the input image based on their basic shapes. It calculates the maximum probability of the input image. Then the classifier concludes the class of the input image, i.e., the category of the component in the image.  The contours of industry components usually consist of several basic shapes [13], e.g., rectangles, circles, triangles and polygons. In this research, these four primary attributes are defined to represent the components (refer to Fig. 2).  Depending on the number of basic shapes present in an image, any component can be represented by Equation (1).
where X represents the image component category, x illustrates the numbers of each attribute present, and i is from 1 to 4, x1 is the number of rectangles, x2 is the number of circles, x3 is the number of triangles, x4 is the number of polygons.
The probability of the input image and pre-template image in the library is calculated by using the Bayes theorem. Bayes theorem provides a way of calculating posterior probability P(Y|X) from P(Y) and P(X|Y) where Y represents the test image.
The multiple variable Bayes equation is as below: ( | ) is the posterior probability of given has occurred. P(Y∩ ) is the probability of occurred, and X occurred. P(X) is the probability of .
The prior probability of each attribute p(xi) can be defined based on empirical and statistics.
Based on 20 stochastic industrial components, the prior probabilities of the four shapes ( ) are calculated as below: According to the inputted image shape analysis, the input image classification is calculated by using the Bayes theorem Equations (1), (2) and (3), which are adopted to calculate when the quantity of the four shapes is different from the prior probability. The joint probability calculation is as below: Equation (5) is used for calculating the probability of the four shapes of the images, including both input images and template images.
Equation (6) is to calculate the joint probability variance between input images and the template images.
Min (Aj)=P(Kj)-P(Tj) (6) where P(Kj) is defined as the input image's joint probability and P(Tj) is defined as the template image's probability. The Coding procedure is as follows: If the output label from Equation (6) is the same as the input image label, the classifier is "True", and it is denoted 1; if the output label is not the same, the classifier is "False", and it is denoted as 0. The classifier prediction rate is defined as follows: P= Number of True/ (Number of True + Number of False) (7) After the classification system has judged the class of the input image, the subsequent counting system activates the below equations which undertake the pixel-based calculation: where Na is the actual number of objects.
where Nb is the rounded counting number of objects in the input image, Max. P is the maximum white pixel value and Max. p is the maximum white value of the template image.
where Pc is the counting accuracy rate, N is the actual existing number of the input image.

C. Modified ANN-CIC Model
The proposed ANN-CIC model is based on supervised machine learning algorithms [14]. According to mechanical design, most parts consist of basic shapes. Therefore, four basic shapes can be introduced to perform shape and contour analysis; then the process calculates the numbers of the four attributes (i.e., the shapes) in the images. It is similar to storing a series of different sized bounding boxes in advance. The pre-built template image library can be used as predefined criteria when the system performs identification and counting [15].
Five groups of images are used to illustrate the working process of the proposed model. The top line in Fig. 5 are the input images and the bottom line in Fig. 5 are the pre-template images in the library.  The top line in Fig. 6 illustrates the processed input images and the bottom line in Fig. 6 are the processed template images. When an image is inputted, the system conducts contour analysis based on the four basic shapes and compares with the built-in template image in the library. The image processing includes Grayscale, Binary, Gaussian Filter, Colour Threshold Value and Contour Feature Extraction.
The main programs for object detection and counting are described as below.
Identification and classification: The system performs contour analysis by using four shapes, compares the joint probability between the input image and the standard pretemplate image library, assesses the comparison result, and generates the input image class as illustrated in Fig. 4. When the joint probability deviation is the minimum, the template image class is the input image's target class. Then we reach the goal of classifying the category of the component [16], [17].
Objects counting: After finishing the component identification, the model calculates the number of objects in the input image. This counting system is based on contour pixel values. Firstly, the colour of the template image and the input image are converted to a grey colour. Secondly, the GaussianBlur algorithm [1], [12], is used for setting an appropriate brightness value between 0 and 255 to get the expected white and black component image. The three functions adopted from OpenCV API are as follow [1]- [3], [13], [18]- [20].

III. EXPERIMENT
Experiments and verification of the conceptual model were performed through five groups of input images and their corresponding template images.

A. The Conceptual Model System Required
This conceptual model verification executes at the standard desktop computer, Intel(R) Core, TM i5-8500 CPU @ 3.00GHz, Installed Memory: 16GB.

B. Classification Subsystem Verification
Five template images in the library and the corresponding five input images are selected to compare their joint probability. Table I illustrates the inputted test images and template images' joint probabilities, which is based on Fig. 4 coding process and Equations (5), (6) and (7). Fig. 7 shows the two kinds of raw image probabilities comparison. The horizontal axis represents the five groups parts, and the vertical axis represents the joint probabilities.
When verifying the classification algorithm, the image noise was not removed for the first time, and the accuracy is only 60%.    After the image was processed (Fig. 6), and the parameters are fine-tuned, the experiment data results are shown in Table  II. Fig. 8 shows the joint probability calculation results. The horizontal axis represents the five groups' parts, and the vertical axis represents the joint probabilities.
Based on Table II and Fig. 8, the prediction accuracy rate can reach 80%, which has demonstrated that the outcomes by using the processed images are better than a raw image test.

C. Counting Verification
The five group images in Fig. 5 and Fig. 6 are used to perform counting model verification. The top line of five images are the test images to be identified (refer to Fig.5 and Fig. 6). The number of components in these images also need to be counted. The bottom five images are the corresponding templates in the standard image library. Two groups of images are selected to illustrate the object counting method by Python coding: they are Part 1_Input and Part 1_Template, Part 2_Input and Part 2_template shown in Fig. 6.  International Journal of Machine Learning and Computing, Vol. 11, No. 2, March 2021 Fig. 9 and Fig. 10 are histography of Part 1_Input and Part 1_Template. Fig. 11 and Fig. 12 are histography of Part 2_Input and Part 2_Template. The next step is to calculate the number of components in the input images. According to the pixel values obtained for these images, the number of components can be calculated by using Equation (8) and Equation (9).
The accuracy is calculated by using Equation (10). Table  III presents the experiment results. The experiment results demonstrate that the proposed ANN-CIC counting detector model can achieve an average accuracy of 96.8%. Fig. 11. Histography of input image (part 2_ input).

D. Morphological Transformation Verification
To verify the proposed model, a morphological image transformation is conducted. Three types of morphological change, namely Resize, Rotation and Warp, are used in the verification experiment. Fig. 13 shows the morphological images of Part 1. Fig. 14 presents the morphological images of Part 3. Table IV shows the verification results for the morphological images.
According to Table IV, the accuracy rates for rotation and warp morphological images are 81.62% and 90.26% respectively, which are moderately acceptable. However, the model did not achieve a satisfactory accuracy for resized images. Therefore, for this conceptual model, it is suggested that the input images and the template images should take the same camera parameters to achieve better accuracy.

IV. RELATED WORK
The current data collection at the warehouse receiving stage is still controlled manually in the industrial field. It is worthy for researchers to develop a new model to improve data collection.
The Faster R-CNN approach, first introduced in MultiBox for learning objectives, has improved in both accuracy and execution time [7]. However, it needs a fine-tune at all layers from end to end for minimising the loss of both confidence and bounding box regression. Moreover, it requires thousands of images to train the model, which is very computationally expensive and time-consuming [1], [2], [7], [16], [17], [20], [23], [24]. SSD [3] is based on Faster R-CNN but changed MultiBox into a single box to track and detect objects; the training and testing efficiency have much improvement. SSD adopted a single box and based on a feed-forward convolutional network that produces a fixed-size collection of bounding boxes and scores for the presence of object class instances in those boxes. The core of the SSD approach is predicting category scores and box offsets for a fixed set of default bounding boxes [3]. SSD single box provided a foundation of the proposed ANN-CIC model for the building of a classifier and counting detector. The pre-built template image library of the ANN-CIC model is similar to the default bounding box of the SSD.
The other sets of methods, namely Template Matching, Shape Matching, Contour Extraction, and Corner Detection, are also related to the model proposed in this paper [1]- [3], [7], [14]- [17]. That is, the image feature extraction process is involved. There are a series of algorithms in OpenCV API that can be used to extract, describe and match the features. The ANN-CIC classification method falls in this category because it proposed to build a standard image library as the default box to match and compare it with the input image. However, our approach is focusing on shape, contour and pixel bins analysis to reach classification and counting of objects.

V. CONCLUSION AND RECOMMENDATIONS
This paper proposed a model for the classification and counting of components for warehouse management at the receiving stage. A vital feature of the model is introducing four basic shapes and building the pre-built image library. The architecture allows us to perform straightforward input image feature extraction effectively and efficiently. Although it is a laboratory model, it demonstrated a high counting accuracy rate and is worthy of further exploration by using a larger industrial image dataset.
The proposed ANN-CIC conceptual classification and counting model has achieved an 80% accuracy rate in classification and a 97% accuracy rate in counting. The average accuracy rate is 78%, which outperformed SSD with an accuracy of 75.1% mAP. Regarding this warehouse model, a standard desk PC can perform the test and satisfy the real-time requirement. It is believed that this model can be used as a block of the larger warehouse management systems. This model is still associated with a few challenges. It is necessary to study suitable algorithms to improve the accuracy rate of object classification and counting. Another challenge is to detect, classify and count the objects in the images that are occluded by other objects. Furthermore, the model needs to be trained and verified by a larger industry-related image dataset. The contributions of this study can be summarised as below:  Four basic shapes are introduced to perform shape analysis.  A standard template image library is proposed to replace the bounding box, which has improved both the training time and the detection accuracy of components.  The classification is predicted by comparing the correlation coefficient between template parts in the image library and input images.
 The counting detector is implemented by the colour pixel value calculation of the images.