Abstract

The inspection of some substances usually includes two levels. One is the detection of the physical properties of the substance, which can be carried out through a series of physical detection methods and corresponding physical experiments. In the process of chemical detection, the color change after a chemical reaction is an extremely identifying optical property feature. In today’s increasingly mature Internet technology and related computer technology, the combination of this important identification chemical reaction and the former makes the chemical detection method visualized. The biggest difficulty in the application of this technology is to divide the color units produced by the chemical reaction in the contrast color sensor, which directly affects the identification process of the chemical reaction in the subsequent process. In order to better solve this problem, this paper will use a deep convolutional neural network to process the segmentation process of color units. And it is realized by image semantic processing of colorimetric sensor array and deep convolutional neural network processing of imaging. And through the experimental experiments based on convolutional neural network image segmentation processing, the results show that the efficiency of extracting features corresponding to different layers in the convolutional neural network is that the extraction efficiency of feature 1 and feature 2 is higher in the processing of 4 layers. They achieve 79.11%, 76.13%, 77.61%, 91.11% 92.31%, 91.05%, 91.03%, and 91.03%, respectively, and the extraction rate for feature 3 at layer 4 reaches 96.19%. It can be known from the above results that the segmented part of the image generated by the colorimetric sensor array processed by the deep convolutional neural network will be more conducive to the final color unit identification.

1. Introduction

For the detection of substances, in the current period of technological development, the detection methods have been developed to varying degrees. The object of this article is to improve the chemical detection methods of substances. This is because people are usually directly involved in the process of testing the chemical properties of traditional substances. This will have a certain impact on the final detection result. The part that the inspector participates in usually includes the process of the experiment and the segmentation of the secondary results of the inspection, etc. The processing efficiency of these processes will be much slower. The first solution to this problem is to use an array of colorimetric sensors to visually visualize chemical reactions. The use of this sensor will make the chemical detection process of substances better guaranteed, as well as the advantages of obtaining more objective data.

The colorimetric sensor array in the above process visually presents the chemical detection process of the substance on top of the detection result and also has qualitative and quantitative analysis related to chemical properties. This saves labor costs to a large extent and can also improve the accuracy of test results. However, the structural feature of this sensor is that multiple sensors with immobilized chemical properties are arranged in an array pattern. These sensors are relatively independent and can realize chemical reaction observation for different detection substances. However, in the colorimetric sensor, there is no efficient method for the division and reading of the information characteristics of the response result produced by a single sensor of the detected substance. To this end, this paper will introduce a convolutional neural network, by reading the corresponding features of a single sensor, and reasonably dividing the results of chemical reactions in different sensors in a colorimetric sensor.

As a bionic technology that visualizes the process of chemical reaction, colorimetric sensor plays an important role in the processing of some color-related chemical reaction image content. Among them, many people have made corresponding discussions on this. Haider et al. tested a relatively cheap compound substance with a corresponding colorimetric sensor array to measure the color change of the substance [1]. Goh et al. is a sulfonamide substance, by using a colorimetric sensor device to detect the color phenomenon in its chemical process [2]. Tao et al. applied the technical device of colorimetric sensor array to some therapeutic diagnosis [3]. Amourizi et al. used gold nanoparticles as the object of the colorimetric sensor, and the color change during the reaction process was collected through the imaging function of the sensor [4]. Zhang et al. carried out the detection of organic toxic substances with corresponding colorimetric sensors and tested the sensitivity of the substances according to the analysis results of the sensing device [5]. In the above researches, the chemical reactions of different substances are studied to make the whole chemical process better represented by the action of colorimetric sensors, which is helpful for some dangerous and objective data experiments. But none of these studies have improved the shortcomings of the colorimetric sensor device. In the chemical reaction that needs to use the sensor, due to the structural characteristics of the colorimetric sensor itself, some external artificial means can be used to separate and utilize the features obtained by the sensor. This is inconsistent with the timeliness of the experiment, and it is also the main part that needs to be improved.

