Deep learning for content - based image retrieval in FHE algorithms

: Content - based image retrieval ( CBIR ) is a technique used to retrieve image from an image data - base. However, the CBIR process su ﬀ ers from less accuracy to retrieve many images from an extensive image database and prove the privacy of images. The aim of this article is to address the issues of accuracy utilizing deep learning techniques such as the CNN method. Also, it provides the necessary privacy for images using fully homomorphic encryption methods by Cheon – Kim – Kim – Song ( CKKS ) . The system has been proposed, namely RCNN_CKKS, which includes two parts. The ﬁ rst part ( o ﬄ ine processing ) extracts automated high - level features based on a ﬂ atting layer in a convolutional neural network ( CNN ) and then stores these features in a new dataset. In the second part ( online processing ) , the client sends the encrypted image to the server, which depends on the CNN model trained to extract features of the sent image. Next, the extracted features are compared with the stored features using a Hamming distance method to retrieve all similar images. Finally, the server encrypts all retrieved images and sends them to the client. Deep - learning results on plain images were 97.87% for classi ﬁ cation and 98.94% for retriever images. At the same time, the NIST test was used to check the security of CKKS when applied to Canadian Institute for Advanced Research ( CIFAR - 10 ) dataset. Through these results, researchers conclude that deep learning is an e ﬀ ective method for image retrieval and that a CKKS method is appropriate for image privacy protection.


