Mirror Mosaicking: A Novel Approach to Achieve High-performance
Classification of Gases Leveraging Convolutional Neural Network
S. N. Chaudhri
a
and N. S. Rajput
b
Indian Institute of Technology (BHU), Varanasi-221005, UP, India
Keywords: Mirror Mosaicking, Gas Sensor Array, Electronic Nose, Gas Classification, Pattern Recognition,
Convolutional Neural Network.
Abstract: Limited dimensionality of the dataset obtained from an electronic nose (EN) is due to the number of elements
in the sensor array used generally in the range of 4-8 elements only. Further, large number of sensor data can
be generated by sampling the sensor responses both during the transient and steady states. The lower-
dimensionality of sensor data prohibits the use of a convolutional neural network (CNN)-based pattern
recognition techniques because the kernels of a CNN cannot be used on the obtained sample vectors to extract
the features. In this paper, we have proposed a novel approach to enhance the data dimensionality keeping the
sensor response characteristics absolutely unaltered. By leveraging the concept of mirror mosaicking
technique, we have upscaled the input sample vectors into a 6×6 2-D input arrays to train the shallow CNN.
Using the proposed approach, all the 16-unknown steady-state test samples classified accurately which are
not used during the training. Moreover, the parameters of the classification report viz., Precision, Recall, and
F1 score also obtained with a fraction value of 1.00. The proposed technique is a generic approach that can
be used to classify various low-dimensional datasets obtained from various sensor arrays in various fields.
1 INTRODUCTION
In the current scenario, Artificial Intelligence (AI),
Machine Learning (ML), Deep Learning (DL), and
modern Pattern Recognition (PR) techniques are
finding their applications in almost all the research
areas; for delivering better results. An electronic nose
(EN) is the mimicry of the olfactory system that is a
popular topic of research as a multidisciplinary area.
The word multidisciplinary represents the wide area
of applications of EN related to different industries.
Various traditional pattern recognition approaches
have been used for the classification of gases or
odors, as described by (Santos et al., 2017; Fujinaka
et al., 2008; Hodgins and Simmonds, 1995; Tang et
al., 2010; Keller et al., 1995; Rodrguez et al., 2010;
Capelli et al., 2014; Kızıl et al., 2017; Chen et al.,
2013). The EN is a system that contains a gas sensor
array consisting of few sensors typically 4 to 16.
Moreover, data pre-processing and pattern
recognition modules are the main parts of any EN
system (Arshak et al., 2004). The EN system can be
a
https://orcid.org/0000-0002-5436-2977
b
https://orcid.org/0000-0002-1650-011X
made more selective for analytes under observation,
using an array of sensors (Zhang et al., 2017). A gas
sensor array logically has more than one sensor
element to enhance the selectivity of the system. If
there are fewer numbers of sensors in a gas sensor
array, the resulting response dataset has a feature
vector of limited size for each sample. A concept of
mirror mosaicking technique is proposed in this work
to broaden the applicability of deep learning pattern
recognition techniques for automatic feature
extraction and classification of small gas sensor array
responses. Subsequently, any gas sensor array
response can be analyzed using the convolutional
neural network (CNN) at the sample level irrespective
of the size of the gas sensor array. The feature vector
of any sample is obtained from the respective gas
sensor array response having the length equal to the
number of the sensor elements. Each pattern
recognition technique requires a specific input format
or length of the feature vector. For example, various
dimensional versions viz., 1-D, 2-D, and 3-D based
on the type of operation of the convolution of CNN
86
Chaudhri, S. and Rajput, N.
Mirror Mosaicking: A Novel Approach to Achieve High-performance Classification of Gases Leveraging Convolutional Neural Network.
DOI: 10.5220/0010251500860091
In Proceedings of the 10th International Conference on Sensor Networks (SENSORNETS 2021), pages 86-91
ISBN: 978-989-758-489-3
Copyright
c
2021 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
require a 1-D vector, 2-D array, and 3-D array (Eren,
2017; Yamashita et al., 2018). Therefore, each
version has its limitation of input sample
representation. A 2-D CNN has vast popularity in the
area of computer vision and image processing.
However, any of the versions of CNN can be used
depending on the available dimension of the sample.
In this work, data pre-processing and classification
parts of an EN system has been demonstrated. The
pre-processing has been used to obtain the mosaicked
sample and later on the classification task is
implemented using a convolutional neural network.
The rest content has been organized in the
following sections. The proposed mirror mosaicking
technique has been explained in Section 2. While
Section 3 describes the designed convolutional neural
network to generalize the proposed approach.
Moreover, Section 4 and Section 5 are dedicated to
the used material and obtained results, respectively.
Lastly, the conclusions have been summed up in
Section 6.
2 MIRROR MOSAICKING
2.1 Need of Mirror Mosaicking
As discussed in the previous section, the particular
dimensional version of CNN requires a specific
format of the input. The 1-D CNN requires input as a
feature vector. The 1-D CNN significantly can be
applied if the feature vector has sufficient length. The
length of the feature vector proportionally depends on
the number of sensor elements in the gas sensor array.
As quoted earlier, a gas sensor array has more than
one sensor element, then the least possible array must
have two gas sensors elements. Let us suppose we
have the smallest gas sensor array, then the feature
vector of this array will have a length of 2 units. This
length of the feature vector is insufficient to explore
the significance of the 1-D CNN. Similarly, the 2-D
CNN needs input in the form of a 2-D/3-D matrix
(grayscale/color image). A feature vector of the
smallest sensor array of length 2 units is incompatible
for converting into a 2-D matrix. Therefore, the
sample obtained from this sensor array cannot be feed
as input into the 1-D CNN or the 2-D CNN and the
subsequent higher dimensional version 3-D CNN.
Consequently, a sample obtained from the least
feasible gas sensor array or the gas sensor array with
two sensor elements is insufficient to deal with the 1-
D CNN and the 2-D CNN. Moreover, these samples
will also be insufficient to the subsequent higher
dimensional version of CNN that is 3-D CNN. Hence
a technique called mirror mosaicking has been
proposed so that each sample obtained from any
sensor array can be analyzed using 2-D CNN. The
popularity of 2-D CNN has been proved worldwide
by computer vision and image classification
applications.
2.2 Implementation of Mirror
Mosaicking
The proposed mirror mosaicking is the approach in
which each sample vector obtained from any gas
sensor array can be converted into a 2-D matrix of
significant size so that a 2-D CNN can be applied at
the sample level (Chaudhri et al., 2020). First of all,
the original sample feature vector is converted into
the square 2-D matrix using zero-padding if required.
Subsequently, the mirror mosaicking technique is
applied to this square 2-D matrix to obtain the desired
mosaicked sample compatible with the 2-D CNN.
Figure 1: Directions of Mirrors.
Let's assumed that eight mirrors are placed around
the square 2-D matrix obtained from the original
sample feature vector using zero-padding if required.
The corresponding directions of the mirrors are
shown in Figure 1. The obtained corresponding
mirror images of the square 2-D matrix at the center
are mosaicked with it at their respective locations to
obtain the desired mosaicked sample. Thus, the
obtained mosaicked sample of the corresponding
original sample now compatible as input to the 2-D
CNN. Further, the depth of the used 2-D CNN is the
thing to note down. There is no restriction for the
depth of the network based on the fully connected
layers provided the increasing number of layers
makes the model complex. But concerning the
convolutional and the pooling layers, the network
depth depends on the size of the input. Considering
the case of the smallest feasible gas sensor array a
shallow convolutional neural network (SCNN) has
Mirror Mosaicking: A Novel Approach to Achieve High-performance Classification of Gases Leveraging Convolutional Neural Network
87
been designed that can be extended according to the
size of the input by adding more convolutional or
pooling layers. The word shallow indicates that few
convolutional layers in the designed 2-D CNN are
two according to the size of the input.
3 SHALLOW CONVOLUTIONAL
NEURAL NETWORK (SCNN)
As quoted in Section 2, the designed shallow
convolutional neural network (SCNN) has two
convolutional layers. Depending on the size of the
available input sample, convolutional and pooling
layers can be increased in the designed model. Mainly
pooling layers are used in those deep networks which
are specifically designed to deal with image-related
tasks because images are made of large 2-D matrices.
In our work, SCNN is designed to classify the gases
using gas sensor array responses which have a limited
sample size. But the SCNN can be extended to
classify the responses obtained from the gas sensor
array having any number of sensor elements. The
used SCNN has the following layers:
Convolutional Layers (Input Layer)
Flatten Layer
Dense or Fully Connected Layers
Dropout Layers
Softmax Layer (Output Layer)
The SCNN with the mentioned layers has been
designed considering the smallest gas sensor array. A
brief theoretical introduction for the basic layers is
given below (Bhandare et al., 2016):
Convolutional Layers.
The model attains the leading significance of
automatic feature extraction by this layer. In this
layer, the number of kernels is initialized, which are
used to produce the same number of feature maps.
The feature maps are obtained from the convolution
of the input and the kernel. All the stacked feature
maps are forwarded to the next layer in the form of
input.
Pooling Layers.
It is used for down-sampling. There are three basic
types of pooling namely max pooling, min pooling,
and average pooling. Out of the three types, max
pooling is used widely.
Flatten and Fully Connected Layers.
The flatten layer is used after all the used
convolutional and pooling layers to convert the output
feature map into the vector format. Subsequently, the
dense layers or the fully connected layers are used. A
fully connected layer is that in which each neuron is
connected to each neuron of the previous and next
layer.
Softmax Layer.
The softmax layer is the output layer in which the
number of neurons must equal to the number of
targets. In this layer, for each input, the membership
fraction corresponding to each target is obtained.
Dropout and Normalization Layers.
The dropout and the normalization, both layers are
used to get rid of overfitting. In the dropout layer, a
dropout amount is initialized to discard the neurons
containing the value less than or equal to the dropout
amount. The value of the dropout amount always lies
between 0 and 1. While, the normalization is required
for improving the speed, performance, and stability of
the network, in the complex network models.
After the brief introduction of the layers, the
architecture of the designed SCNN can be explained
easily. This model contains two convolutional layers,
the flatten layer, a fully connected layer, and the
softmax layer. The model termed as shallow network
instead of a deep network, due to the use of only two
convolutional layers. A schematic diagram of the
proposed network is shown in Figure 2. Since the
input size is limited, so there is no need for down-
sampling. Accordingly, the pooling layer has not been
used in the proposed network. If the CNNs are used
to deal with image data (large matrices), then pooling
layers are essentially used in the designed network.
4 USED MATERIAL
In this work, the material used to verify the proposed
methodology has been taken from a thick film gas
sensor array. This gas sensor array consists of the
following four sensors:
Cadmium sulfide (CdS)
Molybdenum Oxide (MoO)
Tin Oxide (SnO
2
)
Zinc Oxide (ZnO)
Four gases had been exposed to this array in the
ambiance of Nitrogen (N2). These gases are
mentioned below:
Acetone (CH
3
COCH
3
)/ACE
Carbon Tetrachloride (CCl
4
)/CAR
Ethyl Methyl Ketone (C
2
H
5
COCH
3
)/EMK
Xylene (CH
3
C
6
H
4
CH
3
)/XYL
SENSORNETS 2021 - 10th International Conference on Sensor Networks
88
The steady-state response of the mentioned gas sensor
array has been taken to verify the results. The SCNN
has been trained with exclusive samples from the test
samples. Later on, the classification performance is
obtained using test samples. The performance of the
classifier model on a smaller dataset signifies the
applicability of the proposed methodology using the
mirror mosaicking technique. Moreover, our
methodology is not limited to the number of samples
or number of the sensor elements in the gas sensor
array. It can be used for any gas sensor array. The
explained details about the gas sensor array and its
response are given in (Nayak et al., 1994; Rajput et
al., 2010).
Figure 2: Schematic block diagram of SCNN.
5 RESULTS AND DISCUSSION
The results obtained from the classifying network
SCNN after applying on the steady-state response
dataset has been discussed in this section. The
parameters that are used to tune the classifying
network have been listed in Table 1. The
classification of all the instances proves the
applicability and efficiency of our proposed
technique. The classification report is shown in Table
2. Precision, Recall, and F1-score metrics are shown
in the report. The expressions for all the metrics have
been given in equation (1), (2), and (3) respectively.
All the aforesaid metrics have been calculated based
on the confusion matrix. A confusion matrix is a
square matrix of size equal to the targets. The
elements of this matrix show the description of the
reference points and the corresponding predicted
outputs.
Precision
TP
TP
FP
(1)
Recall
TP
TP
FN
(2)
F1 Score
2 ∗ Precision ∗ Recall
Precision  Recall
(3)
Accurac
y
TP  TN
TP  TN
FPFN
(4)
The overall accuracy has been given by equation (4).
The term TP, TN, FP, FN in equation (1), (2), (3), and
(4) represent the correctly predicted positive values,
correctly predicted negative values, actual negative
predicted positive, and actual positive predicted
negative values respectively. Using equation (4) the
overall accuracy has been obtained equal to 1.00. In
terms of the percentage, it is obtained as 100%, as
shown in Table 2. Moreover, the overall classification
accuracies for the used dataset have been given in
Table 3 using various classifying techniques.
The proposed technique is a comprehensive
approach that can also be used to classify the dataset
obtained from the transient response of a gas sensor
array. There are two ways to deal with the transient
response. Firstly, the last observation of transient
response can be considered as a steady-state response.
Secondly, the averaged transient response can be
considered as a steady-state response. In this way, the
huge computational cost can be reduced up to a very
low cost. Moreover, the pre-processing and
classification procedure will remain the same.
Table 1: Model Parameters.
Size of input samples 6×6
Convolutional layer 1
Number of kernels
Size of kernels Activation
64
3×3
tanh
Convolutional layer 2
Number of kernels
Size of kernels
Activation
64
3×3
tanh
Flatten layer ( )
Fully connected layer 1
Number of neurons Activation
64
tanh
Dropout layer 1 0.25
Softmax layer
Number of targets
Activation
4
softmax
Optimizer
Learning rate
Adam
0.001
6 CONCLUSIONS
The proposed technique provides all the samples
well-classified that proves the significance of the
mirror mosaicking technique. The proposed
technique can be used to classify any gas sensor array
response using well-known CNN-based pattern
recognition techniques. In a nutshell, the points of
significance of this paper can be stated as follows:
Mirror Mosaicking: A Novel Approach to Achieve High-performance Classification of Gases Leveraging Convolutional Neural Network
89
A new technique "Mirror Mosaicking" of data
pre-processing has been proposed.
The dataset obtained from the response of the least
feasible size gas sensor array can be classified
using a convolutional neural network using mirror
mosaicking.
Table 2: Classification Accuracies for Classical Machine
Learning Datasets using Convolutional Neural Network
based on Mirror Mosaicking Approach.
Datasets
Train/Test
Samples
Overall Test
Accuracy (%)
IRIS Dataset 120/30 100
Wine Dataset 112/66 98.48
Parkinson’s
Dataset
136/59 100
Table 3: Classification Report.
Precision Recall
F1
Score
Support
ACE 1.00 1.00 1.00 2
CAR 1.00 1.00 1.00 3
EMK 1.00 1.00 1.00 6
XYL 1.00 1.00 1.00 5
Avg./
Total
1.00 1.00 1.00 16
Test
Accuracy
100%
The proposed technique is a generic approach that
can be used to classify any other non-imaging
datasets, obtained from any other sensor arrays in
various fields. For example, various classical
machine learning datasets viz., iris data, wine data,
Parkinson's disease data (Dua et al., 2019; Little et al.,
2007), etc. can be classified accurately by using the
proposed technique. The classification accuracies for
these datasets have been given in Table 4 which have
been obtained using convolutional neural networks
based on the mirror mosaicking approach.
Table 4: Classification Accuracies using Various
Classifiers.
Classifier Overall Accuracy (%)
KNN 87.50
Linear SVM 81.25
RBF SVM 87.50
Random Forest 93.75
Naïve Bayes 87.50
ACKNOWLEDGEMENTS
We acknowledge the administrative, technical and
financial support received in parts from NCC LAB,
Department of Electronics Engineering, IIT (BHU),
INDIA (Grant No. IS/ ST/ EC-13-14/02) and from
M/s IBM, INDIA (Grant No. R&D/ IBM/
SBApp/Electronics/ 15-16/ 07).
REFERENCES
Arshak, K., Moore, E., Lyons, G. M., Harris, J., and
Clifford, S. (2004). A review of gas sensors employed
in electronic nose applications. Sensors Rev., vol. 24,
no. 2, pp. 181-198.
Bhandare, A., Bhide, M., Gokhale, P., and Chandavarkar,
R. (2016). Applications of convolutional neural
networks. International Journal of Computer Science
and Information Technologies, pp. 2206-2215.
Capelli, L., Sironi, S., and Rosso, R. D. (2014). Electronic
noses for environmental monitoring applications.
Sensors, 14 (11), pp. 19979-20007.
Chaudhri, S. N., Rajput, N. S., and Singh, K. P. (2020). The
novel camouflaged false color composites for the
vegetation verified by novel sample level mirror
mosaicking based convolutional neural network.
InGARSS 2020, to be published (Accepted).
Chen, S., Wang, Y., and Choi, S. (2013). Applications and
technology of electronic nose for clinical
diagnosis. Open Journal of Applied Biosensor 2, pp.
39-50.
Dua, D., and Graff, C. (2019). UCI Machine Learning
Repository [http://archive.ics.uci.edu/ml]. Irvine, CA:
University of California, School of Information and
Computer Science.
Eren, L. (2017). Bearing fault detection by one-dimensional
convolutional neural networks. Mathematical Problems
in Engineering, 1–9.
Fujinaka, T., Yoshioka, M., Omatu, S., and Kosaka, T.
(2008). Intelligent electronic nose systems for fire
detection systems based on neural networks. The 2nd
International Conference on Advanced Engineering
Computing and Applications in Sciences ADVCOMP,
pp. 551-554.
Hodgins, D., and Simmonds, D. (1995). The electronic nose
and its application to the manufacture of food products.
J. Automatic Chemistry, vol. 17, no. 5, pp. 179-185.
Keller, P. E., Kangas, L. J., Liden, L. H., Hashem, S., and
Kouzes, R. T. (1995). Electronic noses and their
applications. IEEE Northcon/Technical Applications
Conference (TAC’95), pp. 116-119.
Kızıl, U., Genç, L., and Aksu, S. (2017). Air quality
mapping using an e-nose system in Northwestern
Turkey. Agronomy Research.15(1): 205-218.
Little, M. A., McSharry, P. E., Roberts, S. J., Costello, D.,
and Moroz, I. M. (2007). Exploiting nonlinear
SENSORNETS 2021 - 10th International Conference on Sensor Networks
90
recurrence and fractal scaling properties for voice
disorder detection. Biomed. Engg., vol. 6, no. 23.
Nayak, M. S., Dwivedi, R., and Srivastava, S. K. (1994).
Sensitivity and response times of doped tin oxide
integrated gas sensors. Microelectron. J. 25, 17–25.
Rajput, N. S., Das, R. R., Mishra, V. N., Singh, K. P., and
Dwivedi, R. (2010). A neural net implementation of
SPCA pre-processor for gas/odor classification using
the responses of thick film gas sensor array, Sensors
and Actuators B: Chemical, vol. 148, pp. 550–558.
Rodrguez, J., Durn, C., and Reyes, A. (2010). Electronic
nose for quality control of Colombian coffee through
the detection of defects in cup tests. Sensors, vol. 10,
no. 1, pp. 36-46.
Santos, J. P., Lozano, J., and Aleixandre, M. (2017).
Electronic noses applications in beer technology. Brew.
Technol. 177.
Tang, K.-T., Chiu, S.-W., Pan, C.-H., Hsieh, H.-Y., Liang,
Y.-S., and Liu, S.-C. (2010). Development of a portable
electronic nose system for the detection and
classification of fruity odors", Sensors, vol. 10, pp.
9179-9193.
Yamashita, R., Nishio, M., Do, R. K. G., and Togashi, K.
(2018). Convolutional neural networks: an overview
and application in radiology. Insights Imaging 2018.
Zhang, Y., Zhao, J., Du, T., Zhu, Z., Zhang, J., and Liu, Q.
(2017). A gas sensor array for the simultaneous
detection of multiple VOCs. Sci. Rep., 7, p. 1960.
Mirror Mosaicking: A Novel Approach to Achieve High-performance Classification of Gases Leveraging Convolutional Neural Network
91