# Efficient Object Detection Algorithm in Kitchen Appliance Scene Images Based on Deep Learning

Authors: Manhuai Lu; Liqin Chen
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

The accuracy of object detection based on kitchen appliance scene images can suffer severely from external disturbances such as various levels of specular reflection, uneven lighting, and spurious lighting, as well as internal scene-related disturbances such as invalid edges and pattern information unrelated to the object of interest. The present study addresses these unique challenges by proposing an object detection method based on improved faster R-CNN algorithm. The improved method can identify object regions scattered in various areas of complex appliance scenes quickly and automatically. In this paper, we put forward a feature enhancement framework, named deeper region proposal network (D-RPN). In D-RPN, a feature enhancement module is designed to more effectively extract feature information of an object on kitchen appliance scene. Then, we reconstruct a U-shaped network structure using a series of feature enhancement modules. We have evaluated the proposed D-RPN on the dataset we created. It includes all kinds of kitchen appliance control panels captured in nature scene by image collector. In our experiments, the best-performing object detection method obtained a mean average precision mAP value of 89.84% in the testing dataset. The test results show that the proposed improved algorithm achieves higher detecting accuracy than state-of-the-art object detection methods. Finally, our proposed detection method can further be used in text recognition.


---

## Body

## 1. Introduction

Object detection is a fundamental issue in the field of computer vision and image processing and has been a hotspot of theoretical and applied research in recent years, with a wide range of applications. The main goal of object detection is to precisely predict the class and location information of various targets in an image or image sequence. The traditional target detection algorithm relies more on manually designed features. However, because of using a sliding window to select candidate bounding boxes, it has serious window redundancy problems and its feature extraction method has poor generalization performance. Moreover, twiddly steps of the traditional target detection algorithm will cause slow detection speed and poor real-time performance. With the rapid development of deep learning, deep learning-based target detection algorithms have proposed solutions to extract image features by using convolution neural networks. Therefore, both the detection accuracy and the detection speed have been greatly improved.Object detection based on kitchen appliance scene not only attaches great importance to the natural scene object recognition that cannot be ignored, but it is also one of the most essential factors in the internet of things [1–5]. Object detection based on kitchen appliance scene images often faces different types and degrees of uncertainty interference, which seriously affects the accuracy of object detection. On the one hand, the scene itself has some internal interference such as invalid edges and pattern information unrelated to the object of interest. Specifically, these disturbances may be boundary boxes or intuitive patterns that express functional meaning. On the other hand, the scene is also subject to serious external interference, such as various levels of specular reflection, uneven lighting, and spurious lighting. In addition, kitchen appliance scenes as a typical application also need to complete the task of detecting arbitrary symbols, such as Chinese texts and rectilinear symbols, which are positioned in the form of arrays on two-dimensional surfaces. Moreover, the position spacing and aspect ratio between different object regions is not a fixed value. The proposed improved object detection methods aim to identify object regions scattered in various areas of complex appliance scenes with uncertain position spacing and aspect ratio quickly and automatically.Inspired by some state-of-the-art object detection algorithms, we designed a text location algorithm based on improved faster R-CNN, which considers all line patterns as potential targets and specifically considers three categories of line patterns, including text instances (text), the plus symbol “+” (add), and the minus symbol “−” (sub), as illustrated in Figure1.Figure 1
Examples of the three categories of line patterns employed during the proposed method.In this paper, we improve the RPN in faster R-CNN. We call it D-RPN. The main contributions of D-RPN are two-folded: (1) feature enhancement module. We design a multiscale convolution network structure for feature extraction and reinforcement, which addresses the limitation of feature extraction capability of the RPN that used single-scale convolution. Concretely, the feature enhancement module adopts convolution kernel at different scales to the feature map and extracts features at different scales. Then, it fuses and concatenates these features on the channel dimension, ultimately strengthening the expression of features. (2) The design of U-shaped network reconstruction. Using those multiscale convolution network structures, we construct a U-shaped network by max pooling layers and upsampling. The U-shaped network introduces the idea of UNet’s [6] network architecture design. We replace the original RPN structure by concatenating multiple feature enhancement module in a U-shaped network structure. In this way, it not only deepens the depth of the network, extracts deeper features, but also learns more parameters.However, we note that the field of target detection based on deep learning is presently well developed with numerous approaches, including R-CNN-based object detection methods, SSD-based object detection methods, and YOLO-based object detection methods. Therefore, we must first discuss these previous methods before outlining the presently proposed object detection method. Accordingly, related work is presented in Section2, the proposed method is presented in Section 3, the results of experiments using kitchen appliance scene datasets are presented in Section 4, the expanded applications are presented in in Section 5, and the paper is concluded in Section 6.


## 2. Related Work

All object detection methods must address the inherent uncertainties associated with the size, direction, and structure of targets located within natural scene images. Numerous conventional methods have been developed for object detection in natural image scenes in the past, such as Viola Jones detectors [7, 8], histogram of oriented gradients (HOD) detector [9], and deformable part-based model (DPM) [10]. These methods mainly employ object features extracted manually for establishing the parameters of the algorithm. However, the rapid advancement of deep learning in recent years has led to the development of numerous object detection methods based on this advanced technology [11–22]. These methods have a demonstrated capability of accurately locating object regions within natural image scenes by appropriately training their network structures. These object detection methods can be divided into three categories: R-CNN-based object detection methods, SSD-based object detection methods, and YOLO-based object detection methods.


### 2.1. R-CNN-Based Object Detection Methods

R-CNN-based object detection methods are two-stage target detection methods. The first stage generates bounding boxes and the second stage identifies the bounding boxes to which the category belongs. R-CNN [11], as a precursor of a deep convolutional neural network target detection framework, obtained 0.66 mAP on experimental data from the PASCAL VOC2007 test set. However, the detection process is particularly time-consuming because it performs a ConvNet for about 2000 object proposal without sharing computation. Fast R-CNN [12] made improvements on R-CNN. It organically combines the two problems of target classification and border regression, using softmax classifiers instead of support vector machines. It allows multiple object proposals to share the output features of the previous layer network. Ren et al. [13] proposed an improved version of faster R-CNN based on the fast R-CNN model. It uses the region proposal network (RPN), which solves the inefficient selection problem of proposal regions in target detection tasks. In addition, some distinguished researchers [14, 15] proposed improved algorithms for the faster R-CNN. For example, feature pyramid networks (FPN) [14], compared to regular feature pyramids, proposed a feature pyramid structure which enables independent prediction in each level of pyramid. The architecture of FPN exhibits significant advantages as a generic feature extractor in several applications. However, R-CNN-based object detection methods have room to improve the precision in generating suggestion boxes.


### 2.2. SSD-Based Object Detection Methods