Introduction
Given the exponential growth of digital images on digital resources, content-based image retrieval (CBIR) is the most realistic method for meaningful image searching. The metadata of the image is used in the majority of traditional image searches. Text query methods are used to retrieve this metadata. However, in order to obtain more relevant photos, all images must contain accurate information. One of the factors affecting the precision of searches is the selection of the appropriate metadata for an image. Consequently, question by image is a preferable choice. Numerous research studies have found that the CBIR system is used for imageprocessing queries. A sample image is supplied into the CBIR system, which then uses low-level features to search a vast collection of images for matching pictures [1]. High-level and low-level features are distinguished in CBIR when it comes to picture retrieval. The use of single color, shape, and texture elements at first produced good retrieval outcomes since a variety of visual attributes were available. Additionally, machine learning methods are employed, which are highly effective at automatically extracting basic data from photos [2]. The model can compute an infinite computation over cipher text and decrypt it over plain text thanks to fully homomorphic encryption (FHE). Equation (1) shows a function f(function) that converts plaintext to cipher text by performing arithmetic operations on it, such as addition and multiplication [3].
The mathematical field of cryptography makes use of advanced algorithms to safeguard the secrecy of data while it is being exchanged and stored. Since the fundamental Diffie Hellman essay was published in 1976, numerous new public-key cryptosystems have been created. Most of them are based on two difficult mathematical puzzles: the discrete logarithm problem and the factorization problem (e.g., RSA, ElGamal cryptosystem, ECC, and many others). These cryptosystems have a reputation for being expensive and slow, even though the fact that they are extremely secure and have a large amount of key space [4,5]. In 2008 [6], Armknecht and Sadeghi created a method of cryptography that is algebraically homomorphic, while in 2009 [7], Gentry expanded on earlier research on fully homomorphic schemes. Plantard et al. [8] designed FHE using hidden ideal lattice. Chung et al. proposed a homomorphic comparison for point numbers with user-controllable precision and its applications [9]. Pedrouzo-Ulloa et al. revisited multivariate ring learning with errors and its applications on lattice-based cryptography [10]. Figure 1 shows how totally homomorphic cryptosystem classification.
The Cheon-Kim-Kim-Song (CKKS) homomorphic encryption (HE) method is state-of-the-art in approximation homomorphic computations for real and complex integers. The CKKS system has already been applicable in real-world settings, such as in machine learning [11].
Traditional instructional strategies rely on elements that were manually built. Deep learning, one of the most effective machine learning techniques, might be able to abolish this dependence. Inference, which employs the model for analysis such as classification or prediction, and training, which seeks to improve the model's accuracy, are the two phases of deep learning (see the next section for more details). Recent years have seen the usage of deep learning across a wide range of sectors, including big data analytics and applications like pattern identification, speech recognition, and computer vision. Deep learning creates privacy issues, especially when utilized in conjunction with sophisticated cloud services and in a collaborative setting [12]. However, when using these setups, privacy risks could affect both users and the server. Privacy concerns arise when the focus shifts from data privacy to model privacy as a result of an attacker who has complete knowledge of the training process having access to model parameters [13]. In the case of collaborative learning, it is also important to take into account participant leakage of private information. Consideration should also be given to sensitive data leaks between users and external infrastructure, particularly via the Internet [12].
By means of linked research [14][15][16][17][18][19], the researchers came to the conclusion that there are two important CBIR-related concerns. First, user privacy and boost data confidentiality are maintained while balancing security and effectiveness. Lightweight encryption-based strategies, such as permutation or replacement, are effective but insecure, whereas heavyweight encryption-based strategies are secure but need expensive computing. Second, there is a trade-off between retrieval efficiency and retrieval accuracy. Low-level features like color, texture, and form are often used in image retrieval techniques; however, because of the "semantic gap" between visual features and the range of human semantics, retrieval accuracy typically serves the practical applications [20]. Trademark recognition and retrieval is a vital appliance component of CBIR. Reduction in the semantic gap, attaining more accuracy, reduction in computation complexity, and hence in execution time are the major challenges in designing and developing a trademark retrieval system. Ref. [21] uses an HE that devises the security scheme based on fully homomorphism encryption, which encrypts and decrypts data locally and involves computation on encrypted data rather than decrypting it into its original form, whereas all applications have deadline and mobility constraints. Method since investigations has shown that it is a highly effective algorithm for protecting data privacy. HE has become a well-liked and effective cryptographic technique for use in cloud computing applications. Additionally, it offers security analysis for all known attacks in relation to message expansion and holomorphic operations.
Still, in order to address this issue, the researcher split the algorithmic burden between the client and the server because it has a significant cost during the encryption/decryption operations. The balance between accuracy and efficiency, obtained by integrating deep learning methods with Random Forest (RF) to narrow down and select the relevant features, is another subject covered in this study. As a result, processing time was cut in half while accuracy increased. Establishing a safe AI model to balance picture retrieval accuracy, speed up retrieval processes, and protect the privacy of data sent via an insecure medium is the driving force behind the proposed study. The motivation of the proposed work consists of building a secure AI model to balance the accuracy of image retrieval, reduce the processing time of retrieval operations, and preserve the privacy of data transmitted through an insecure medium.
The following are the major contributions to this article: 1. Trade-off between security and accuracy of the CBIR. 2. Proposing an effective method for image retrieval based on deep learning techniques. 3. Encrypting the retrieved and sent images using FHE-CKKS algorithms to ensure their security. 4. Improving the classification CNN's accuracy by training it on augmentation images. 5. Using the RF method to select the best features that increase accuracy and decrease retrieval time This article is organized as follows. In Section 2, the researchers give related work in HE, image retrieval, and deep learning. In Section 3, the researchers explain in brief materials and methods used in this article. The researchers present their proposal in Section 4. Experimental results and performance analysis are given in Section 5. A conclusion is given in Section 6.

