Hybrid System for Image Classification using CNN and Low Image Processing

DOI : 10.17577/IJERTV11IS110022

Download Full-Text PDF Cite this Publication

Text Only Version

Hybrid System for Image Classification using CNN and Low Image Processing

Khaled Omar 1

College of Informatics technology, Damascus univeristy

Damascus, Sysria

Zo-Alfekar Ebrahim 2 Master of Web Science Syrian Virtual University Damascus, Syria

AbstractImage classification is a rich filed of artificial intelligence, and many algorithms for image classification has been developed, and these developed algorithms depends on various methods and technologies. according to the specification of the image classification problems , in this article we have developed a hybrid system for image classification to four predefined image classes (ID,IDBack, Signature, Student Card), this system based on image classification algorithm which contains two main classifiers, the first classifier is a deep learning classifier, and the second one is a low image processing classifier , by using these two classifier the developed system has reached to a high classification accuracy rate (up to 96%).

Keywords: Image classification, CNN image classification, low image processing classification

  1. INTRODUCTION

    This template, modified in MS Word 2007 and saved as a Word 97-2003 Document for the PC, provides authors with most of the formatting specifications needed for preparing electronic versions of their papers. All standard paper components have been specified for three reasons: (1) ease of use when formatting individual papers, (2) automatic compliance to electronic requirements that facilitate the concurrent or later production of electronic products, and (3) conformity of style throughout a conference proceedings. Margins, column widths, line spacing, and type styles are built-in; examples of the type styles are provided throughout this document and are identified in italic type, within parentheses, following the example. Some components, such as multi-leveled equations, graphics, and tables are not prescribed, although the various table text styles are provided. The formatter will need to create these components, incorporating the applicable criteria that follow.

    The usage of Image classification systems is needed rapidly, that a huge images data has been published on the internet, so by this increasing of images data the needing of the classification of these data is increasing rapidly.

    Many algorithms has been developed for image processing and Classifications , that the image classification algorithms depend mainly on image processing algorithms, in general image processing algorithms could be classified as the following:

    Image classification algorithms could be classified into three main classes [1]:

    • Supervised image classification algorithms[2][3]:

      In case of supervised classification, prior knowledge is essential before testing and it must be gathered by the analyst. The steps in the supervised classification technique are:

      • Identifying the training areas for each informational class.

      • Signatures identifies (variance, covariance, mean etc.)

      • All pixels are then classified.

      • Mapping of the informational class.

        The main advantage of supervised classification is that an operator can detect errors and correct them. The disadvantages of this technique are that it is time consuming and costly. Moreover, the training data chosen by the analyst may not highlight all the conditions encountered throughout the image and hence it is prone to human error.

    • Unsupervised image classification algorithms[4][5]:

      In case of unsupervised classification, no prior information is essential. It does not require any form of human intervention. This algorithm helps in identifying clusters in data. The steps in unsupervised classification are:

      • Clustering the data.

      • All pixels are then classified based on clusters.

      • Spectral class map.

      • Cluster labeling done by analyst

      • Map the informational class

        The advantages of unsupervised technique are that it is faster, free from human errors and there is no requirement of detailed prior knowledge.

    • Semi-supervised image classification algorithms[6][7] : Take several advantages over Supervised and Unsupervised classification.

      The image classification process works in a structured format where different tasks are to be performed in an ordered format to achieve the desired results and classifying the image accurately. [8] The steps for implementing the image classification process are:

      • Image Pre-processing: This step is used to improve the image data (features) by removing unwanted distortions and enhancement of important image features to benefit the models from the improved data. The image pre-processing steps include reading an image, resizing the image, and data augmentation (gray scaling, reflection, Gaussian blurring, histogram, equalization, rotation, and translation).

      • Detection of an object: This step refers is used to segment the image and identify the position of the object of interest in the image.

      • Feature extraction and training: This step implements statistical or deep learning methods to

        identify the most interesting patterns and features of the image

      • Classification of the object: This step categorizes detected objects into predefined classes by using a suitable classification technique that compares the image patterns with the target patterns

      Here we will go in details about the following ones

      • Convolutional Neural Network[9]

        Convolutional Neural Network (CNN, or ConvNet) are a multi-layer neural networks, designed to recognize visual patterns directly from pixel images with minimal pre-processing. It is a special architecture of artificial neural networks. It comprises two vital elements, namely convolutional layers and pooling layers, which can be arranged in near-infinite ways for a given computer vision problem

      • Transfer Learning[10]

        Transfer Learning is a machine learning technique where a neural network model is first trained on a problem similar to the problem that is being solved, and the knowledge is stored that is gained while solving one problem and applies it to a different but related problem.

      • K-Nearest Neighbor[11][12]

        K-Nearest Neighbor (K-NN) is a non-parametric, lazy learning algorithm, used for classification and regression. The algorithm simply depends on the distance between feature vectors and classifies unknown data points by finding the most common class among the k-closest examples.

      • Random Forest Algorithm[13][14]

      Random Forest Algorithm (RFA) is a supervised learning algorithm which consists of many decision trees. The algorithm creates decision trees on data samples and gets the prediction from each of them and finally selects the best solution by means of voting

      The aim of this article is to develop effective image classification algorithm that have to classify a huge data to four classes (ID, ID Back, Signature, Student Card) .that these data belongs to a university academic system, which contains various types of students attachments, and these attachments are not classified to types, as the main types of these attachments are (ID, ID Back, Signature, and Student Card), so we will develop an algorithm with high classification accuracy to classify the students attachments to the four mentioned classes.

      The structure of this article the first section is the aim of this article, then the related work ection, then the methodology workflow and methodology implementation, then the accuracy calculation section, then the test and results, and the Conclusions section.

  2. METHODOLOGY

    1. Methodology workflow

      The developed algorithm workflow is shown as the following figure:

      Figure (1) developed algorithm workflow

      The proposed algorithm is divided into main steps, the deep learning Image Classifier, and the Low image processing Classifier.

      • Deep Learning Classifier

        In this step of the classification we have built a deep learning model using Convolutional Neural Network (CNN)[15][16] which is a special kind of neural network which aims to extract a unique features of images, this led to the popular usage of CNN in image classification. In this deep learning classifier we have built the model with the following structure:

        Figure (2) developed Deep Learning Classifier

        From the figure above we notice that the proposed Image deep classifier consists from multi layers and the output layer uses the softmax function to get the class of the input image.

      • Low Image Processing Classifier

        In this step the input of this classifier is the output of the previous one CNN image classifier, the aim of using this classifier is to increase the accuracy of the CNN classifier that the accuracy of CNN classifier was as the following:

        Model

        Image Class

        Accuracy

        CNN

        ID

        91%

        CNN

        ID Back

        92%

        CNN

        Student Card

        90%

        CNN

        Signature

        91%

        Table (1): Deep Learning Classifier, Classification Accuracy

        The Low image processing classifier is employed to increase the signature images classification.

        The low image processing acts as the following:

        Figure (3): Low image processing classifier workflow

        We will talk in details about every sub step in the low image processing classifier:

      • Convert image to binary: in this step we convert the image to raster image then parse the raster image rows and columns and for every pixel we get the three colors of the pixel(x,y) and get a gray color value as the following:

        Pixel(x,y) gray value=(Red Color+Green Color+Blue Color)/3 After getting the gray color value we compare it with white and black color threshold , if the gray color value greater than the threshold we set the pixel color to (1 which means white), or we set the pixel color to (0 which means black), the threshold is 150 (that the gray color range from 0..255), by the ending of this step the image is converted to black and white image (black pixels are belong to the signature , white pixels are belong to the signature background).

      • Remove image edges noise: in this step the algorithm try to get rid of the noise on the edges by escaping the borders pixels.

      • Count Black and White Pixels: in this step the algorithm parse the binary image and count the black and white pixels.

      • Classifying signature image : in this step the algorithm the algorithm decide if the current image is signature image or not based on chosen threshold

        , the selected threshold is the percentage of black pixels to the white pixels as the following: Signature threshold = (black pixel count)/ (white pixel count)

        If the threshold is smaller than 10% then the image is a signature image.

    2. Methodology Implementation

    The developed algorithm implementation is done by using python as a programming language for Deep Learning Classifier, and we have used C# as a programming language for development of the Low Image Processing Classifier.

    Accuracy Calculation formula

    The accuracy is calculated as the following:

    Figure (4): Precision Formula

    Where:

    • Image manual is the image that the human expert classify it as a signature image.

    • Image automatic is the image that the developed algorithm classify it as a signature image.

  3. TESTING AND RESULTS

    We have run and tested the developed algorithm on set of private Syrian university students attachment files which contains about 1,000,000 image of various types (ID, ID Back, Signature, Student Card) [17], the Deep Learning Classifier is trained on 40% of the total images count (40% of 1,000,000 image) and then it tested on 60% of the total data and the results are shown previously into Table (1).

    The Low Image Processing Classifier has been developed and tested on the signature images only (which are outputted from the Deep Learning Classifier) and the accuracy percentage is shown as the following table:

    Model

    Image Class

    Accuracy

    Low image

    Processing Classifier

    Signature

    96%

    Table (2): Low Image Processing Classifier, Classification Accuracy

  4. CONCLUSIONS