SSD-based object detection algorithm is a one-stage target detection algorithm trained on an improved VGG16 [23] network. It is not only close to the faster R-CNN algorithm in terms of accuracy but also comparable to YOLO in terms of detection speed. Single-shot multibox detection (SSD) [16] introduced feature pyramid structure, but it takes high-level and low-level feature of the ConvNet into account. It also allows further improvements in target detection accuracy, especially for small objects. However, it is not strong enough to characterize the feature map extracted at low-level feature. Therefore, Shen et al. [17] proposed deeply supervised object detectors (DSOD) based on SSD network structure. It puts forward an efficient network framework and a set of principles to learn object detectors without using pretrained models on ImageNet. In terms of detection accuracy and parameter number, DSOD outperforms some state-of-the-art detectors such as SSD and Faster R-CNN. Moreover, deconvolutional single-shot detector (DSSD) [18] combines ResNet-101 [24] with SSD and uses deconvolution instead of up-sampling, which obtained 81.5% mAP on VOC2007 test and 80% mAP on VOC2012 test. But these methods are blank in the study of feature pyramids using multiple convolutional kernels on the same feature maps.


### 2.3. YOLO-Based Object Detection Methods

YOLO [19] first proposed an end-to-end training model transforming object detection to a regression problem of bounding boxes and associated class probabilities. However, because each grid cell only predicts two boxes and can only have one class, it causes the detection to be not very accurate. To address these issues, YOLOv2 [20] improved the performance by adding batch normalization layers on all of the convolutional layers and a new bounding box regression method by removing the fully connected layers from YOLO. Inspired by the FPN, YOLOv3 [21] predicted a score for each bounding box by using logistic regression and set more candidate boxes. Therefore, multiscale prediction and multilabel classification both can be realized. In 2020, based on the original YOLOv3 object detection architecture, YOLOv4 [22] algorithm proposed a new backbone network, named CSPDarknet-53, using Mish activation function and puts forward mosaic data augmentation method in data processing. These all enable the model to reach the best match in terms of detection speed and accuracy so far. However, YOLO-based methods have not yet been applied to the field of target detection in the kitchen appliance scene.


## 2.1. R-CNN-Based Object Detection Methods

R-CNN-based object detection methods are two-stage target detection methods. The first stage generates bounding boxes and the second stage identifies the bounding boxes to which the category belongs. R-CNN [11], as a precursor of a deep convolutional neural network target detection framework, obtained 0.66 mAP on experimental data from the PASCAL VOC2007 test set. However, the detection process is particularly time-consuming because it performs a ConvNet for about 2000 object proposal without sharing computation. Fast R-CNN [12] made improvements on R-CNN. It organically combines the two problems of target classification and border regression, using softmax classifiers instead of support vector machines. It allows multiple object proposals to share the output features of the previous layer network. Ren et al. [13] proposed an improved version of faster R-CNN based on the fast R-CNN model. It uses the region proposal network (RPN), which solves the inefficient selection problem of proposal regions in target detection tasks. In addition, some distinguished researchers [14, 15] proposed improved algorithms for the faster R-CNN. For example, feature pyramid networks (FPN) [14], compared to regular feature pyramids, proposed a feature pyramid structure which enables independent prediction in each level of pyramid. The architecture of FPN exhibits significant advantages as a generic feature extractor in several applications. However, R-CNN-based object detection methods have room to improve the precision in generating suggestion boxes.


## 2.2. SSD-Based Object Detection Methods

SSD-based object detection algorithm is a one-stage target detection algorithm trained on an improved VGG16 [23] network. It is not only close to the faster R-CNN algorithm in terms of accuracy but also comparable to YOLO in terms of detection speed. Single-shot multibox detection (SSD) [16] introduced feature pyramid structure, but it takes high-level and low-level feature of the ConvNet into account. It also allows further improvements in target detection accuracy, especially for small objects. However, it is not strong enough to characterize the feature map extracted at low-level feature. Therefore, Shen et al. [17] proposed deeply supervised object detectors (DSOD) based on SSD network structure. It puts forward an efficient network framework and a set of principles to learn object detectors without using pretrained models on ImageNet. In terms of detection accuracy and parameter number, DSOD outperforms some state-of-the-art detectors such as SSD and Faster R-CNN. Moreover, deconvolutional single-shot detector (DSSD) [18] combines ResNet-101 [24] with SSD and uses deconvolution instead of up-sampling, which obtained 81.5% mAP on VOC2007 test and 80% mAP on VOC2012 test. But these methods are blank in the study of feature pyramids using multiple convolutional kernels on the same feature maps.


## 2.3. YOLO-Based Object Detection Methods

YOLO [19] first proposed an end-to-end training model transforming object detection to a regression problem of bounding boxes and associated class probabilities. However, because each grid cell only predicts two boxes and can only have one class, it causes the detection to be not very accurate. To address these issues, YOLOv2 [20] improved the performance by adding batch normalization layers on all of the convolutional layers and a new bounding box regression method by removing the fully connected layers from YOLO. Inspired by the FPN, YOLOv3 [21] predicted a score for each bounding box by using logistic regression and set more candidate boxes. Therefore, multiscale prediction and multilabel classification both can be realized. In 2020, based on the original YOLOv3 object detection architecture, YOLOv4 [22] algorithm proposed a new backbone network, named CSPDarknet-53, using Mish activation function and puts forward mosaic data augmentation method in data processing. These all enable the model to reach the best match in terms of detection speed and accuracy so far. However, YOLO-based methods have not yet been applied to the field of target detection in the kitchen appliance scene.


## 3. Proposed Method

In this section, the proposed method consists of three main parts: (1) data augmentation based on gamma corrections, adding salt-and-pepper noises, and Gaussian blur; (2) feature enhancement module with multiscale convolution kernel for target feature reinforcement; (3) design of deeper feature extraction structure based on the typical encoder and decoder network of UNet [6], exerting a series of feature enhancement module.


### 3.1. Data Augmentation