Literature review
A large amount of research has been published in the fields of CBIR and HE.
In the study by Das and Namasudra [16], high-level image features were extracted using convolutional neural networks (CNNs) and dimension reduction. In addition, feature dimensions that were overly big and strongly associated were reduced using multiline core component analysis. After feature reduction, features are binary encoded for efficiency.
Manisha and Raman [17] proposed a method that uses local neighborhood difference pattern for local characteristics. Using this technique, each pixel in an image is converted into a binary pattern based on the pixels around it. As a result, local pixel intensity is used to extract information by both LB.
Selvam and Kannan [18] proposed a technique for integrating the genetic algorithm and the HARP aggregation algorithm to improve system retrieval accuracy while consuming less processing time and to recover the pertinent picture and potential resolution using CBIR.
In their research for image retrieval, Kuo et al. [22] introduced deep CNNs. High-level picture feature extraction is achieved by using DEEP learning to train the weights of an NN. CNN was suggested by Huang et al. [23] as a combination of ensemble models for image retrieval. To extract picture features, this image classifier combines Network in Network, a very efficient deep learning network, with AlexNet. For image retrieval, it calculates weighted average feature vectors. An effective CBIR system that can retrieve accurate images semantically was created by Khan et al. [24]. For this, they suggested a hybrid feature description made up of color and texture features.
Ali and Mohammed's [25] paper is dependent on two retrieval mechanisms. They used statistical features after first extracting visual features using the histogram (mean, standard deviation). In this situation, the association between a variety of photographs is investigated using the T-test.
Challa and Gunta [26] proposed a modified Reed-Muller Code-based symmetric key with completely HE with (MOD 2) unlimited addition and multiplication operations. Mathematical analysis and degree of difficulty are provided in the demonstration of security. Additionally, it examines the security of homomorphic operations and message expansion against all known flaws and threats.
Syed et al. [27] recommended using HE, which permits the training of both deep learning and conventional machine learning models while retaining data security and privacy. Applications for the smart grid, like load forecasting and fault localization, are evaluating the proposed methodology. The classification accuracy of the proposed privacy-preserving deep learning model using HE is comparable with the model's classification accuracy on plain data, according to the fault localization results.
Lou and Jiang [28] proposed a shift-accumulation-based LHE-enabled deep neural network that can handle encrypted data. The binary operation-friendly Leveled Fast Homomorphic Encryption over Torus (LTFHE) encryption technique is used to create ReLU activations and max poolings. They accelerate inferences by using less expensive LTFHE shifts as opposed to pricey LTFHE multiplications.
Obla et al. [29] proposed a methodical strategy to produce activation jobs for CNNs that are friendly to higher education. They started by analyzing widely used functions like Sigmoid and linear correcting units (ReLU) to identify the characteristics of an effective activation function that improves performance. The best range of approximation for polynomial activation is then determined by comparing the various polynomial approximation techniques. They also suggested a brand-new weighted polynomial approximation technique for dividing the output of the batch adjustment layer. Finally, they used a number of datasets, such as MNIST, FMNIST, and CIFAR-10, to demonstrate the effectiveness of their approach.
Kwabena et al. [30] created a new framework called MSCryptoNet that makes it possible to execute, convert, and scale MSCryptoNet models while protecting privacy. In HE systems, the activation functions of sigmoid and rectified linear units are approximated by low-degree polynomials.
Clet et al. [31] exhaustively examined the training phase of feed-forward neural networks that have been successfully completed on the MNIST dataset for the three most popular homomorphic cryptosystems, BFV, CKKS, and TFHE.

Deep learning
In order to build a model that links inputs to outputs, deep learning tries to extract complex features from high-dimensional data (such as classes). Usually constructed as multi-layered networks, deep learning architectures calculate higher-level properties as nonlinear functions of lower-level data. Layer neural networks are the most typical form of deep learning architecture [32]. The structure of deep learning is represented by many levels. This section will present these layers and how they affect HEs.

CNN
The convolution layer that makes up CNN, which is frequently used for image classification, has the job of learning the characteristics obtained from the dataset. The dot product multiplication between neighborhood values will be done by the convolutional layer, which is N × N in size. The convolutional layer therefore only has addition and multiplication operations. This layer does not need to be altered because HE data can be utilized with it [33].

Activation layer
The output of the convolution layer is subjected to a mathematical formulation by the activation layer, a non-linear feature. When used to evaluate HE data, these tasks' difficulty rises dramatically due to their non-linear nature. Designers must therefore create a replacement element that merely needs multiplication and addition [29].

Pooling layer
The objective of this sample layer is to reduce the amount of data. There are various types of pooling, including maximum and average pooling, mean pooling, and more. Average pooling, which determines the number of values using two operations that are permitted in HE, is a solution that is utilized in HE instead of the max-pooling option [28].

