Privacy Preserving Image Encryption with Optimal Deep Transfer Learning Based Accident Severity Classification Model

Effective accident management acts as a vital part of emergency and traffic control systems. In such systems, accident data can be collected from different sources (unmanned aerial vehicles, surveillance cameras, on-site people, etc.) and images are considered a major source. Accident site photos and measurements are the most important evidence. Attackers will steal data and breach personal privacy, causing untold costs. The massive number of images commonly employed poses a significant challenge to privacy preservation, and image encryption can be used to accomplish cloud storage and secure image transmission. Automated severity estimation using deep-learning (DL) models becomes essential for effective accident management. Therefore, this article presents a novel Privacy Preserving Image Encryption with Optimal Deep-Learning-based Accident Severity Classification (PPIE-ODLASC) method. The primary objective of the PPIE-ODLASC algorithm is to securely transmit the accident images and classify accident severity into different levels. In the presented PPIE-ODLASC technique, two major processes are involved, namely encryption and severity classification (i.e., high, medium, low, and normal). For accident image encryption, the multi-key homomorphic encryption (MKHE) technique with lion swarm optimization (LSO)-based optimal key generation procedure is involved. In addition, the PPIE-ODLASC approach involves YOLO-v5 object detector to identify the region of interest (ROI) in the accident images. Moreover, the accident severity classification module encompasses Xception feature extractor, bidirectional gated recurrent unit (BiGRU) classification, and Bayesian optimization (BO)-based hyperparameter tuning. The experimental validation of the proposed PPIE-ODLASC algorithm is tested utilizing accident images and the outcomes are examined in terms of many measures. The comparative examination revealed that the PPIE-ODLASC technique showed an enhanced performance of 57.68 dB over other existing models.


Introduction
Owing to the increase in motorization and population, the number of traffic accidents and their victims seems to be increasing globally [1]. Complicated traffic situations and random events pose a hazard to the safety of drivers, passengers, and pedestrians. Increasing populations and numbers of cars have made traffic accidents a major problem for transportation security. Insurance, medical, and monetary costs all go up when accidents occur on the road. Diverse factors included in traffic accidents have a significant impact on each other, consequently making it tough to individually take any of the parameters while describing the severity of traffic accidents. In the field of traffic safety research, the growth of reliable methods for predicting and classifying crash injury severity, which relies upon numerous explanatory variables, was a key factor [2]. A mechanism for accident management serves a significant role in emergency systems and traffic control. In such structures, data from diverse sources is gathered for supporting injured people [3].

•
This article presents a novel Privacy Preserving Image Encryption with Optimal Deep-Learning-based Accident Severity Classification (PPIE-ODLASC) model. The goal of the presented PPIE-ODLASC technique is to accomplish secure image transmission via encryption and accident severity classification (i.e., high, medium, low, and normal). • For accident image encryption, multi-key homomorphic encryption (MKHE) technique with lion swarm optimization (LSO)-based optimal key generation process is involved.

•
In addition, the PPIE-ODLASC algorithm involves YOLO-v5 object detector to identify the region of interest (ROI) in the accident images. Moreover, the accident severity classification module encompasses Xception feature extractor, bidirectional gated recurrent unit (BiGRU) classification, and Bayesian optimization (BO)-based hyperparameter tuning. • The experimental validation of PPIE-ODLASC technique is tested using accident images and the results are investigated in terms of several measures.
The rest of the paper is organized as follows. Section 2 provides a detailed review of existing models and Section 3 elaborates the proposed algorithm. Then, Section 4 shows experimental validation and Section 5 draws the concluding remarks of the study.