In our experiments, the kitchen appliance control panel dataset we used is from an image collector. The dataset consists of control panel images of 28 different kitchen appliances without uniform plane size. Moreover, each of the images includes at least 15–20 object regions which scattered in various areas of complex appliance scenes with uncertain position spacing and aspect ratio.In order to simulate both light and dark shooting environments, we first use gamma correction which is detailed as follows:(1)s=crγ.Here,c is a zoom coefficient. r and s are the grayscale values of the input and output after normalization, respectively. When γ<1.0, the gamma corrections can increase the overall brightness of the image; while γ>1.0, the gamma correction will reduce the overall brightness, making the image darker. Thus, in our experiments, we set γ=0.7 and γ=1.3 to simulate both light and dark environments, respectively.Second, we also add 1% salt-and-pepper noise to our dataset, which randomly generates some pixel positions within the image based on the signal-to-noise ratio (SNR) of the image and randomly assigns these pixels a value of 0 or 255.Third, we use Gaussian blur to simulate a lens out of focus, which is detailed as follows:(2)fx=12πσexp−x−μ22σ2,where μ is the mean and σ is the variance. In OpenCV (Open Source Computer Vision Library), σ is calculated according to the following formula:(3)σ=0.3×ksize−1×0.5−1+0.8,where ksize is Gaussian kernel size. In our work, we set μ=0, ksize=15 (σ=2.6). A three-dimensional view of the Gaussian function is shown in Figure 2(a).Figure 2
Data augmentation: (a) 3D view of the Gaussian function. (b) Original image. (c) Gamma correction (γ=0.7) of (b). (d) Gamma correction (γ=1.3) of (b). (e) Gaussian blur of (b). (f) 1% salt-and-pepper noise of (b).Through three data augmentation methods, gamma correction, adding pretzel noise, and Gaussian blur, our data were augmented from the original 28 images to 336 images. This yielded a total of 5040–6720 object regions. Figures2(b)–2(f) show some of the results of this data augmentation.


### 3.2. Overall Network Architecture

The overall framework we proposed is shown in Figure3. In this subsection, we will briefly describe our overall framework and it is divided into the following four components.Figure 3
Overall framework of our proposed method based on faster R-CNN structure. It mainly consists of feature extraction network, D-RPN, ROI pooling layer, and classification layers.


#### 3.2.1. Feature Extraction Network

This network consists of multiple convolution and pooling layers and is used to obtain feature information pertaining to appliance control panel images. First, the deep-layer features are perceived through a sliding window of the size of the convolution kernel. Next, the fine edge features of the panel are extracted initially, and redundant information is removed. Then, further dimensionality reduction and feature selection are conducted by the pooling operation. Commonly used feature extraction networks are VGG16 [23], ResNet-50 [24], and ResNet-101 [24]. In our work, we use VGG16 as our backbone feature extraction network.


#### 3.2.2. D-RPN

This section is a central part of our overall framework. Feature enhancement module with multiscale convolution kernel and design of deeper feature extraction structure based on UNet are proposed in D-RPN. But both will be detailed in Sections3.3 and 3.4, respectively. Functionally, D-RPN in this paper is similar to RPN in faster R-CNN. The D-RPN is used to generate region proposals from the image and accordingly generates nine anchors of three different sizes and three different aspect ratios on each pixel of the extracted feature map. A number of candidate object regions are obtained through a one-to-one mapping of the anchors on the original image. These candidate regions contain a wide variety of information, such as entire object regions, partial object regions, and strictly background regions. Therefore, confidence levels are calculated for each anchor box reflecting the level of certainty regarding whether the anchor box contains object regions requiring detection. The object regions within anchor boxes with high confidence levels are then placed within bounding boxes, and regression adjustment of the bounding box parameters is applied. Finally, a method based on NMS is used to filter out bounding boxes that have a relatively large number of intersections.


#### 3.2.3. ROI Pooling Layer

The proposed regions are mapped onto the feature map in the ROI pooling layer, and the map is cropped accordingly. Then, the cropped region is divided into7×7 segments of the same size by bilinear interpolation. Finally, maximum pooling is performed with a convolution kernel size of two to obtain the final feature map of each proposed region. As such, the process allows different region proposals to be output in the same dimension.


#### 3.2.4. Classification Layers

The classification layer is composed of fully connected layers and a softmax layer, which is used to classify each region proposal as either object or not-object and to output a confidence level. In addition, regression is performed to determine whether a bounding box includes an object region and to minimize deviations between the bounding boxes and the ground truth bounding boxes.


### 3.3. Feature Enhancement Module

In our main work, we propose the feature enhancement module, which network framework is shown in Figure4.Figure 4
Framework of feature enhancement module.The module is divided into four parts. First, the results of previous layer input a1×1 convolution layer to adjust the number of channels. Then, it is divided into three branches and each of them is a convolution layer with kernel size of 3×3, 5×5, and 7×7, respectively. Whereupon it uses convolution layers with different kernel size to extract features from the feature map. In this part, we set the stride of the convolution to 1, using the padding mode and rectified linear unit (Relu) activation functions. This ensures that the output of each branch has the same height, width, and number of channels for stacking. Next, we stack the features extracted from the previous part and integrate the information from different scales to strengthen the features. Finally, the results of concatenation were input to a 1×1 convolution layer again to squeeze the number of channels.By using a convolution layer with different kernel size, respectively, the module is structured as a feature pyramid which increases not only the thickness of the network but also its adaptability to scale. Small convolution kernels such as3×3 are sensitive to microfeatures that tend to be less semantic and more noisy, while large convolution kernels such as 7×7 are sensitive to macroscopic features that have stronger semantic information and are insensitive to noise. Therefore, we use convolution kernels with different scales, including 3×3, 5×5, and 7×7 pixels, to acquire features from different spaces on the feature map, and then these features are fused and further enhanced. This structure can increase the depth of the network and improve performance.But if using multiscale convolution alone is prone to overfitting. The solution of easy overfitting in GoogLeNet [25] is to reduce the number of parameters by adding a layer of 1×1 convolution following each different scale convolution layer. However, in the feature enhancement module proposed in this paper, we stack the results of each scale convolution before connecting a 1×1 convolution layer. Thus, in the experimental part, a contrast experiment adding a layer of 1×1 convolution after 3×3, 5×5, and 7×7 convolution layers, respectively, will be designed to prove the effectiveness of the feature enhancement module proposed. In this contrast experiment, our approach is more accurate, and the corresponding comparative results will be presented in the experimental section.


### 3.4. The Design of U-Shaped Network Reconstruction

In this section, we design a deeper feature extraction structure followed the typical encoder and decoder design of UNet [6]. It replaces the original RPN structure by concatenating multiple feature enhancement module in a U-shaped network structure. The overall network architecture we proposed is shown in Figure 5.Figure 5
A deeper feature extraction structure we propose is composed of five components: feature enhancement module, Relu activation function, max pooling layer, ordinary convolution layer, and up-sampling.As shown in Figure5, the left side of the structure is the encoder, which consists of two blocks in total. Each block consists of feature enhancement module, Relu activation function, and max pooling layer, and the three parameters below the feature enhancement module correspond to the number of channels C1, C2, and C3 in Figure 4, respectively. The result after feature enhancement module is activated with the Relu function. Finally, a max pooling of 2×2 is applied and output to the next block; the bottom of the structure consists of three ordinary convolution layers (their convolution kernel sizes are 1×1, 3×3, and 1×1, and the number of channels is 128); the right side of the structure is the decoder, which also consists of two blocks. In each of the blocks, the input feature map will be up-sampled in order to ensure the up-sampled size is the same as that of the corresponding encoder. Then, by concatenation, the two are stacked on top of each other in the channel number dimension. It then goes through a feature enhancement module and finally outputs.We introduce the idea of encoder and decoder in UNet into our structure. In our deeper feature extraction structure, the left side is the down-sampling layer and the right side is the up-sampling layer. During the down-sampling process, the receptive field expands step by step, which is equivalent to the meanings that the image will be compressed and the region per unit area perceived will become larger. In this way, the low-frequency information of the image is detected more frequently. Besides, up-sampling was added to the decoder process, from which the information and size of the feature map is recovered and that ensures the most critical operations (feature fusion by concatenating) can proceed successfully. In addition, a concatenation feature fusion approach will be used in our deeper feature extraction structure. The feature map obtained at each down-sampling layer of the network is concatenated to the corresponding up-sampling layer, which creates a thicker feature map. In other words, the feature fusion approach facilitates the integration of the information of the various stages of the down-sampling in the up-sampling process. That is, the structural information of each layer is combined during the up-sampling process.


