<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2022.104003</article-id><article-id pub-id-type="publisher-id">JCC-116440</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Content-Based Image Retrieval with Feature Extraction and Rotation Invariance
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Nathanael</surname><given-names>Okoe Larsey</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Raphael</surname><given-names>Mawufemor Kofi Ahiaklo-Kuz</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Joseph</surname><given-names>Ncube</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Information Engineering/Huzhou University, Zhejiang, China</addr-line></aff><pub-date pub-type="epub"><day>06</day><month>04</month><year>2022</year></pub-date><volume>10</volume><issue>04</issue><fpage>24</fpage><lpage>31</lpage><history><date date-type="received"><day>5,</day>	<month>March</month>	<year>2022</year></date><date date-type="rev-recd"><day>8,</day>	<month>April</month>	<year>2022</year>	</date><date date-type="accepted"><day>11,</day>	<month>April</month>	<year>2022</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Over recent years, Convolutional Neural Networks (CNN) has improved performance on practically every image-based task, including Content-Based Image Retrieval (CBIR). Nevertheless, since features of CNN have altered orientation, training a CBIR system to detect and correct the angle is complex. While it is possible to construct rotation-invariant features by hand, retrieval accuracy will be low because hand engineering only creates low-level features, while deep learning methods build high-level and low-level features simultaneously. This paper presents a novel approach that combines a deep learning orientation angle detection model with the CBIR feature extraction model to correct the rotation angle of any image. This offers a unique construction of a rotation-invariant CBIR system that handles the CNN features that are not rotation invariant. This research also proposes a further study on how a rotation-invariant deep CBIR can recover images from the dataset in real-time. The final results of this system show significant improvement as compared to a default CNN feature extraction model without the OAD.
 