In this article we have developed a hybrid System for automatic image classification(the classes of classifications are: ID,ID Back, Signature, Student Card) that the developed system combine has two level of classification, that it contains two models for classification , the first one is the Deep learning classifier which is built on CNN networks, and the second model of classification is the low image processing classifier which based on the low image manipulation operations, the strength and the efficient of the developed system is comes from the combination of these two models , and as we have shown in the results sections the accuracy is increased to 96% by applying the second classification model to the signature image types.

REFERENCES

[1] J. Kurian, V.Karunakaran, A Survey on Image Classification Methods, International Journal of Advanced Research in Electronics and Communication Engineering (IJARECE) vol. 1, Issue 4, 2012.

[2] Dey, Nilanjan & Mishra, Girish & Kar, Jajnyaseni & Chakraborty, Sayan & Nath, Siddhartha. (2014). A survey of image classification methods and techniques. 2014 International Conference on Control, Instrumentation, Communication and Computational Technologies, ICCICCT 2014. 10.1109/ICCICCT.2014.6993023.

[3] S. Hassairi, R. Ejbali and M. Zaied, "Supervised Image Classification Using Deep Convolutional Wavelets Network," 2015 IEEE 27th International Conference on Tools with Artificial Intelligence (ICTAI), 2015, pp. 265-271, doi: 10.1109/ICTAI.2015.49.