## 3.1. Data Augmentation

In our experiments, the kitchen appliance control panel dataset we used is from an image collector. The dataset consists of control panel images of 28 different kitchen appliances without uniform plane size. Moreover, each of the images includes at least 15–20 object regions which scattered in various areas of complex appliance scenes with uncertain position spacing and aspect ratio.In order to simulate both light and dark shooting environments, we first use gamma correction which is detailed as follows:(1)s=crγ.Here,c is a zoom coefficient. r and s are the grayscale values of the input and output after normalization, respectively. When γ<1.0, the gamma corrections can increase the overall brightness of the image; while γ>1.0, the gamma correction will reduce the overall brightness, making the image darker. Thus, in our experiments, we set γ=0.7 and γ=1.3 to simulate both light and dark environments, respectively.Second, we also add 1% salt-and-pepper noise to our dataset, which randomly generates some pixel positions within the image based on the signal-to-noise ratio (SNR) of the image and randomly assigns these pixels a value of 0 or 255.Third, we use Gaussian blur to simulate a lens out of focus, which is detailed as follows:(2)fx=12πσexp−x−μ22σ2,where μ is the mean and σ is the variance. In OpenCV (Open Source Computer Vision Library), σ is calculated according to the following formula:(3)σ=0.3×ksize−1×0.5−1+0.8,where ksize is Gaussian kernel size. In our work, we set μ=0, ksize=15 (σ=2.6). A three-dimensional view of the Gaussian function is shown in Figure 2(a).Figure 2
Data augmentation: (a) 3D view of the Gaussian function. (b) Original image. (c) Gamma correction (γ=0.7) of (b). (d) Gamma correction (γ=1.3) of (b). (e) Gaussian blur of (b). (f) 1% salt-and-pepper noise of (b).Through three data augmentation methods, gamma correction, adding pretzel noise, and Gaussian blur, our data were augmented from the original 28 images to 336 images. This yielded a total of 5040–6720 object regions. Figures2(b)–2(f) show some of the results of this data augmentation.


## 3.2. Overall Network Architecture

The overall framework we proposed is shown in Figure3. In this subsection, we will briefly describe our overall framework and it is divided into the following four components.Figure 3
Overall framework of our proposed method based on faster R-CNN structure. It mainly consists of feature extraction network, D-RPN, ROI pooling layer, and classification layers.


### 3.2.1. Feature Extraction Network

This network consists of multiple convolution and pooling layers and is used to obtain feature information pertaining to appliance control panel images. First, the deep-layer features are perceived through a sliding window of the size of the convolution kernel. Next, the fine edge features of the panel are extracted initially, and redundant information is removed. Then, further dimensionality reduction and feature selection are conducted by the pooling operation. Commonly used feature extraction networks are VGG16 [23], ResNet-50 [24], and ResNet-101 [24]. In our work, we use VGG16 as our backbone feature extraction network.


### 3.2.2. D-RPN

This section is a central part of our overall framework. Feature enhancement module with multiscale convolution kernel and design of deeper feature extraction structure based on UNet are proposed in D-RPN. But both will be detailed in Sections3.3 and 3.4, respectively. Functionally, D-RPN in this paper is similar to RPN in faster R-CNN. The D-RPN is used to generate region proposals from the image and accordingly generates nine anchors of three different sizes and three different aspect ratios on each pixel of the extracted feature map. A number of candidate object regions are obtained through a one-to-one mapping of the anchors on the original image. These candidate regions contain a wide variety of information, such as entire object regions, partial object regions, and strictly background regions. Therefore, confidence levels are calculated for each anchor box reflecting the level of certainty regarding whether the anchor box contains object regions requiring detection. The object regions within anchor boxes with high confidence levels are then placed within bounding boxes, and regression adjustment of the bounding box parameters is applied. Finally, a method based on NMS is used to filter out bounding boxes that have a relatively large number of intersections.


### 3.2.3. ROI Pooling Layer

The proposed regions are mapped onto the feature map in the ROI pooling layer, and the map is cropped accordingly. Then, the cropped region is divided into7×7 segments of the same size by bilinear interpolation. Finally, maximum pooling is performed with a convolution kernel size of two to obtain the final feature map of each proposed region. As such, the process allows different region proposals to be output in the same dimension.


### 3.2.4. Classification Layers

The classification layer is composed of fully connected layers and a softmax layer, which is used to classify each region proposal as either object or not-object and to output a confidence level. In addition, regression is performed to determine whether a bounding box includes an object region and to minimize deviations between the bounding boxes and the ground truth bounding boxes.


## 3.2.1. Feature Extraction Network

This network consists of multiple convolution and pooling layers and is used to obtain feature information pertaining to appliance control panel images. First, the deep-layer features are perceived through a sliding window of the size of the convolution kernel. Next, the fine edge features of the panel are extracted initially, and redundant information is removed. Then, further dimensionality reduction and feature selection are conducted by the pooling operation. Commonly used feature extraction networks are VGG16 [23], ResNet-50 [24], and ResNet-101 [24]. In our work, we use VGG16 as our backbone feature extraction network.


## 3.2.2. D-RPN

This section is a central part of our overall framework. Feature enhancement module with multiscale convolution kernel and design of deeper feature extraction structure based on UNet are proposed in D-RPN. But both will be detailed in Sections3.3 and 3.4, respectively. Functionally, D-RPN in this paper is similar to RPN in faster R-CNN. The D-RPN is used to generate region proposals from the image and accordingly generates nine anchors of three different sizes and three different aspect ratios on each pixel of the extracted feature map. A number of candidate object regions are obtained through a one-to-one mapping of the anchors on the original image. These candidate regions contain a wide variety of information, such as entire object regions, partial object regions, and strictly background regions. Therefore, confidence levels are calculated for each anchor box reflecting the level of certainty regarding whether the anchor box contains object regions requiring detection. The object regions within anchor boxes with high confidence levels are then placed within bounding boxes, and regression adjustment of the bounding box parameters is applied. Finally, a method based on NMS is used to filter out bounding boxes that have a relatively large number of intersections.