</p></abstract><kwd-group><kwd>Rotation Invariant CBIR</kwd><kwd> Image Orientation Angle Detection</kwd><kwd> Convolutional Neural Network</kwd><kwd> Deep Learning</kwd><kwd> Real-Time CBIR</kwd><kwd> Information Retrieval</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>To date, the technique or method used to correct rotation angles in the case of retrieving images from a dataset has not been applied to a pre-trained Convolution Neural Network to make its rotation invariant. That is to say, if the orientation of the query image changes, the returned images will also change in that regard. In addition, retrieval is hampered by rotated images. <xref ref-type="fig" rid="fig1">Figure 1</xref> illustrates the point. To make CNN acknowledge rotation angles, it will call for quite a number of techniques of which several developments are currently underway. One technique is to replace CNN’s merging layer with a Spatial Transformer Module [<xref ref-type="bibr" rid="scirp.116440-ref1">1</xref>], which makes it read it in a three-dimensional way and, ultimately, arrives at making it rotation invariant. Unfortunately, the spatial module solution does not give a pre-trained or well-defined architecture. So, to make the retrieval system rotation invariant, a different approach is used.</p><p>The Rotation Invariant CBIR system has received very little attention. Bharati et al. [<xref ref-type="bibr" rid="scirp.116440-ref2">2</xref>] suggested a method for extracting rotation-invariant curvelet features by analyzing curvelet transform and performing some relevant derivations. Vandhana et al. [<xref ref-type="bibr" rid="scirp.116440-ref3">3</xref>] presented a method that uses a Scale-Up Robust Features</p><p>(SURF) detector to find prominent points. By conducting a mapping from cartesian to logarithmic-polar coordinates, projecting this mapping onto two 1D signature vectors, and computing their power spectra coefficients, Milanese et al. [<xref ref-type="bibr" rid="scirp.116440-ref4">4</xref>] proposed a technique for obtaining an image signature that is retrieved from the Fourier power spectrum. Fountain et al. [<xref ref-type="bibr" rid="scirp.116440-ref5">5</xref>] used Fourier expansion algorithm to propose a CBIR rotation invariant system which has to do with manipulating the histogram of intensity gradient. To make CBIR rotation invariant, Tzagkarakis et al. [<xref ref-type="bibr" rid="scirp.116440-ref6">6</xref>] proposed a method based on a texture data conversion using a steerable pyramid. Chifa et al. [<xref ref-type="bibr" rid="scirp.116440-ref7">7</xref>] proposed an approach that involves applying circular masks of various sizes to a picture, extracting the color descriptor from the viewable region on the mask, and merging the results. Krishnamoorthi et al. [<xref ref-type="bibr" rid="scirp.116440-ref8">8</xref>] proposed a technique using an orthogonal polynomials model on CBIR. This extracts surface features that have to do with the gray level discrepancies and frequency band of the image being analyzed and the resulting surface feature vector which then becomes rotation invariant.</p><p>From related literature, it is evident that models used could not predict the angle of the rotated image and so cannot satisfy accuracy and check the difference in improvement after the orientation angle is corrected. In this research, a separate model is designed and trained to correct the incorrect rotation invariance.</p>The Problem<p>Using only pre-trained, CNN will definitely be a rotation variant and will retrieve images that are still similar to the dataset given and the probability of confusing the query is high. <xref ref-type="fig" rid="fig1">Figure 1</xref>(a)—ImageData1 query picture is rotationally accurate and has an accuracy of 1. And for the second approach, <xref ref-type="fig" rid="fig1">Figure 1</xref>(b)—The same query image is rotated 90 degrees anti-clockwise, resulting in essentially identical images with a precision of 0.45. Therefore, the technique is to re-train the pre-trained CNN by correcting the angle back to its rotation accuracy for it to see the image in the accuracy of 1 even though the image is rotated. This method automatically makes the rotation variant pre-trained CNN invariant.</p></sec><sec id="s2"><title>2. Methodology</title><p>By employing a single pre-trained OAD model, any angle spanning between zero and 359 degrees of every image in the collection is marked. Paper 3 version 1 of the OAD model will be used for the process, where a given dataset for the content-based image retrieval can have any of its images rotated at any arbitrary angle. The images stored as a dataset will then be rotated according to the model’s expected orientation angle. The images will then be processed through the pre-trained CBIR model, in this case, InceptionResNetV2 [<xref ref-type="bibr" rid="scirp.116440-ref9">9</xref>] in order to extract their features. The query image will be processed through both models at the moment of retrieval: the first Orientation Angle Detection Model and the second CBIR Model. Then, using the query image’s extracted characteristics, a similarity measure is computed and the results are returned. In that regard, every skewed image will be automatically orientated by the OAD model, yielding identical results as if the image were not tilted at all. If the OAD model fails to compute the correct orientation angle due to its prediction error, the program detects the orientation of the image w.r.t the perpendicular axis and straightens the image. If the prediction error is greater than 1 the image is adjusted to the left to align to the perpendicular axis. If less than 1, the image is adjusted to the right in order to align to the perpendicular axis. <xref ref-type="fig" rid="fig2">Figure 2</xref> depicts a rotation-invariant CBIR system.</p><sec id="s2_1"><title>2.1. Datasets Used</title><p>The CBIR model was used on the image datasets below:</p><p>• ImageData1: A dataset containing 200 images divided into four groups—Nature, People, Buses, and buildings, making 50 images in each group.</p><p>• ImageData2: This dataset has 200 pictures divided into two groups. This makes 100 images in each group—Buses and buildings.</p></sec><sec id="s2_2"><title>2.2. OAD Model on CBIR System</title><p>To solve the difficulty indicated in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the OAD model is engineered to rotate the image. As seen in <xref ref-type="fig" rid="fig3">Figure 3</xref>, the OAD model corrects the image’s orientation. The image after OAD correction in <xref ref-type="fig" rid="fig3">Figure 3</xref>(b) and the previous image in <xref ref-type="fig" rid="fig1">Figure 1</xref> is now quite comparable.</p><p>As a result, it extracted similar images while boosting the accuracy from 0.45 to 1. ImageData1 and ImageData2 datasets are compared to further justify the improvement. The objective is to apply an arbitrary angle to the n% dataset of images. Next, apply an extraction technique on CBIR features. This can be done by processing the images via the OAD model and then forwarding them into the CBIR model.</p><p><xref ref-type="fig" rid="fig4">Figure 4</xref> depicts the benefit of combining the OAD and CBIR models on the ImageData1 and ImageData2.</p><p><xref ref-type="table" rid="table1">Table 1</xref> above shows the result. Here,</p><p>Improvement = CorrectnesswithOADModel − CorrectnesswithoutOADModel (1)</p><p>The OAD model improves the performance of images rotated by different percentages on <xref ref-type="table" rid="table1">Table 1</xref>(a)—ImageData1 and <xref ref-type="table" rid="table1">Table 1</xref>(b)—ImageData2 where each number is expressed in percentages.</p><p>Thus, when combined with the CBIR model, the precision value increases; yet, when used alone, the precision value decreases. As seen in <xref ref-type="fig" rid="fig4">Figure 4</xref>, utilizing the OAD model considerably improves the accuracy of the CBIR system when the dataset comprises a high number of rotated images, whereas using the OAD model has a negligible effect when the dataset images are rotationally precise. Additionally, about 5% of rotated photos in both datasets fall between the range of positive and negative improvement. Thus, if a database contains between 5% and 10% rotated images, the correctness level will be high when combining the OAD and CBIR models. By picking a random sample, we can determine the number of images rotated in large datasets.</p><table-wrap-group id="1"><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> (a) Correctness without OAD Model. (b) Correctness with OAD Model</title></caption><table-wrap id="1_1"><caption><title> (b)</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Rotation (%)</th><th align="center" valign="middle" >Before OAD Rotation</th><th align="center" valign="middle" >After OAD Rotation</th><th align="center" valign="middle" >Correctness without OAD Model</th></tr></thead><tr><td align="center" valign="middle" >100</td><td align="center" valign="middle" >90.295</td><td align="center" valign="middle" >94.175</td><td align="center" valign="middle" >3.88</td></tr><tr><td align="center" valign="middle" >80</td><td align="center" valign="middle" >90.8675</td><td align="center" valign="middle" >94.135</td><td align="center" valign="middle" >3.2675</td></tr><tr><td align="center" valign="middle" >50</td><td align="center" valign="middle" >92.7195</td><td align="center" valign="middle" >94.3135</td><td align="center" valign="middle" >1.594</td></tr><tr><td align="center" valign="middle" >30</td><td align="center" valign="middle" >94.125</td><td align="center" valign="middle" >95.215</td><td align="center" valign="middle" >1.09</td></tr><tr><td align="center" valign="middle" >20</td><td align="center" valign="middle" >94.66</td><td align="center" valign="middle" >94.71</td><td align="center" valign="middle" >0.05</td></tr><tr><td align="center" valign="middle" >10</td><td align="center" valign="middle" >95.095</td><td align="center" valign="middle" >95.575</td><td align="center" valign="middle" >0.48</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >95.7865</td><td align="center" valign="middle" >95.765</td><td align="center" valign="middle" >−0.0215</td></tr><tr><td align="center" valign="middle" >0</td><td align="center" valign="middle" >96.635</td><td align="center" valign="middle" >95.875</td><td align="center" valign="middle" >−0.76</td></tr></tbody></table></table-wrap><table-wrap id="1_2"><caption><title></title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Rotation (%)</th><th align="center" valign="middle" >Before OAD Rotation</th><th align="center" valign="middle" >After OAD Rotation</th><th align="center" valign="middle" >Correctness with OAD Model</th></tr></thead><tr><td align="center" valign="middle" >100</td><td align="center" valign="middle" >83.6</td><td align="center" valign="middle" >91.5</td><td align="center" valign="middle" >7.9</td></tr><tr><td align="center" valign="middle" >80</td><td align="center" valign="middle" >85.45</td><td align="center" valign="middle" >91.755</td><td align="center" valign="middle" >6.305</td></tr><tr><td align="center" valign="middle" >60</td><td align="center" valign="middle" >86.685</td><td align="center" valign="middle" >92.54</td><td align="center" valign="middle" >5.855</td></tr><tr><td align="center" valign="middle" >40</td><td align="center" valign="middle" >89.145</td><td align="center" valign="middle" >93.14</td><td align="center" valign="middle" >3.995</td></tr><tr><td align="center" valign="middle" >20</td><td align="center" valign="middle" >92.145</td><td align="center" valign="middle" >94.71</td><td align="center" valign="middle" >2.565</td></tr><tr><td align="center" valign="middle" >15</td><td align="center" valign="middle" >92.975</td><td align="center" valign="middle" >94.525</td><td align="center" valign="middle" >1.55</td></tr><tr><td align="center" valign="middle" >10</td><td align="center" valign="middle" >93.56</td><td align="center" valign="middle" >94.625</td><td align="center" valign="middle" >1.065</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >94.685</td><td align="center" valign="middle" >94.85</td><td align="center" valign="middle" >0.165</td></tr><tr><td align="center" valign="middle" >0</td><td align="center" valign="middle" >96.125</td><td align="center" valign="middle" >94.77</td><td align="center" valign="middle" >−1.355</td></tr></tbody></table></table-wrap></table-wrap-group></sec></sec><sec id="s3"><title>3. Conclusions</title><p>By combining a transitional deep learning model to correct the rotation angle of any image, this study offered a unique construction of a rotation-invariant CBIR system that handles the CNN features that are not rotation invariant. Lastly, it demonstrates that combining this extra correction model with the previous CBIR model had no noticeable impact on real-time image retrieval. The inclusion of additional models considerably enhanced the results although image retrieval time remains an issue.</p><p>For further research, the pre-trained CNN scale-invariant system has a chance of retrieving images in real-time for ImageData1 and ImageData2. The average query image retrieval time for a scope may be calculated using the two image datasets. The datasets may be processed using OAD and CBIR models, and the recovered features can then be kept in memory as a feature bank. After retrieving and processing the query images, the same models may be used to get and process the original image. The query image’s extracted features may then be matched against its feature lists. This explains that the CBIR model which is now rotation invariant can recover images in real-time.</p></sec><sec id="s4"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s5"><title>Cite this paper</title><p>Larsey, N.O., Ahiaklo-Kuz, R.M.K. and Ncube, J. (2022) Content-Based Image Retrieval with Feature Extraction and Rotation Invariance. Journal of Computer and Communications, 10, 24-31. https://doi.org/10.4236/jcc.2022.104003</p></sec></body><back><ref-list><title>References</title><ref id="scirp.116440-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Jaderberg, M., Simonyan, K., Vedaldi, A. and Zisserman, A. (2015) Reading Text in the Wild with Convolutional Neural Networks. International Journal of Computer Vision, 116, 1-20. https://doi.org/10.1007/s11263-015-0823-z</mixed-citation></ref><ref id="scirp.116440-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Vijaya Bharati, P. and Rama Krishna, A. (2014) Rotation Invariant Content-Based Image Retrieval System. International Journal of Engineering Trends and Technology, 17, 429-438.</mixed-citation></ref><ref id="scirp.116440-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Raja Vadhana, P., Venugopal, N. and Kavitha, S. (2015) Optimized Rotation Invariant Content Based Image Retrieval with Local Binary Pattern. 2015 International Conference on Computing and Communications Technologies (ICCCT), Chennai, 26-27 February 2015, 306-311. https://doi.org/10.1109/ICCCT2.2015.7292766</mixed-citation></ref><ref id="scirp.116440-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Milanese, R. and Cherbuliez, M. (1999) A Rotation, Translation, and Scale-Invariant Approach to Content-Based Image Retrieval. Journal of Visual Communication and Image Representation, 10, 186-196. https://doi.org/10.1006/jvci.1999.0411</mixed-citation></ref><ref id="scirp.116440-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Fountain, S.R. and Tan, T.N. (1998) Efficient Rotation Invariant Texture Features for Content-Based Image Retrieval. Pattern Recognition, 31, 1725-1732. https://doi.org/10.1016/S0031-3203(98)00015-6</mixed-citation></ref><ref id="scirp.116440-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Tzagkarakis, G., Beferull-Lozano, B. and Tsakalides, P. (2006) Rotation-Invariant Texture Retrieval with Gaussianized Steerable Pyramids. IEEE Transactions on Image Processing, 15, 2702-2718. https://doi.org/10.1109/TIP.2006.877356</mixed-citation></ref><ref id="scirp.116440-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Chifa, N., Badri, A. and Ruichek, Y. (2019) Rotation-Invariant Approach Using Mask to Content-Based Image Retrieval. Proceedings of the 2019 5th International Conference on Computer and Technology Applications, New York, 16 April 2019, 11-14. https://doi.org/10.1145/3323933.3324066</mixed-citation></ref><ref id="scirp.116440-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Krishnamoorthi, R. and Devi, S.S. (2013) Rotation Invariant Texture Image Retrieval with Orthogonal Polynomials Model. Intelligent Computer Vision and Image Processing, 239-261. https://doi.org/10.4018/978-1-4666-3906-5.ch017</mixed-citation></ref><ref id="scirp.116440-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Maji, S. and Bose, S. (2021) CBIR Using Features Derived by Deep Learning. ACM/IMS Transactions on Data Science, 2, 1-24. https://doi.org/10.1145/3470568</mixed-citation></ref></ref-list></back></article>