Fully connected layer and dropout layer
Since every neuron is linked to a neuron in the previous layer, it is referred to as a "Fully Connected Layer." In this layer, there is simply a dot product operation, which consists of addition and multiplication operations. It can therefore be used with cipher text [34] and Dropout Layer. The purpose was to eliminate overfitting. When applying a machine learning model for classification, researchers frequently obtain good results, which may indicate bias in the training data [35].

HE
Different strategies, like differential privacy and HE, are used to safeguard privacy. With HE encryption, many types of calculations can be made on ciphertexts to generate an encrypted result. HE is broken down into two groups [36]. Partially Homomorphic Encryption offers only the addition or multiplication of one encrypted data processing option. Slightly Homomorphic Encryption (SWHE) offers multiple processes, like addition and multiplication, but the total number of operations is constrained. FHE offers numerous methods for multiplication and addition without putting a cap on the number of functions.

Four stages of HE schemes [37]
1. Generation of keys (KeyGen): In this stage, security parameters are generated. In an asymmetric type, a single key is generated, while in an asymmetric type, a pair of secret and public keys is generated.

CKKS HE scheme
The CKKS scheme is a leveled HE technique whose security focuses on the difficulty of the RLWE problem. CKKS, in contrast to other HE systems, supports accurate approximation computation for both real and complex values. Decryption noise is interpreted by the CKKS method as an error in the estimation of real values. Algorithms like machine learning, where the majority of computations are approximate, benefit greatly from it. The CKKS scheme is transformed into an FHE scheme by the application of the bootstrapping mechanism as indicated in paragraph [38].

Proposed system
The proposal system consists of two parts: online and offline. The offline part of this protocol is implemented on the server, whereas the online phase is implemented on both the server and the client. Generation describes the offline stage. The CNN model phase also comprises the training phases, which are composed of three procedures carried out on plaintext training data to create a classifier, which is then applied to plaintext testing data to create a trained model. As depicted in Figure 2, the interactive phase entails four processes on the client side and eight phases on the server side: sending them to the client's side in the second step, receiving the encrypted image in the third step and decrypting the image in the fourth, concluding the decrypted image based on the trainer's model in the fifth step, and delivering the decrypted image in the sixth step. Figure 2 illustrates the proposal model.

Materials and methods
Various images are included in the CIFAR-10 dataset, which is used to train computer vision and machine learning algorithms. Consequently, this dataset is being used more and more in machine learning research. The 60,000 images in the CIFAR-10 dataset, all of which are (32 × 32) pixels in size and are in the PNG format, are divided into 10 separate classes as shown in Figure 3. A plane, a car, a bird, a cat, a deer, a dog, a frog, a horse, a ship, a truck, and other things are examples of classes. The CIFAR-10 dataset was utilized to collect a total of 50,000 training images and 10,000 test images, with the first set being used for training and the latter for assessing and testing the proposed model. There are precisely 1,000 photos from each class in the test batch that are randomly picked. Randomly arranged 5,000 images from each class are included in each training batch.

Offline phase
The two main stages of this section are the first one, which contains a trained model (M), and the second, which employs the trained model to extract the features for each image in the training dataset.