In order to solve the problems faced by the above-mentioned colorimetric sensors, this paper will introduce an intelligent learning algorithm of convolutional neural network to segment the image content of the response imaging of the colorimetric sensor array. Some scholars have done some research on this. Chen et al. used the algorithm of convolutional neural network to perform independent feature extraction on the images generated in the array of contrast color sensors and perform segmentation processing based on it [6]. Wang et al. processed the imaging results of various chemical reactions by the colorimetric sensor array with a convolutional neural network algorithm and extracted the process of chemical reactions from simple to complex as much as possible according to certain rules [7]. Wang et al. integrated the learning model in the convolutional neural network with the recognition process of the colorimetric sensor array to improve the working efficiency of the sensor [8]. Wang et al. applied the convolutional neural network to the bottom layer and the mapping layer in the colorimetric sensor array and performed deep fusion [9]. Yang and Sun removed some noise in the image by processing the image after the chemical reaction generated by the colorimetric sensor array with a convolutional neural network algorithm [10]. While the colorimetric sensor array is collecting color images in chemical reactions, each sensor is relatively independent. This will have a greater impact on the segmentation and reading of the generated images, and the addition of the convolutional neural network algorithm will solve this problem well.

3. Deep Convolutional Neural Network Processing of Sensory Images

3.1. Image Semantic Processing of Colorimetric Sensor Arrays

The main application range of colorimetric sensor arrays is to image the results of chemical reactions of substances to determine the characteristics of chemical reactions. The difference between this kind of sensor and other kinds of chemical sensors is that it has the characteristics of recognizing a variety of complex substances, which helps to realize the detection of chemical mixed substances and complexes with various structures [11]. Therefore, the construction of this kind of sensor is not a single sensing device, but by placing a series of substances with sensitive characteristics and stable in the sensor for a long time in the device to realize the detection of different substances. In order to better understand the working process of this sensor, it is necessary to understand its working principle. The specific structure of this receptor is shown in Figure 1:

The structure in Figure 1 briefly describes the working principle of the colorimetric sensor array, each of which plays an important role in this detection device. Once a substance needs to be detected, the first step is to collect the image of the detected object before the chemical reaction occurs, then to obtain the image after the reaction, and finally to summarize the information on the detection point where the chemical reaction occurs [12]. The detection process needs further elaboration, because there is a certain gap between the theoretical principle and the actual detection process. In the process of detecting substances, certain preobservation is required for the change in color of the chemical reaction between the chemical substance in the colorimetric sensor and the substance to be detected. The specific working process of the colorimetric sensor can be represented with the help of Figure 2:

The working process of the colorimetric sensor array in Figure 2 is a very detailed description of the detection process of chemical properties of substances. The process of this detection can be summarized as follows: by turning on the switch of the control device, the temperature of the entire chemical reaction is regulated in advance, and when the temperature is suitable, the original light is turned on and waits for the sensor array [13]. Before this, a preimage acquisition of the sensor array is required, and after it is sampled, a second corporate image acquisition is also required. Some features, including color, etc., in the two images are compared, and the changed data are collected. The above procedure provides a comprehensive discussion of the general procedure for colorimetric sensors [14]. The content did not mention the shortcomings of the colorimetric sensor array. That is to say, the content of the image studied in this paper is semantic segmentation. The occurrence of this problem is related to the combination and arrangement of the sensing devices in the colorimetric sensor array, which is unavoidable to a certain extent. The best way to solve this problem is to use image segmentation to read key features in the image. Now the semantic segmentation of images is briefly explained, as shown in Figure 3:

In Figure 3, it can be known by comparing the original image of the two images with the effect image after image segmentation, semantic segmentation of an image is to extract some features in the image that can describe the main body of the image, instead of using the entire image. In this way, the key information of the image can be better used, and the corresponding data can even be refined [15]. This method is used in chemical detection and imaging of substances, which can make up for the shortcomings of colorimetric sensor arrays. The imaging images of chemical reactions collected by the above sensors are usually complex. In order to independently detect various elemental components, semantic segmentation of images is also one of the best methods. The extracted image features will include the scene and the types of objects in the image. This method of image processing is to identify the objects needed for research more accurately, and it is also a premise for better processing of complex substances [16]. In this paper, the semantic segmentation of the contrast difference map after the chemical reaction generated by the colorimetric sensor array is to better identify the complex detected substances and to pave the way for the improvement of the sensor in the subsequent process. The semantic segmentation process for images can be summarized as the following process in Figure 4:

The process in Figure 4 depicts the general processing of images, where the segmentation processing of the images is also correlated, which is consistent with the subsequent content of the processing of images produced in the colorimetric sensor array above. However, the disadvantage of this process is also obvious, that is, it takes a long time and needs to be checked manually after preprocessing. For this shortcoming, this paper will take the algorithm of convolutional neural network in machine learning to improve this, so as to speed up the process of image processing. The efficiency improvement of this step can directly affect the subsequent recognition process.

3.2. Processing of Imaging by Deep Convolutional Neural Networks

Convolutional neural networks are the result of deep learning within the machine learning process. The proposal of this technology is based on the human optic nervous system, and its application range is to process and apply the main object of vision, that is, images similar to the human optic nervous system [17]. But in this period of the continuous maturity and development of Internet technology and computer science, the image information that human beings come into contact with every day is huge. If you continue to use traditional image recognition as the front-end input method, it will have a greater impact on the life of individuals in the entire society. Convolutional neural network has the characteristics of sensitivity to local information in image processing and the distribution of the corresponding image feature weight ratio, which makes image processing a more emerging field. The original convolutional neural network research was developed for animal vision. For this neural network, its internal structure is diverse. Its own characteristics make it have the characteristics of horizontal movement, fixed rotation, and gathering and dispersing [18]. The features here include discontinuous connections for image processing, distribution of image feature weights, and the ability to process images with multiple features. The general architecture of a convolutional neural network can be represented by Figure 5:

Figure 5 clearly depicts the basic architecture inside the convolutional neural network, and the various operational processing levels contained in it are necessary for the operation of the entire convolutional neural network. For the initial part of the convolutional neural network, it is usually composed of two different layers: the convolutional surface and the pooling surface that reduces sampling. Among them, the convolution surface is used to extract the characteristic parts of the image, and the function of the pooling surface is to associate the obtained features [19]. The way of this association is to solve the maximum value of the most obvious features in the image, and in order to reduce the steps in the convolution process and transfer the data, it is necessary to use adjacent pooling surfaces to participate in the calculation together. In addition, for the difference of each feature in the processed image, the determining factor is the weight sharing value in the convolutional neural network. By processing and transforming the corresponding processed images at different levels in the above two levels, it is the complete structure of the deep convolutional neural network. For the convolutional layer in Figure 5, its connection with the upper and lower neural units is through partial associations, not all associations. This requires a mathematical description of the process from the input level to the output level. The corresponding calculation formula is as follows:

The expression in the formula is the key driving weight in the convolution layer, which plays a key role in rearranging the proportion of image features. The and correspond to the arrangement in the convolution kernel, that is, the position. is the activation factor in the process of operation, and are also applicable to describe the arrangement position before image convolution. The convolution operations that have been carried out in the convolution process are based on the core of the neural network, that is, the convolution kernel. The process of convolution is similar to the parallel sliding filter device. When a global convolution operation is required for an image, the corresponding result image of each convolution can be expressed by the following formula:

In the formula, represents the size of an image with the original image features corresponding to the convolution operation, and represents the original image size. represents the number of permutation layers corresponding to the entire convolutional layer. The above-mentioned processes only perform a corresponding convolution process on an image with one feature, but a higher-level solution is required for images with multiple features. The best way is to combine the convolution images generated in the convolution process before and after the feature images at different levels, and finally the result can be calculated by the calculation method in Formula (1) [20]. As can be seen from the structure in Figure 5, the next step is to reduce the sampling level to simplify the operation process of the convolutional neural network. The dimensionality reduction on the features of the image is to use fewer features to represent the original image. There are two different ways. One is to divide the original image into images of the same size and calculate according to the following formula:

Another method of dimensionality reduction is achieved by suppressing some noise in the image. The corresponding formula is as follows:

Although the formula is to reduce the dimension of the noise in the image, it also suppresses the boundary information of the image at the same time. The obtained image is a relatively balanced state. After the above-mentioned dimensionality reduction processing for image features, the calculation process of the acquired feature image is still consistent with the Formula (2) [21]. Associating the two processes of convolution and dimensionality reduction, it can be known that the pooling process can only be activated by obtaining the feature map of the original image through convolution. And the premise also needs to project the feature map obtained by convolution. Only through projection processing, the features extracted by convolution can be partially transmitted to the level of dimensionality reduction sampling, and the feature image obtained through dimensionality reduction sampling processing can be expressed by the following formula:

in the formula represents the range of feature dimensionality reduction processing for the feature map after convolution, where represents the serial number of the element involved. The dimensionality reduction of the features of the convolved image not only simplifies the recognition process but also lays the groundwork for image feature extraction in the subsequent convolution process. Therefore, the characteristics of the image after dimensionality reduction sampling are very distinct, which can help the classification of the subsequent neural network. For the solution of the activation value of the subsequent convolution operation generated by the dimensionality reduction sampling, the following function can be used to solve it:

The above functional relationship can modify the value after dimensionality reduction sampling to a certain extent, which has a great effect on the subsequent convolution operation. The process of dimensionality reduction sampling can be summarized into several types. One is to move the image features in parallel, and the other is to rotate the features. The corresponding process can be represented by Figure 6:

Figure 6 provides a comprehensive explanation of the two types of feature transfer after image convolution. The upper part of the figure is the feature image obtained after parallel transformation, in which the largest feature of the image is preserved. The illustration in the lower part is that the feature elements in the image are rotated and transformed. Although the image features are preserved at this time, the obviousness of the features is reduced. The above is an explanation of the key technologies in the convolutional neural network process, but the last part of the convolutional neural network, the connection level, is the key to the final image recognition. For this level, it is necessary to process the characteristics of the image in a certain way, and the processing process is as follows. Now suppose that there is a variable , which can be classified into categories, . The probability of occurrence of each of them can be expressed by the following formula:

The formula divides the features in the image into corresponding categories, and the calculation of the probability corresponding to can be expressed as

It can be obtained by the formula:

The series of formulas are carried out for the distribution of mathematical terms for various types of image features [22]. For the features on the level, the formula can be used to solve:

There are also:

In the process, some functions with special instructions are applied accordingly. For the fully connected layer, it can be associated with the following connection function, and the expression of the function is as follows:

And it is also necessary for the function to be defined, and the defined formula expression is as follows:

For the calculation of the corresponding inverse function of the above process, it can be obtained:

The summation transformation of the formula can be obtained:

Finally, after the transformation of the formula, the final image processing function can be obtained, and its expression is as follows:

The calculation of the formula projects the elements of the feature as to in the formula, where is a value between . This feature is described here as a possible situation in a global classification process. Finally, the image features in the convolution layer and the dimensionality reduction sampling layer are fused accordingly, and the corresponding formula is expressed as follows:

The above process shows the relevant calculations of each part in the convolutional neural network, which is the whole process of processing colorimetric sensor imaging in this paper.

4. Image Segmentation Processing Experiment Based on Convolutional Neural Network

4.1. Colorimetric Sensor Array Experimental Data

For colorimetric sensors, what it wants to achieve is the ultimate identification of the chemical properties of complex substances. In order to distinguish one or more complex substances to be detected according to the characteristics of the chemical reaction of the substances, it is first necessary to input parameters with reference value in the colorimetric sensor, which should be the optical spectrum corresponding to the color here. These data will be used as one of the basis for the final image recognition. The optical spectrum parameters corresponding to several colors are selected here, as shown in Table 1:

The parameters in Table 1 are the basis for the subsequent experiments of the colorimetric sensor. In addition, the material and concentration of the detection substance in the detection device in the colorimetric sensor also need to be set. This is the premise work of chemical reaction, and its function is to make the chemical reaction obvious by color, and it is the prototype of the array in the colorimetric sensor. The corresponding reactant parameters are shown in Table 2:

Several reactants in Table 2 are placed in the colorimetric sensor as a detection substance, but they are not placed individually but are placed in the form of a unit structure. The measurement of the detection accuracy of the colorimetric sensor array is also necessary before the experiment. Because the various arrays in the sensor are not relatively independent, there will be different segmentation effects between different units. The corresponding segmentation effect statistics are shown in Table 3:

From the data in Table 3, it can be known that the generated image in the colorimetric sensor does not completely reach the normal state. This is one of the major drawbacks of the colorimetric sensor. Because, when this happens, it needs human intervention to solve it. Several algorithms in the table are the processing methods that the sensor comes with during segmentation. It can be seen that the processing effect of Algorithm 1 is the most stable. For the final recognition results compared with the expected results, the results in Table 4 can be obtained:

The results in Table 4 also confirm the defects present in the colorimetric sensor. However, this kind of problem is within the controllable range, and in order to better deal with this critical problem, this paper will use convolutional neural network to improve it. In this way, the image segmentation accuracy of the entire colorimetric sensor array is improved.

4.2. Colorimetric Sensor Image Segmentation Experiment

In the research of colorimetric sensors, the working process involves many influences between the detected objects. It can be known from the working process of the colorimetric sensor array in Figure 2 that the colorimetric sensor finally needs to perform image conversion and extraction of specific features for the chemical reaction generated on the array. Among them, the corresponding image will be divided and read according to the feature weight ratio preset by the sensor, and the corresponding segmentation accuracy is shown in Figure 7:

The results in Figure 7 comprehensively discuss the process of image recognition and segmentation in the colorimetric sensor array. The premise of image recognition after chemical reaction is the reasonable segmentation of the image by the image system. The extraction of the chemical reaction image of the colorimetric sensor array in this paper will be carried out according to the features in the reaction result. The results in the figure show that the segmentation accuracy of a normal array response recognition image is the best. No matter what the corresponding feature weight is, it reaches more than 94%, and the highest accuracy reaches 97.19%, and the corresponding feature weight is 0.1. Through the finished products after different image segmentation, it can be known that the segmentation image distribution is uneven, and the accuracy of image blurring is the worst, and the best result does not exceed 92%.

4.3. Image Segmentation Processing Experiment under Convolutional Neural Network

Experiments are performed on image segmentation, and the corresponding processing will be carried out with the help of convolutional neural network in this paper. The operation process of convolutional neural network is mainly aimed at the problem of feature weakening in the process of image processing. The defect of the colorimetric sensor array in this paper is that it is prone to errors in image feature extraction when detecting the chemical properties of substances. The convolutional neural network is to enlarge the most representative features to represent the original image. The efficiency of feature extraction at each level in the neural network is different. The results of the specific levels are shown in Figure 8:

The extraction efficiency of different features at different levels in the neural network is different. From the figure, it can be known that the extraction efficiency of each layer is closely related to the extracted features. Among them, the extraction efficiency of feature 1 and feature 2 is higher in the 4-layer processing, reaching 79.11%, 76.13%, 77.61%, 91.11%, 92.31%, 91.05%, 91.03%, and 91.03%, respectively. During this process, the extraction rate of feature 3 in the fourth layer reaches 96.19%. All of these show that the convolutional neural network can play a certain role in the feature extraction of pictures, but this method requires prematching with the corresponding detected features. Since the features of the image are extracted by means of algorithms, the loss of image information is also involved. Because the processing of the convolutional neural network is to select the part of the feature for representation, the semantic segmentation of the content of the image needs to measure the loss degree, and the corresponding result is shown in Figure 9:

It can be seen from the results in Figure 9 that the convolutional neural network proposed in this paper can better reduce the loss of important information for the extraction of image information, which corresponds to loss 3 and loss 4 in the figure. And the features after 15 can be basically retained, and the rate of change is very stable. This has a very good auxiliary role for the recognition of image semantics of the colorimetric sensor array.

5. Conclusions

The research in this paper is aiming to improve the image imaging process of the chemical properties of complex substances, so as to expect better optimization of traditional image processing. The method of detecting the chemical properties of substances in this paper is a colorimetric sensor array. The realization of this device requires the help of many other accessories, and the feature of this device is that the traditional chemical reaction process gets rid of the dependence on manual operation. The feature of the device is that it can detect a variety of complex substances at the same time, so as to improve the detection efficiency, but for this, the problem of segmentation of various image units is prone to occur in the detection process. Therefore, this paper helps the image processing process by introducing the convolutional neural network. This kind of neural network can realize the retention and extraction of the main features of the image, so as to represent the semantic content in the image, which is a very reasonable research. However, the research in this paper does not explore the use of convolutional neural networks in more depth, which is another direction for the future.

Data Availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declared no potential conflicts of interest with respect to the research, author-ship, and/or publication of this article.