## 3.2.3. ROI Pooling Layer

The proposed regions are mapped onto the feature map in the ROI pooling layer, and the map is cropped accordingly. Then, the cropped region is divided into7×7 segments of the same size by bilinear interpolation. Finally, maximum pooling is performed with a convolution kernel size of two to obtain the final feature map of each proposed region. As such, the process allows different region proposals to be output in the same dimension.


## 3.2.4. Classification Layers

The classification layer is composed of fully connected layers and a softmax layer, which is used to classify each region proposal as either object or not-object and to output a confidence level. In addition, regression is performed to determine whether a bounding box includes an object region and to minimize deviations between the bounding boxes and the ground truth bounding boxes.


## 3.3. Feature Enhancement Module

In our main work, we propose the feature enhancement module, which network framework is shown in Figure4.Figure 4
Framework of feature enhancement module.The module is divided into four parts. First, the results of previous layer input a1×1 convolution layer to adjust the number of channels. Then, it is divided into three branches and each of them is a convolution layer with kernel size of 3×3, 5×5, and 7×7, respectively. Whereupon it uses convolution layers with different kernel size to extract features from the feature map. In this part, we set the stride of the convolution to 1, using the padding mode and rectified linear unit (Relu) activation functions. This ensures that the output of each branch has the same height, width, and number of channels for stacking. Next, we stack the features extracted from the previous part and integrate the information from different scales to strengthen the features. Finally, the results of concatenation were input to a 1×1 convolution layer again to squeeze the number of channels.By using a convolution layer with different kernel size, respectively, the module is structured as a feature pyramid which increases not only the thickness of the network but also its adaptability to scale. Small convolution kernels such as3×3 are sensitive to microfeatures that tend to be less semantic and more noisy, while large convolution kernels such as 7×7 are sensitive to macroscopic features that have stronger semantic information and are insensitive to noise. Therefore, we use convolution kernels with different scales, including 3×3, 5×5, and 7×7 pixels, to acquire features from different spaces on the feature map, and then these features are fused and further enhanced. This structure can increase the depth of the network and improve performance.But if using multiscale convolution alone is prone to overfitting. The solution of easy overfitting in GoogLeNet [25] is to reduce the number of parameters by adding a layer of 1×1 convolution following each different scale convolution layer. However, in the feature enhancement module proposed in this paper, we stack the results of each scale convolution before connecting a 1×1 convolution layer. Thus, in the experimental part, a contrast experiment adding a layer of 1×1 convolution after 3×3, 5×5, and 7×7 convolution layers, respectively, will be designed to prove the effectiveness of the feature enhancement module proposed. In this contrast experiment, our approach is more accurate, and the corresponding comparative results will be presented in the experimental section.


## 3.4. The Design of U-Shaped Network Reconstruction

In this section, we design a deeper feature extraction structure followed the typical encoder and decoder design of UNet [6]. It replaces the original RPN structure by concatenating multiple feature enhancement module in a U-shaped network structure. The overall network architecture we proposed is shown in Figure 5.Figure 5
A deeper feature extraction structure we propose is composed of five components: feature enhancement module, Relu activation function, max pooling layer, ordinary convolution layer, and up-sampling.As shown in Figure5, the left side of the structure is the encoder, which consists of two blocks in total. Each block consists of feature enhancement module, Relu activation function, and max pooling layer, and the three parameters below the feature enhancement module correspond to the number of channels C1, C2, and C3 in Figure 4, respectively. The result after feature enhancement module is activated with the Relu function. Finally, a max pooling of 2×2 is applied and output to the next block; the bottom of the structure consists of three ordinary convolution layers (their convolution kernel sizes are 1×1, 3×3, and 1×1, and the number of channels is 128); the right side of the structure is the decoder, which also consists of two blocks. In each of the blocks, the input feature map will be up-sampled in order to ensure the up-sampled size is the same as that of the corresponding encoder. Then, by concatenation, the two are stacked on top of each other in the channel number dimension. It then goes through a feature enhancement module and finally outputs.We introduce the idea of encoder and decoder in UNet into our structure. In our deeper feature extraction structure, the left side is the down-sampling layer and the right side is the up-sampling layer. During the down-sampling process, the receptive field expands step by step, which is equivalent to the meanings that the image will be compressed and the region per unit area perceived will become larger. In this way, the low-frequency information of the image is detected more frequently. Besides, up-sampling was added to the decoder process, from which the information and size of the feature map is recovered and that ensures the most critical operations (feature fusion by concatenating) can proceed successfully. In addition, a concatenation feature fusion approach will be used in our deeper feature extraction structure. The feature map obtained at each down-sampling layer of the network is concatenated to the corresponding up-sampling layer, which creates a thicker feature map. In other words, the feature fusion approach facilitates the integration of the information of the various stages of the down-sampling in the up-sampling process. That is, the structural information of each layer is combined during the up-sampling process.


## 4. Experiments and Results

### 4.1. Implementation and Evaluation Methods