Generation CNN model phase
The classifying model must be created during several numbers of steps in this phase. The next part explains the procedures employed in this section. Figure 3 shows the main steps for obtaining the trainer model. CIFAR-10 (Canadian Institute for Advanced Research), a collection of photographs used to train machine learning, is one of the image datasets utilized in this article. Learning research is CIFAR-10. It has 60,000 images in 10 different categories, including truck, airplane, car, cat, deer, bird, cat, dog, frog, horse, ship, and PNG format with 32 × 32 color resolution. The training dataset and the test dataset are the two components of this dataset. Eighty percent of the whole dataset is made up of the 50,000 photos that make up the training dataset for the network. The test data set, on the other hand, represents 20% of the total dataset and consists of 10,000 photos for network testing. The proposal system makes use of ten helpful enhancements, including rotating, shifting horizontally, shifting vertically, and flipping. Bilinear interpolation is used to create 50,000 new images by applying the rotation procedure at an angle of 15 degrees to the original training photos.
Using horizontal shift augmentation, a picture can be moved horizontally while maintaining its original proportions. Vertical shift augmentation is the process of vertically shifting every pixel while keeping the image's size. A binary number with local binary pattern is produced by thresholding the area around each pixel. There are other picture augmentation techniques that create new images using Gaussian blurring that are currently being developed. Additionally, two noise-generating methods are used. These are salt-andpepper noise and Gaussian noise. As a result, a total of 450,000 training photos are created. The proposed framework for the proposed CNN contains ten layers as: 1. Convolutional layer 1: In this layer, a 3 × 3 filter slides over the 32 × 32 image to create a feature map that summarizes the presence of detected features in the original input image. 2. Convolutional layer 2: This layer repeats the steps of the convolutional layer 1 on the 32 × 32 image with filter 2 and depth 32. 3. Max Pooling layer 1: After applying two convolutional and ReLU layers, the max pooling layer is applied to extract maximum features from the image using a filter with size 2 × 2 and then uses dropout with 20% to prevent the network from overfitting.  8. Convolutional layer 6: This layer repeats the steps of the convolutional layer 5 on the 8 × 8 image with filter 6 and depth 128. 9. Max Pooling layer 3: The max pooling layer is applied after convolutional layer 8 and extracts the maximum features from the image using a filter with size 2 × 2. After max pooling layer 3, the image becomes 4 × 4. It uses dropout with 40% to prevent the network from overfitting. 10. Flatten layer: The results from the convolutional and max pooling layers produce higher-level features of the input image. 11. Fully connected layer 1: Single feature vectors from the flatten layer become input nodes for the full connection layer. The classifier's purpose is to assign class labels to images based on the training dataset.
Three key algorithms make up the proposed CNN system: the CKKS method for encryption, the CNN algorithm for high-level feature extraction and prediction, and the RF approach for feature selection. All of these algorithms have a collection of variables that improve the effectiveness of the suggested system shown in Tables 1-3.   The forest's tree count criterion Gini, entropy The ability to evaluate the quality of a split. "gini" for Gini impurity and "entropy" for information gain is supported criteria max_depth 10 A tree's maximum depth Min samples split 2 The smallest number of samples needed to break apart an internal node into its parts Min samples leaf 1 There is a minimum number of samples that must be taken at each leaf node

Feature extraction phase
Features taken from photos have already been utilized with this filter. Padding is a term used to define the quantity of pixels added to an image during processing by the CNN kernel.

Online processing phase
This stage starts when the client asks the server for the public key to encrypt the image, then provides the server with the encrypted image. The client first converts a message (M) to cipher vectors ([ct1, pk] percent q,[ct2,pk] percent q) in this phase using CKKS as the FHE method. Here, ct1 and ct2 are cipher texts expressed in polynomial form, pk stands for the public key, and q is the cipher text modulus. The server and client sides of this phase are implemented as follows: 1. The initial security parameter λ step (server-side, client-side): a polynomial of degree N, where N is a power of two and the polynomial degree d determines R's position in the quotient ring.
The ciphertext modulus q: • Q has a large modulus. For both techniques, we can execute more homomorphic operations before the noise becomes too great for testing by using a bigger modulus q. Use 41 different q values, ranging from 40 to 1,200 bits. On the basis of the security parameter and polynomial degree, q and Q are, nevertheless, upper constrained [36]. • The scalability factor: A higher value of the scaling factor results in more precision but restricts the number of homomorphic operations. More specifically, calculate the error in the outcome of decoding m(x) + e(x) for some accumulated error for a plaintext polynomial (x) Rq where (x) = Encode (z). In actuality, pick using this estimation as well. For instance, selecting = 210 results in a final decoded message with an accuracy of 4 bits. Choose = 215 if 6 bits of precision have been chosen. If the size of our decoded slots decreases, several procedures require raising the scaling factor's size [37].
1. Generating keys step (server side, client side): Both the server side and the client produce public keys (pk) and private keys (sk), and utilize their respective keys to carry out encryption and decryption procedures. 2. Encrypting image (server side, client side): The client executes the image encryption steps after receiving the client's public key. The image is scaled to scale 32 × 32 using the bilinear approach, resized to be appropriate for the model created on the server side, and then read pixel by pixel and encoded individually using CKKS encoding. Every pixel in the image is changed into an 8-degree polynomial in this step. Additionally, the client's public key is used by the server side to encrypt the photos that were retrieved in the same way. 3. Decrypting image (server side, client side): The client-side generated encrypted image is reliant on the server's public key transmission. The top five images that are most similar to this image are requested from the server using this image. With the help of the private key generated on the server side, the image is decrypted throughout this procedure. To obtain the actual values of the pixels, a decoding operation is used on the result of the decryption process, which is in polynomial form. Similar to how the server does it, the client likewise uses the private key to open photos it has received from the server. 4. Similarity matching (server side only): Using the model (M), the features of the sent image are extracted in this step of the image retrieval process based on the flattened layer. Using the features retrieved and the feature vectors stored in the training phase, the Hamming distance technique is used to assess how closely the five images that are most similar to the provided image match the original.