Literature Review
Boulila et al. [12] advises a hybrid PPDL method for object classification. This study aims to improve the encryption of satellite images while guaranteeing a higher object classifier accuracy and good runtime. The technique projected to encrypt the image is preserved by the public keys of somewhat homomorphic encryption and Paillier homomorphic encryption. Chuman and Kiya [13] developed a learnable image encryption technique for privacy-preserving DNN. The presented technique is performed based on block scrambling utilized along with data augmentation methods, namely grid mask, random cropping, and horizontal flip. The usage of block scrambling improves the robustness against many attacks; on the other hand, combined with data augmentation, it allows the preservation of a higher classifier accuracy while using encrypted images.
He et al. [14] developed a CryptoEyes to overcome the problems of privacy-preserving classifier on encrypted images. The study presents a 2-stream convolution network structure for the classifier of encrypted images to capture the contour of the encrypted image, thereby considerably increasing the accuracy of the classification. Shen et al. [15] developed a secure SVM that is a privacy-preserving SVM training system over blockchain (BC)-based encrypted IoT information. The author utilizes the BC technique to construct reliable and secured data sharing platforms amongst various data providers, whereas an IoT information is encrypted and recorded on the distributed ledger. Ito et al. [16] designed a transformation system to generate visually protected images for privacy-preserving DNN. However, the presented technique allows us to preserve the image classification performance and strongly protects visual information.
The authors in [17] resolve the challenges by designing Secure DL, a privacy-preserving image detection technique for encrypted dataset over cloud. The presented block-based image encryption system is well-developed for protecting the image's visual data. The presented technique is demonstrated to be secure from a probabilistic perspective, and with different cryptographic attacks. Ahmad and Shin [18] present an effective pixel-based encryption technique. The technique gives a basic level of privacy while maintaining the inherent property of the original images, thus allowing DL application in the encryption field. The author has utilized logistic maps for the lower computation requirement. Furthermore, in order to compensate for any ineffectiveness due to the logistic maps, the author uses a second key for shuffling the sequence.
Li et al. [19] proposed a new FL into autonomous driving for preserving privacy of the vehicle by sharing the model training parameter through MEC server and keeping original information in a local vehicle. Salem et al. [20] introduce DeepZeroID: a multiple-party biometric verification and privacy-preserving cloud-based technique which makes use of homomorphic encryption. Training on sensitive biometric data is eliminated with the help of transfer learning, and one pre-trained DNN is exploited as the feature extractor. By proposing an exhaustive search algorithm, these feature extractors are employed on the processes of liveness detection and biometric authentication. Song et al. [21] present a novel technique that constructs an effective module without sharing sensitive information between the source and target domain. The target domain benefit from the label-rich source domain without exposing its private information. Zhao et al. [22] developed a BC based privacy-preserving software updating protocol that delivers reliable and secure updates with an incentive model while protecting the privacy of the user. Ibarrondo and Önen [23] analyze the Batch Normalization (BN) layer: a modern layer that addresses internal covariance shift, which was demonstrated to be highly effective in improving the performance of the deep neural network. The study aims at reformulating BN that leads to a modest reduction on the number of operations in order to be compatible with the usage of FHE.
Despite the ML and DL algorithms existing in the early research, it is still necessary to optimize the privacy and accident severity classification performance. Simultaneously, various hyperparameters have a crucial effect on the effectiveness of the CNN algorithm. In particular, the hyperparameters including learning rate selection, epoch count, and batch size are necessary to attain superior outcomes. Meanwhile, the trial-and-error algorithm for hyperparameter tuning is an erroneous and challenging task; in the proposed method, the BOA algorithm was used for the parameter selection of the BiLSTM module.

The Proposed Model
In this article, we developed a novel PPIE-ODLASC system for privacy and accident severity classification process. In the presented PPIE-ODLASC technique, two major processes are involved, namely encryption and severity classification (i.e., high, medium, low, and normal). At the first level, the accident images are encrypted by the MKHE technique with the LSO algorithm, and the encrypted images are transmitted to the received. At the receiving end, the decryption process takes place, and then the accident severity classification process is performed. Figure 1 demonstrates the overall block diagram of the PPIE-ODLASC approach. The detailed working of these processes is deliberated in the following sections.

Image Encryption Module
In this study, the MKHE technique is applied to encrypt the accident images. An MKHE is a cryptosystem that allows one to evaluate an arithmetic circuit on cipher images, perhaps encrypting in multiple keys. Consider that ℳ remain the message space with arithmetical structure [24]. Assume that each contributing party has a reference to