The proposed improved model was implemented in TensorFlow with one NVIDIA GTX 1650 GPU. Our dataset first randomly selects 80% of the data for training and the remaining 20% is used as a testing dataset. Furthermore, the training data is divided into a training dataset and a validation dataset in the proportion 7 : 3. For training, the learning rate was initialized to 0.001 and a weight decay of 0.0001, and the stochastic gradient descent (SGD) with momentum is set to 0.9. Training iterations are set to 20,000.During training, the cross-entropy loss function was used for the classification task and theSmoothL1 loss function [12] was used for the regression task. For RPN training, we set up nine anchor boxes with three different aspect ratios and sizes. The process of mapping these boxes to the original images generated about 20,000 anchors, which were then filtered according to the confidence levels calculated using NMS with a threshold of 0.7. The proportion of overlap between an anchor and a ground truth object was calculated according to the intersection over union (IOU), and all anchors with IOU≤0.7 were designated as positive samples containing a text region, while those with IOU≤0.3 were designated as negative samples containing no text region. Then, in these anchors, 128 positive samples and 128 negative samples were selected respectively for training. The loss of the RPN is mainly composed of a classification prediction loss Lclass based on the probability pi of predicting the i-th anchor as a target according to the i-th ground truth label pi∗, which is set to 1 for a positive sample and set to 0 otherwise, and a regression prediction loss Lregressioin based on the four coordinate parameters ti=tx,ty,tw,th of the i-th predicted bounding box, where the subscripts refer to the x and y center coordinates and the width w and height h of the bounding box, and the four coordinate parameters ti∗=tx∗,ty∗,tw∗,th∗ of the i-th ground truth box. Accordingly, the loss function is defined as follows:(4)Lpi,ti=Lclasspi,pi∗+Lregressionti,ti∗,Lclasspi,pi∗=1Ncls∑i−logpi∗pi+1−pi∗1−pi,Lregressionti,ti∗=λ1Nreg∑ipi∗SmoothL1ti−ti∗,SmoothL1x=0.5x2,ifx<1,x−0.5,otherwise.Here,Ncls is the minimum number of each input batch of predicted bounding boxes, λ is a balancing parameter that both Ncls and Nreg terms are approximately equally weighted. We set it to the default value of 10, and Nreg is the number of anchor boxes. Furthermore, the elements of ti and ti∗ are subject to the following special definitions:(5)tx=x−xawa,ty=y−yaha,tw=logwwa,th=loghha,tx∗=x∗−xawa,ty∗=y∗−yaha,tw∗=logw∗wa,th∗=logh∗ha.Here, all terms with the subscripta represent the standard parameters of an anchor box. Minimizing the loss function yields predicted bounding box parameters that are arbitrarily close to ground truth box parameters.In this paper, we use mean average precision (mAP) to evaluate the performance of the model. It contains two very important evaluation measures: precision and recall. They are defined as follows:(6)Precision=TPTP+FP,Recall=TPTP+FN,where TP, FP, and FN are true positive, false positive, and false negative, respectively. With precision and recall, P−R curve for a category is plotted and then we calculate the area under the curve to get the average precision (AP) value for that category. The mAP is a measure of the detection accuracy of the model by calculating the mean AP of all classifications. It is defined as follows:(7)mAP=1m∑i=1mAPi,where m is the number of categories in the dataset. The higher the mAP value, the better the overall performance of the model and the more accurate the prediction for each class will be.


### 4.2. Comparison of Different Networks

First of all, we evaluated the predication performance of different networks: faster R-CNN with VGG16 [23], SSD, YOLOv3, and YOLOv4, and all these networks were trained with same dataset segmentation strategy. Table 1 shows the performance of different networks under the same evaluation criteria. We can observe that our proposed improved network significantly outperforms the other networks in detecting categories, add and sub. Although the AP value is slightly lower than that of the SSD model when detecting category, text, the mAP value of our method is higher. This indicates the overall better performance of our model.Table 1
Detection performance of different networks trained for the three target categories, including text symbols (text), the plus symbol “+” (add), and the minus symbol “−” (sub), based on the average precision (AP) obtained for the testing dataset.
NetworksClass (AP)TextAddSubmAPFaster R-CNN0.90910.91310.75970.8606SSD0.84490.94320.62950.8059YOLOv30.99230.79070.65030.8111YOLOv40.85650.67430.62570.7188Our0.90850.99860.78820.8984To validate the advantages of our proposed feature enhancement module and design of deeper feature extraction structure, the comparison of the visualized detection results based on the same testing dataset between our improved method and the unimproved method (faster R-CNN) is shown in Figure6. The results demonstrate that the unimproved method also has the phenomenon of omission inspection and erroneous inspection, such as undetected text object and treating patterns as text in the image. But our improved algorithm gains better performance. Therefore, our study is of relevance.Figure 6
Visualized detection results between our improved method and the unimproved method (faster R-CNN). (a) Original images. (b) The results of the unimproved method. (c) The results of our improved method.


### 4.3. Effect of Feature Enhancement Module

Our module is essentially a multiscale detection method. So, we further explored the effect of our proposed multiscale module. We compare five variants: our proposed feature enhancement module, module only using3×3 convolution layer, module only using 5×5 convolution layer, module only using 7×7 convolution layer, and our proposed multiscale module which adds 1×1 convolution layers following 3×3 convolution layer, 5×5 convolution layer, and 7×7 convolution layer, respectively.All these variants were trained under the same conditions. In Table2, it can be learned that our proposed multiscale module is superior to other structures. This illustrates that multiscale convolution is more effective for the network to extract feature information at different scales, and the fusion of this feature information can play the role of feature enhancement.Table 2
The results of all variants which were trained under the same conditions. The respective AP values for categories Text, Add, and Sub are used as indicators for evaluating each model.
NetworksOnly 3∗3Only 5∗5Only 7∗7Adding 1∗1OurFrame diagramFigure7(a)Figure7(b)Figure7(c)Figure7(d)Figure3Text (AP)0.90900.90910.90710.90810.9085Add (AP)0.91470.99200.99700.99230.9986Sub (AP)0.77590.76420.73940.70420.7882Figure 7
Structural diagram of four variants we set: (a) module only using 3 × 3 convolution layer; (b) module only using 5 × 5 convolution layer; (c) module only using 7 × 7 convolution layer; (d) our proposed multiscale module which adds 1 × 1 convolution layers following 3 × 3 convolution layer, 5 × 5 convolution layer, and 7 × 7 convolution layer.
(a)(b)(c)(d)


## 4.1. Implementation and Evaluation Methods

The proposed improved model was implemented in TensorFlow with one NVIDIA GTX 1650 GPU. Our dataset first randomly selects 80% of the data for training and the remaining 20% is used as a testing dataset. Furthermore, the training data is divided into a training dataset and a validation dataset in the proportion 7 : 3. For training, the learning rate was initialized to 0.001 and a weight decay of 0.0001, and the stochastic gradient descent (SGD) with momentum is set to 0.9. Training iterations are set to 20,000.During training, the cross-entropy loss function was used for the classification task and theSmoothL1 loss function [12] was used for the regression task. For RPN training, we set up nine anchor boxes with three different aspect ratios and sizes. The process of mapping these boxes to the original images generated about 20,000 anchors, which were then filtered according to the confidence levels calculated using NMS with a threshold of 0.7. The proportion of overlap between an anchor and a ground truth object was calculated according to the intersection over union (IOU), and all anchors with IOU≤0.7 were designated as positive samples containing a text region, while those with IOU≤0.3 were designated as negative samples containing no text region. Then, in these anchors, 128 positive samples and 128 negative samples were selected respectively for training. The loss of the RPN is mainly composed of a classification prediction loss Lclass based on the probability pi of predicting the i-th anchor as a target according to the i-th ground truth label pi∗, which is set to 1 for a positive sample and set to 0 otherwise, and a regression prediction loss Lregressioin based on the four coordinate parameters ti=tx,ty,tw,th of the i-th predicted bounding box, where the subscripts refer to the x and y center coordinates and the width w and height h of the bounding box, and the four coordinate parameters ti∗=tx∗,ty∗,tw∗,th∗ of the i-th ground truth box. Accordingly, the loss function is defined as follows:(4)Lpi,ti=Lclasspi,pi∗+Lregressionti,ti∗,Lclasspi,pi∗=1Ncls∑i−logpi∗pi+1−pi∗1−pi,Lregressionti,ti∗=λ1Nreg∑ipi∗SmoothL1ti−ti∗,SmoothL1x=0.5x2,ifx<1,x−0.5,otherwise.Here,Ncls is the minimum number of each input batch of predicted bounding boxes, λ is a balancing parameter that both Ncls and Nreg terms are approximately equally weighted. We set it to the default value of 10, and Nreg is the number of anchor boxes. Furthermore, the elements of ti and ti∗ are subject to the following special definitions:(5)tx=x−xawa,ty=y−yaha,tw=logwwa,th=loghha,tx∗=x∗−xawa,ty∗=y∗−yaha,tw∗=logw∗wa,th∗=logh∗ha.Here, all terms with the subscripta represent the standard parameters of an anchor box. Minimizing the loss function yields predicted bounding box parameters that are arbitrarily close to ground truth box parameters.In this paper, we use mean average precision (mAP) to evaluate the performance of the model. It contains two very important evaluation measures: precision and recall. They are defined as follows:(6)Precision=TPTP+FP,Recall=TPTP+FN,where TP, FP, and FN are true positive, false positive, and false negative, respectively. With precision and recall, P−R curve for a category is plotted and then we calculate the area under the curve to get the average precision (AP) value for that category. The mAP is a measure of the detection accuracy of the model by calculating the mean AP of all classifications. It is defined as follows:(7)mAP=1m∑i=1mAPi,where m is the number of categories in the dataset. The higher the mAP value, the better the overall performance of the model and the more accurate the prediction for each class will be.