Results
There are many results from this proposed model illustrated as follows.

Augmentation data result
The rotating, horizontal shifting, vertical shifting, and flipping augmentations are examples of the four that are used in Figure 4. After applying the rotation process to the original training photographs, there are 50,000 new photos, as shown in Table 4, and the lost value is made up by performing bilinear interpolation on the new photos. An angle of 15 degrees was used to apply the rotation. According to Table 4, 50,000 new photos were created by applying a horizontal shift of one byte in the x-direction, right-to-left, to each image in the training set. Additionally, this table demonstrates that the feature of this augmentation method is vertical shift augmentation as well as horizontal flipping; 100,000 new photos are produced by this technique. Also, to create new data that would constitute the new training data set, four more techniques -Gaussian blurring, Local Binary Pattern, Gaussian noise, and Salt-and-pepper noisewere applied.

CNN layers
Ten CNN layers have been used to implement the suggested model. Every layer in the training set is applied to every image. Six convolutional layers, three max-pooling layers, and one fully connected layer make up this network. The output of the input photos after they have been processed by the network layers.

Training results
The optimization method RMSprop was used to train the model on 450,000 training photos (450,000 R, 450,000 G, and 450,000 B) with an initial learning rate of 0.001. The photos are improved using a dataset that goes through 100 epochs. The weights are adjusted in each epoch to get the image closer to the target image. The model accuracy and loss together with the related hyperparameters are shown in Table 5 for the training stage. This table demonstrates that 64 batches were taken each time the training and validation samples were repeated 100 times. After multiple epochs, the learning rate increased from its initial value of 0.01, reaching 0.0003.

Tasting result
The 10,000 test photos, which account for 20% of the CIFAR-10 dataset, have been entered and have been run through the model's layers. The testing photos were divided into ten classes using the saved parameters, including the weights that the network arrived at, and multiplying them by those weights. Table 6 shows the accuracy test results, the testing time estimate, and the loss amount.
The trained network has been assessed using the confusion matrix, which displays the accuracy of classification for the CIFAR-10 dataset, and the computation of recall, precision, and F1-score values as shown in Table 7. The predicted classes of the test images have been compared with the actual test image classes. Table 8 also displays the classification outcomes for each class.

CNN model analysis
Visualization is key to machine learning. Visualization is often used by practitioners and academics to track output metrics and learned parameters during model training. The dashboard component TensorBoard includes a module for monitoring the distribution of tensors as well as images and audio. It also includes a module for graph visualization. Every epoch's variation in loss and precision is shown in Figure 5. It is crucial to comprehend loss and accuracy while training advances and when these metrics remain constant in order to properly understand forward and backward propagation when a complete dataset is processed through a neural network. Overfitting can be avoided by comprehending this scaler graph. Researchers see a convergence in the growth in loess and accuracy for each of the training and validation samples in this figure. This indicator leads us to the conclusion that there is no overfitting issue with the network that is suggested in this study.