Image Encryption Module
In this study, the MKHE technique is applied to encrypt the accident images. An MKHE is a cryptosystem that allows one to evaluate an arithmetic circuit on cipher images, perhaps encrypting in multiple keys. Consider that M remain the message space with arithmetical structure [24]. Assume that each contributing party has a reference to their confidential and public keys. A multi-key cipher image indirectly has an arranged set T = {id 1 , . . . , id k } related to the reference. For example, a fresh cipher image ct ← MKHE. Enc(µ; pk id ) is equal to single-element set T = {id}; however, the size of references fixed attains better than the calculation among cipher image in party development.
For providing a ct cipher image with equal order of confidential key, outcome a plain image µ.
The Homomorphic estimation can be described by using Equation (1): To provide a C circuit, the equal group of public keys {pk id } id∈T and a tuple of multi-key cipher-image ct, . . . , ct l results in a cipher-image ct. Its reference set is T = T 1 ∪ · · · ∪ T of reference sets = T j of input cipher-image ct j for 1 ≤ j ≤ .
Semantic Security. For two communications µ 0 , µ 1 ∈ M, the distribution {MKHE.Enc (µ i ; pk)} for i = 0, 1 might be undistinguishable while pp ← MKHE .Setup 1 λ and (sk, pk) ← MKHE .KeyGen(pp). Compactness and Correctness. An MKHE method was compact when the size of cipher images associated with k party is constrained by the poly (λ, k) to set a polynomial poly. Where 1 ≤ j ≤ , consider ct j as a cipher image (with T j reference set) as MKHE. Considering C : M → M as the circuit and ct ← MKHE.Eval C, ct, . . . , ct , {pk id } id∈T for T = T 1 ∪ · · · ∪ T , then, MKHE.Dec ct, {sk id } id∈T ) = C(µ 1 , . . . , µ ). ( To optimally select the keys for the MKHE technique, the LSO algorithm is exploited. The lion swarm race can be primarily classified into three classes for resolving the global optimization problems of the objective function using the LSO technique: Young Lion, Lion King, and Lioness [25]. They have dissimilar social behaviors. The lioness and lion king are the adult lions, and might affect the difference in convergence speed and the algorithm population size; for maintaining the effects of the algorithm, the proportion of young lion ranges within 0.5 and 1, and the proportion of adult lion τ usually lesser than 0.5. The location of lion king was given in the following: where t characterizes the present number of iterations, X r+1 i signifies the new position made after the update, g t is an optimum location of t-generation, γ represent the uniformly distributed N(0, 1) random number, and P t i is the past optimum position of the i-th lion in t generation population. They cooperate among themselves during hunting, which provides better food to the lion king, and are also accountable to lead the cubs to learn how to hunt; it can be formulated as follows: where X t+1 i specifies the position of the lioness afterward the update, P t c is the better location in the history of choosing a lioness randomly for cooperating with hunting in t generation population, γ represent the uniformly distributed N(0, 1) random number, and α f is a step control factor. The formula for updating the location of the lioness can be given in the following: where is the maximal moving step of the lioness. Let L and H be the lower and upper boundaries of lion group space correspondingly. t max is a maximal number of iterations.
The young lion has three major behaviors: (1) once the cubs are full, it learns to hunt with the lioness. (2) As an adult, it is evicted from the territory by the lion king and confronted the location of the lion king suffering afterward. (3) If it is hungry, it will eat nearer the lion king. The updated location of the young lions is given as: i is the position of the young lion, P t m is the better location at t-th generation while the young lion follows the female lion to learn hunting, α c is a step control factor, α c = step * 1 − t t max ·g t adopt the concept of elite reverse learning that implies the expelled lion cubs are farther from the lion king's location, and g t = H + L − g t . q refers to a probability factor, a uniformly distributed random integer U(0, 1).
The LSO technique proposes deriving the main function depending on the fitness function (FF). The main purpose of the LSO technique is to propose a new image encrypt system with minimized error (MSE) and maximized PNSR. It can be measured as: The preferred minimization and maximization values can be achieved with utilization of the LSO system.

Accident Severity Classification Model
In this work, the automated severity classification module comprises different sub processes, namely YOLO-v5 based RoI detection, Xception feature extraction, BiGRU classification, and BO-based hyperparameter tuning.

Accident Region Detection Using YOLO-v5
In the field of artificial intelligence, a convolutional neural network (CNN) is a type of network that is optimized for processing input with a grid-like architecture, such as an image. An electronic photograph is a binary representation of visual information. Semantic segmentation, object detection, fake image identification [26], and image captioning [27] are just a few examples of areas where convolutional neural networks (CNNs) have seen significant advancements in recent years thanks to the explosion of deep learning. With a CNN-LSTM model, features are extracted from input data using CNN layers, while sequence prediction is accomplished using LSTM layers. In order for a neural network to function properly, it needs to be able to store sequence information in both forward and backward directions, a process known as bidirectional long-short term memory (bi-lstm) (past to future). A bi-lstm is distinct from a standard LSTM since its input goes in both directions. Word classification in a text could be another application of bidirectional LSTM. They are more equipped to categorize the word because they can understand its history and its future.
To identify the RoI in the accident images, the YOLO-v5 model is used. YOLOv5 is the most developed object detection technique obtainable. It is a new CNN which performs object detection in real-time with maximum accuracy [28]. This technique utilizes a single NN for processing the whole picture; afterwards, it divides it into parts and forecasts bounding boxes and probability to all the components. These bounding boxes can be weighted by expected possibility. This technique "just looks once" at the image from the sense which it generates forecasts then forwards propagating run with NN. Then, it delivers identified items after non-max suppression.

Xception Based Feature Extraction
At this stage, the features involved in the RoI are extracted by the Xception model. For effective feature extraction, the Xception architecture was introduced to extract feature vectors [29]. Initially, a pretrained Xception network model is selected named Inception. It is a type of deep-CNN architecture that contains a total depth of 71 layers. It is a modified version of Inception-V3 architecture that has surpassed ResNet, Inception-V3, and VGG16 in classification tasks. It encompasses a revised form of depth wise separable convolutional and max-pooling layers, each related as a ResNet. The architecture of Xception consists of: middle flow, exit flow, and entry flow. The input images are passed over the entry flow, following a middle flow, i.e., repeated eight times, and finally, it is passed over the exit flow for data classification. Finetuning can be performed on the exit and middle flow of Xception architecture. The separable convolution layer in the middle flow is reformed after the exit flow and the weight is upgraded to extract relevant features. Following the global average pooling, the extracted features are fed through the topmost model correspondingly comprising four fully connected layers with 256, 128, 1024, and 512 units, each containing an output layer, and ReLU activation is accustomed to data classification.

Severity Classification Using Optimal BiGRU Model
For classification of accident severity into multiple classes, the BiGRU model is exploited in this work. Comparable with LSTM, GRU can be presented for tackling the gradient vanishing problem current in RNNs and studying the long-term dependency from the long sequence applications with internal gating approach [30]. A GRU cell comprises reset gate r n and update gate z n . The activation of gates from the GRU was dependent upon presenting input and prior output. The internal infrastructure of the GRU cell in which h n and x n refers to the hidden layer and input vector from the time slice n, and h n implies the candidate of hidden state. For parts n, the reset gate r n determines preceding data has been required for forget and the updating gate z n mechanism upgrading the hidden state with the current EEG data.
In the aforementioned equation, tanh(·) and σ(·) refer to the hyperbolic tangent and sigmoid functions. · and * symbol implies the matrix multiplication and Hadamard product; furthermore, [] stands for the concatenation of 2 vectors. W z , W r , and W h signifies the weighted matrix learned by GRU network trained.
Finally, the BO algorithm is used for the optimal hyperparameter adjustment of the BiGRU model. The proposed method is based on the assembly of heuristic approach, whereupon numerous objective tasks was distributed to the objective of concern from the input space [31].
In Equation (12), N refers to the total amount of annotations of the input objective set. A proxy optimization was performed by continuing the BO algorithm to decide the next input. The function used in BO is distributed by means of GPs as a result of systematic, flexible, and ambiguous properties. Thus, BO is utilized to overcome minimization complications as follows: From the expression, X is a dense subset of R K . To meta-parameter of substitute method, consider borderline analytical variance of the heuristic model as σ 2 (y, Θ) = Σ(y, y; Θ) and µ(y; D, Θ), which characterizes the analytical mean and is defined by: In Equation (14), g(y BEST ) signifies the minimal perceived value and it can be demonstrated below: In Equation (15), Φ is a cumulative function and M(0,1) is a density of common standard. After the training on the diseased cropped region, the newly trained model is obtained that is used for the feature extraction.

Experimental Validation
The proposed technique is simulated by means of the Python 3.6.5 tool. The proposed model is experimented on GeForce 1050Ti 4 GB, PC i5-8600k, 16 GB RAM, 1 TB HDD, and 250 GB SSD. The parameter settings are as follows: dropout: 0.5, learning rate: 0.01, activation: ReLU, batch size: 5, and epoch count: 50. The encryption performance of the proposed model is investigated using different measures such as mean square error (MSE), PSNR, structural similarity (SSIM), and root mean square error (RMSE). Next, accuracy, precision, recall, F-score, and Mathew Correlation Coefficient (MCC) can examine the classification performance.
In this study, we examined the performance of the PPIE-ODLASC model using a set of accident images with four classes. For training purposes, we used the CADP dataset [32], which contains 1416 video segments composed from YouTube, with 205 video segments having full spatio-temporal annotations. For testing purposes, we used our own dataset collected from a real-time environment. It comprises 20,000 samples with four classes (normal, low, medium, and high) as represented in Table 1. Figure 2 defines the sample images of multiclass.            Figure 5 represent the PSNR results of the PPIE-ODLASC system with and without attacks. The outcome indicated that the PPIE-ODLASC algorithm has obtained effectual PSNR values under the presence of attack. For sample, in image1, the PPIE-ODLASC approach has obtained a PSNR of 57.68 dB and 56.73 dB for without and with attacks, respectively. Concurrently, on image3, the PPIE-ODLASC method has gained a PSNR of 56.26 dB and 55.14 dB for without and with attacks, correspondingly. Furthermore, in image6, the PPIE-ODLASC model has obtained a PSNR of 56.06 dB and 54.98 dB for without and with attacks, correspondingly.   Table 3 and Figure 5 represent the PSNR results of the PPIE-ODLASC system with and without attacks. The outcome indicated that the PPIE-ODLASC algorithm has obtained effectual PSNR values under the presence of attack. For sample, in image1, the PPIE-ODLASC approach has obtained a PSNR of 57.68 dB and 56.73 dB for without and with attacks, respectively. Concurrently, on image3, the PPIE-ODLASC method has gained a PSNR of 56.26 dB and 55.14 dB for without and with attacks, correspondingly. Furthermore, in image6, the PPIE-ODLASC model has obtained a PSNR of 56.06 dB and 54.98 dB for without and with attacks, correspondingly.     A comparative PSNR study of the PPIE-ODLASC approach with other existing methods on various images is given in Table 4 and Figure 6. The outcome highlighted that the PPIE  The accident severity classification results of the PPIE-ODLASC model in terms of the confusion matrix are shown in Figure 7. The results indicated that the PPIE-ODLASC model has accurately classified different types of severity levels. Table 5 represents an overall accident severity classification result of the PPIE-ODLASC model under different sizes of TR and TS databases. The experimental results stated that the PPIE-ODLASC model has accurately identified varying levels of severity. For example, with 80% of TR data, the PPIE-ODLASC technique offered an average accu y of 98.32%, prec n of 96.68%, reca l of 96.65%, F score of 96.65%, and MCC of 95.54%. Along with that, with 20% of TS database, the PPIE-ODLASC technique offered an average accu y of 98.31%, prec n of 96.63%, reca l of 96.64%, F score of 96.62%, and MCC of 95.51%. Moreover, with 70% of TR database, the PPIE-ODLASC methodology offered an average accu y of 97.81%, prec n of 95.61%, reca l of 95.61%, F score of 95.61%, and MCC of 94.15. The accident severity classification results of the PPIE-ODLASC model in terms of the confusion matrix are shown in Figure 7. The results indicated that the PPIE-ODLASC model has accurately classified different types of severity levels.     The TACC and VACC of the PPIE-ODLASC approach are examined on accident severity classification performance in Figure 8. The figure exhibited that the PPIE-ODLASC method has shown improved outcomes with increased values of TACC and VACC. In particular, the PPIE-ODLASC method has reached maximum TACC outcomes. The TACC and VACC of the PPIE-ODLASC approach are examined on accident severity classification performance in Figure 8. The figure exhibited that the PPIE-ODLASC method has shown improved outcomes with increased values of TACC and VACC. In particular, the PPIE-ODLASC method has reached maximum TACC outcomes.

PSNR (dB) Test Images PPIE-ODLASC MSC-OKG HSP-ECC OGWO-ECC DM-CM
The TLS and VLS of the PPIE-ODLASC method are tested on accident severity classification performance in Figure 9. The figure shows that the PPIE-ODLASC approach has revealed better performance with minimal values of TLS and VLS. Notably, the PPIE-ODLASC methodology has resulted in reduced VLS outcomes.  The TLS and VLS of the PPIE-ODLASC method are tested on accident severity classification performance in Figure 9. The figure shows that the PPIE-ODLASC approach has revealed better performance with minimal values of TLS and VLS. Notably, the PPIE-ODLASC methodology has resulted in reduced VLS outcomes.    A brief ROC study of the PPIE-ODLASC method under test database Figure 11. The result denotes the PPIE-ODLASC algorithm has demonstrated categorizing distinct classes. A brief ROC study of the PPIE-ODLASC method under test database is shown in Figure 11. The result denotes the PPIE-ODLASC algorithm has demonstrated its ability in categorizing distinct classes.
In Table 6, a detailed comparison study of the PPIE-ODLASC with current DL techniques such as CNN with multilayer perceptron (MLP), CNN with multi-kernel extreme learning machine (MELM), CNN with extreme learning machine (CNN-ELM), CNN with optimal stacked extreme learning machine (CNN-OSELM), CNN with kernel extreme learning machine (CNN-KELM), CNN with radial basis function (CNN-RBF), and CNN with SVM (CNN-SVM) is provided [34]. Figure 12 represents the comparative accident severity classification results of the PPIE-ODLASC model with respect to prec n and reca l . The experimental results stated that the PPIE-ODLASC model has gained enhanced performance.  A brief ROC study of the PPIE-ODLASC method under test database is shown in Figure 11. The result denotes the PPIE-ODLASC algorithm has demonstrated its ability in categorizing distinct classes. In Table 6, a detailed comparison study of the PPIE-ODLASC with current DL techniques such as CNN with multilayer perceptron (MLP), CNN with multi-kernel extreme learning machine (MELM), CNN with extreme learning machine (CNN-ELM), CNN with optimal stacked extreme learning machine (CNN-OSELM), CNN with kernel extreme learning machine (CNN-KELM), CNN with radial basis function (CNN-RBF), and CNN with SVM (CNN-SVM) is provided [34]. Figure 12         CNN-KELM, CNN-RBF, and CNN-SVM models have reported reduced values of 94.60%, 92.60%, 92.20%, 92.13%, 91.84%, 90.10%, and 88.66%, respectively.

Conclusions
In this article, we developed a new PPIE-ODLASC technique for privacy and accident severity classification process. Initially, the PPIE-ODLASC technique encrypted the accident images using LSO with MKHE technique, where the design of LSO-based key generation process helps in the maximization of PSNR. Next, the severity classification module comprises YOLO-v5 based RoI detection, BiGRU classification, Xception feature extraction, and BO-based hyperparameter tuning. The experimental validation of the proposed PPIE-ODLASC technique is tested utilizing accident images and the outcomes are examined in terms of many measures. The comparative examination revealed that the PPIE-ODLASC technique has shown superior performance over other existing approaches. Compared with the other methods, the PPIE-ODLASC method's F score has improved, reaching 96.65%, while the F scores of the CNN-MLP, CNN-MELM, CNN-ELM, CNN-OSELM, CNN-KELM, CNN-RBF, and CNN-SVM models have decreased. In the future, hybrid metaheuristic algorithm can be derived to enhance the performance of the PPIE-ODLASC technique.
Author Contributions: U.S. contributed towards problem analysis and article writing. B.S.C. is the coauthor who formulated the problem statement and structured the manuscript with appropriate interpretations. All authors have read and agreed to the published version of the manuscript.

Conflicts of Interest:
The authors declare that they have no known competing financial interest or personal relationships that could have appeared to influence the work reported in this paper.