## 4.2. Comparison of Different Networks

First of all, we evaluated the predication performance of different networks: faster R-CNN with VGG16 [23], SSD, YOLOv3, and YOLOv4, and all these networks were trained with same dataset segmentation strategy. Table 1 shows the performance of different networks under the same evaluation criteria. We can observe that our proposed improved network significantly outperforms the other networks in detecting categories, add and sub. Although the AP value is slightly lower than that of the SSD model when detecting category, text, the mAP value of our method is higher. This indicates the overall better performance of our model.Table 1
Detection performance of different networks trained for the three target categories, including text symbols (text), the plus symbol “+” (add), and the minus symbol “−” (sub), based on the average precision (AP) obtained for the testing dataset.
NetworksClass (AP)TextAddSubmAPFaster R-CNN0.90910.91310.75970.8606SSD0.84490.94320.62950.8059YOLOv30.99230.79070.65030.8111YOLOv40.85650.67430.62570.7188Our0.90850.99860.78820.8984To validate the advantages of our proposed feature enhancement module and design of deeper feature extraction structure, the comparison of the visualized detection results based on the same testing dataset between our improved method and the unimproved method (faster R-CNN) is shown in Figure6. The results demonstrate that the unimproved method also has the phenomenon of omission inspection and erroneous inspection, such as undetected text object and treating patterns as text in the image. But our improved algorithm gains better performance. Therefore, our study is of relevance.Figure 6
Visualized detection results between our improved method and the unimproved method (faster R-CNN). (a) Original images. (b) The results of the unimproved method. (c) The results of our improved method.


## 4.3. Effect of Feature Enhancement Module

Our module is essentially a multiscale detection method. So, we further explored the effect of our proposed multiscale module. We compare five variants: our proposed feature enhancement module, module only using3×3 convolution layer, module only using 5×5 convolution layer, module only using 7×7 convolution layer, and our proposed multiscale module which adds 1×1 convolution layers following 3×3 convolution layer, 5×5 convolution layer, and 7×7 convolution layer, respectively.All these variants were trained under the same conditions. In Table2, it can be learned that our proposed multiscale module is superior to other structures. This illustrates that multiscale convolution is more effective for the network to extract feature information at different scales, and the fusion of this feature information can play the role of feature enhancement.Table 2
The results of all variants which were trained under the same conditions. The respective AP values for categories Text, Add, and Sub are used as indicators for evaluating each model.
NetworksOnly 3∗3Only 5∗5Only 7∗7Adding 1∗1OurFrame diagramFigure7(a)Figure7(b)Figure7(c)Figure7(d)Figure3Text (AP)0.90900.90910.90710.90810.9085Add (AP)0.91470.99200.99700.99230.9986Sub (AP)0.77590.76420.73940.70420.7882Figure 7
Structural diagram of four variants we set: (a) module only using 3 × 3 convolution layer; (b) module only using 5 × 5 convolution layer; (c) module only using 7 × 7 convolution layer; (d) our proposed multiscale module which adds 1 × 1 convolution layers following 3 × 3 convolution layer, 5 × 5 convolution layer, and 7 × 7 convolution layer.
(a)(b)(c)(d)


## 5. Expanded Applications

Based on the high-precision detection effect of our proposed method, our detection results can also be applied to text recognition. So, in this article, we give some extended experiments on text recognition. The experiment consists of a total of two stages, character segmentation, and character recognition, each of which is described as follows.


### 5.1. Character Segmentation

The character segmentation stage applies a projection-based text character segmentation method to segment the extracted text instances into independent character instances. As illustrated in Figure8, projection-based character segmentation obtains pixel distribution information in the vertical or horizontal direction by projecting a binary image vertically or horizontally and segments characters in the detected text region based on the characteristic peaks and valleys in the pixel distribution. Here, the Otsu [26] binarization method is applied to the text region in Figure 8(a) detected in the previous step to generate the binary image in Figure 8(b), which assigns background pixels a value of 0 and foreground pixels representing text a value of 1. The vertical projection of Figure 8(b) is shown in Figure 8(c), from which a statistical pixel distribution map is obtained. The peaks and valleys in the pixel distribution map are then employed to obtain the character segmentation shown in Figure 8(d).Figure 8
Projection-based character segmentation: (a) object region detected in the previous object localization step; (b) binary image of (a); (c) pixel distribution map obtained from the vertical projection of (b); (d) character segmentation obtained according to the peaks and valleys in the pixel distribution map in (c).
(a)(b)(c)(d)


### 5.2. Character Recognition