NIST test results
The NIST results for the CKKS algorithms on the CIFAR dataset are shown in this section. In this test, the polynomial-formatted cipher data findings were translated to binary, and the NIST measurements were then examined. The outcomes of this test are shown in Table 9.

Timing test
The time results for each encryption scheme, deep learning technique, and image retrieval time are shown in Table 10. On a PC with a dual-core CPU running at 2.8 GHz, 8 GB of RAM, and Windows 8 already installed, all tests were carried out.

Comparison with previous studies
To improve the retrieved images, a number of techniques have been suggested. The results of image classification are shown in Table 11 while the retrieval performance for CIFAR-10 datasets in mean average precision for various research projects is shown in Table 12.
Tables 11 and 12 show that the suggested strategy performed better, as can be seen by researchers. In the section earlier, TensorBoard analysis is used to illustrate the researchers' recommended system analysis. On the basis of the findings of this research, the optimum CNN architecture and settings are selected.    The RF approach additionally offered helpful features for determining the separation between stored vectors and input vector attributes.

Discussion
The results that were shown demonstrated that the CNN suggested in this study stood out from previous studies with better results in the classification and retrieval processes. Because the flatting layer has attributes that rely on learning weights from the training phase, this research noted that it supplied features for retrieving images that are similar. The best features that produce superior outcomes in terms of accuracy and time have been selected using the RF approach. Earlier research found that the security of the data transferred across the network is not taken care of; thus, samples were used to combat the issues of overfitting and raise the accuracy of training. Additionally, it was discovered via earlier study that the security of the data supplied through the network is not taken care of, and the proposed data-augmented approach increased the dataset samples utilized to combat the issues of overfitting and increase training accuracy. A protocol that protects data privacy was designed since the majority of applications that require image retrieval are apps that need to maintain the privacy of the data of the sending individual.

Conclusions
A powerful CBIR system that can semantically retrieve the encrypted images with good retrieval performance is given. To produce the best results, multiple algorithms were combined. One of the FHE techniques, the CKKS algorithm was used in the encryption portion. In order to develop a deep learning model, the best features were extracted using the RF and CNN algorithms, and the hamming distance method was employed to determine the distance between the input and stored components. The researchers suggest a method for retrieving images based on CNN that was created by utilizing the flattened layer, which removes 2,028 picture features encoded in a single feature vector. After that, the researchers use random. The method for retrieving images that the researchers suggest is based on CNN and exploits the flatten layer, which removes 2,028 picture features encoded in a single feature vector. Following this layer of feature selection, the researchers use the RF technique to create 600 features that lead to greater accuracy compared to an earlier study. Through the use of CKKS, which offers the maximum level of security, a secure protocol was created to protect the data transmitted via an unsecured connection between the client and the server. Increasing the number of training images and using eight distinct augmentation techniques also solve the overfitting problem and increases the accuracy of the model. The CKKS approach is a powerful encryption technique, but the researchers point out that it is sluggish and uses more cipher image space. Results were 97.87 and 98.94% for classification and retrieval, respectively. The safety of CKKS was also evaluated using the NIST test. Given the significance of guaranteeing, the security of applications is used in the field of image retrieval.
The first contribution made in this work is the trade-off between the accuracy of picture retrieval and providing a safe environment for image transmission. Building a CNN model with excellent classification accuracy aided in drawing out the best qualities from the photos. The second contribution, important addition that leads to high classification accuracy is expanding the dataset samples by including a set of anticipated impacts on the photos, as was previously demonstrated. The best features collected from the flatten layer are chosen using the RF technique in the researchers' final contribution.
The accuracy and speed of image retrieval are improved by using these features to determine how far apart each stored image's features are from those of the input images. In future work, the idea has several practical implications, including the development of safe search engines and the health fields, both of which call for a secure environment for the patient-hospital communication. The ability of completely HE algorithms to execute addition and multiplication operations on encrypted data is one of the upcoming efforts that will be used to build a deep-learning model for picture retrieval performed on encrypted photos.

Conflict of interest:
Authors state no conflict of interest.