[4] Z. Kato, J. Zerubia and M. Berthod, "Unsupervised parallel image classification using a hierarchical Markovian model," Proceedings of IEEE International Conference on Computer Vision, 1995, pp. 169- 174, doi: 10.1109/ICCV.1995.466790.

[5] A. Greiwe,An unsupervised image endmember definition approach, 1st EARSeL Workshop of the SIG Urban Remote Sensing, 2006

[6] Li, L., Huaxiang, Z., Xiaojun, H., Feifei, S. (2014). Semi-supervised Image Classification Learning Based on Random Feature Subspace. In: Li, S., Liu, C., Wang, Y. (eds) Pattern Recognition. CCPR 2014. Communications in Computer and Information Science, vol 483. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-45646- 0_24

[7] Zhu, Xiaojin, Semi supervised learning literature survey,Department of Computer science & Engg, University of Wisconsin-

Madison1530,2005

[8] Lu, D., & Weng, Q. (2007). A survey of image classification methods and techniques for improving classification performance. International journal of Remote sensing, 28(5), 823-870.

[9] S. Albawi, T. A. Mohammed and S. Al-Zawi, "Understanding of a convolutional neura network," 2017 International Conference on Engineering and Technology (ICET), 2017, pp. 1-6, doi: 10.1109/ICEngTechnol.2017.8308186

[10] Shaha, M., & Pawar, M. (2018, March). Transfer learning for image classification. In 2018 Second International Conference on Electronics, Communication and Aerospace Technology (ICECA) (pp. 656-660). IEEE.

[11] Diaz, R. A. N., Swandewi, N. N. T., & Novianti, K. D. P. (2019, August). Malignancy Determination Breast Cancer

Based on Mammogram Image With K-Nearest Neighbor. In 2019 1st International Conference on Cybernetics and Intelligent System (ICORIS) (Vol. 1, pp. 233-237). IEEE.

[12] Uddin, S., Haque, I., Lu, H. et al. Comparative performance analysis of K-nearest neighbour (KNN) algorithm and its different variants for disease prediction. Sci Rep 12, 6256 (2022). https://doi.org/10.1038/s41598-022-10358-x

[13] Liu, Y., Wang, Y., Zhang, J. (2012). New Machine Learning Algorithm: Random Forest. In: Liu, B., Ma, M., Chang, J. (eds) Information Computing and Applications. ICICA 2012. Lecture Notes in Computer Science, vol 7473. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34062-8_32

[14] Zawbaa, H. M., Hazman, M., Abbass, M., & Hassanien, A. E. (2014, December). Automatic fruit classification using random forest algorithm. In 2014 14th International Conference on Hybrid Intelligent Systems (pp. 164-168). IEEE.

[15] O'Shea, Keiron & Nash, Ryan. (2015). An Introduction to Convolutional Neural Networks. ArXiv e-prints.

[16] Sakshi Indolia, Anil Kumar Goswami, S.P. Mishra, Pooja Asopa, Conceptual Understanding of Convolutional Neural Network- A Deep Learning Approach,Procedia Computer Science,Volume 132,2018,Pages 679-688,ISSN 1877-0509,

https://doi.org/10.1016/j.procs.2018.05.069. (https://www.sciencedirect.com/science/article/pii/S187705091830801 9)

[17] Al-Rasheed Private University. Al-Rasheed University, 2022, ru.edu.sy/Home/Index/EN.