The character recognition stage applies a deep CNN to recognize the character instances extracted in the previous stage. Each of the abovementioned character segments obtained in the previous step is then classified using a D-CNN with the structural framework illustrated in Figure9. Here, convolution and pooling are again employed for feature extraction, and a softmax layer is applied for calculating the probability for each category outcome, and the corresponding categories are output according to the established probabilities.Figure 9
Structural framework of the D-CNN employed for classifying the character segments obtained during the previous character segmentation step.In prepossessing, we specifically prepare the dataset for character recognition. It consisted of screenshots of characters in the open source Chinese character dataset collected from natural scene images and four Chinese typeface font libraries (Arial, msyhl, msyh, and STLITI). All images were enhanced according to the same process applied to the dataset in the object detection stage. The training time of the D-CNN was streamlined by selecting 57 categories of Chinese characters during the training phase and converting all images to normalized grayscale images composed strictly of 32 × 32 pixels, which yielded a total of 21463 images.In training, dataset in character recognition was randomly shuffled, and 60% of the characters in the dataset were employed for the training dataset, while the remaining 40% were evenly divided among the validation dataset and testing dataset. The learning rate was initially set to 0.0001 and the number of training iterations was limited to 500. Taking into account the computing power available during D-CNN training, a tensor of 64 images was input at each iteration. In addition, a multiclass cross-entropy function (as shown in equation (8)) was employed owing to the multiclass classification task involved. Finally, we adopted Adam optimization [27] during training, which can adaptively adjust the learning rate of each parameter, using estimations of the first moment and second moment of the gradient, to allow for relatively stable variations in the parameters.(8)Loss=1N∑i−∑iMyiclogpic.The loss obtained by the proposed character classifier from equation (8) during training and validation and its accuracy values obtained during training, validation, and testing are, respectively, presented in Figures 10(a) and 10(b) with respect to the number of iterations. We note from Figure 10(a) that the loss of our character classifier decreases very rapidly to nearly 0 after only about 100 iterations for both the training and validation datasets. Correspondingly, we also note from Figure 10(b) that the accuracy values rapidly approach 99.89%, 96.30%, and 97.99% with increasing iterations for the training dataset, validation dataset, and testing dataset, respectively, where values are presented in the latter case only for every 5th iteration.Figure 10
Loss values (a) obtained by the proposed character classifier from equation (8) during training and validation, and its accuracy values (b) obtained during training, validation, and testing.
(a)(b)


## 5.1. Character Segmentation

The character segmentation stage applies a projection-based text character segmentation method to segment the extracted text instances into independent character instances. As illustrated in Figure8, projection-based character segmentation obtains pixel distribution information in the vertical or horizontal direction by projecting a binary image vertically or horizontally and segments characters in the detected text region based on the characteristic peaks and valleys in the pixel distribution. Here, the Otsu [26] binarization method is applied to the text region in Figure 8(a) detected in the previous step to generate the binary image in Figure 8(b), which assigns background pixels a value of 0 and foreground pixels representing text a value of 1. The vertical projection of Figure 8(b) is shown in Figure 8(c), from which a statistical pixel distribution map is obtained. The peaks and valleys in the pixel distribution map are then employed to obtain the character segmentation shown in Figure 8(d).Figure 8
Projection-based character segmentation: (a) object region detected in the previous object localization step; (b) binary image of (a); (c) pixel distribution map obtained from the vertical projection of (b); (d) character segmentation obtained according to the peaks and valleys in the pixel distribution map in (c).
(a)(b)(c)(d)


## 5.2. Character Recognition

The character recognition stage applies a deep CNN to recognize the character instances extracted in the previous stage. Each of the abovementioned character segments obtained in the previous step is then classified using a D-CNN with the structural framework illustrated in Figure9. Here, convolution and pooling are again employed for feature extraction, and a softmax layer is applied for calculating the probability for each category outcome, and the corresponding categories are output according to the established probabilities.Figure 9
Structural framework of the D-CNN employed for classifying the character segments obtained during the previous character segmentation step.In prepossessing, we specifically prepare the dataset for character recognition. It consisted of screenshots of characters in the open source Chinese character dataset collected from natural scene images and four Chinese typeface font libraries (Arial, msyhl, msyh, and STLITI). All images were enhanced according to the same process applied to the dataset in the object detection stage. The training time of the D-CNN was streamlined by selecting 57 categories of Chinese characters during the training phase and converting all images to normalized grayscale images composed strictly of 32 × 32 pixels, which yielded a total of 21463 images.In training, dataset in character recognition was randomly shuffled, and 60% of the characters in the dataset were employed for the training dataset, while the remaining 40% were evenly divided among the validation dataset and testing dataset. The learning rate was initially set to 0.0001 and the number of training iterations was limited to 500. Taking into account the computing power available during D-CNN training, a tensor of 64 images was input at each iteration. In addition, a multiclass cross-entropy function (as shown in equation (8)) was employed owing to the multiclass classification task involved. Finally, we adopted Adam optimization [27] during training, which can adaptively adjust the learning rate of each parameter, using estimations of the first moment and second moment of the gradient, to allow for relatively stable variations in the parameters.(8)Loss=1N∑i−∑iMyiclogpic.The loss obtained by the proposed character classifier from equation (8) during training and validation and its accuracy values obtained during training, validation, and testing are, respectively, presented in Figures 10(a) and 10(b) with respect to the number of iterations. We note from Figure 10(a) that the loss of our character classifier decreases very rapidly to nearly 0 after only about 100 iterations for both the training and validation datasets. Correspondingly, we also note from Figure 10(b) that the accuracy values rapidly approach 99.89%, 96.30%, and 97.99% with increasing iterations for the training dataset, validation dataset, and testing dataset, respectively, where values are presented in the latter case only for every 5th iteration.Figure 10
Loss values (a) obtained by the proposed character classifier from equation (8) during training and validation, and its accuracy values (b) obtained during training, validation, and testing.
(a)(b)


## 6. Summary

This paper addressed the unique challenges associated with the application of object detection for kitchen appliance scene images by proposing an improved network based on faster R-CNN. We put forward D-RPN structure that improved RPN in the faster R-CNN. It consists of a series of feature enhancement modules and these modules reconstructed a U-shaped network structure. Proposed feature enhancement modules use the multiscale feature reinforcement method that fuses features extracted from3×3, 5×5, and 7×7 convolution layers, respectively. The multiscale feature enhancement module outperforms the other module using single-scale such as only 3×3, 5×5, and 7×7 convolution layers. In addition, experiments show that our D-RPN structure acquires 0.8984 mAP value and performs better compared to other state-of-the-art object detection methods such as faster R-CNN, SSD, YOLOv3, and YOLOv4. Ultimately, our high-precision target detection method can also be applied to text recognition, also with good results.Although we have achieved satisfactory results with our proposed approach, there are a lot of works to be done. In terms of dataset, we need more data of kitchen appliance control panel to improve the generalizability of the model and reduce the risk of overfitting. In terms of feature extraction, VGG16 is not necessarily the best backbone feature extraction network. Therefore, we need to research the influence of other backbone feature extraction networks on the accuracy of the model, for example, ResNet-50 and ResNet-101. Finally, there is a data imbalance problem in our dataset. For instance, the text symbols (text) always have much more than the plus symbols (add) and minus symbols (sub). However, we tried to use the focal loss function but did not get the results we expected, so we still need to study the data imbalance problem in our future work.



---

*Source: 6641491-2020-12-17.xml*