Ali Kadhum Idrees

Sara Kadhum Idrees
email: ali.idrees@uobabylon.edu.iq

Raphael Couturier
email: raphael.couturier@univ-fcomte.fr

Tara Ali-Yahiya
email: tara.ali-yahiya@universite-paris-saclay.fr

Sara Kadhum Idrees

An Edge-Fog Computing Enabled Lossless EEG Data Compression with Epileptic Seizure Detection in IoMT Networks

Keywords: IoMT, Edge-Fog Computing, Epileptic Seizure Detection, Lossless Compression, Machine Learning

come   L'archive ouverte pluridisciplinaire

Introduction

The rapid growth in sensing and communication technologies make the network of IoT can connect many physical objects [START_REF] Idrees | Energy-ecient two-layer data transmission reduction protocol in periodic sensor networks of iots[END_REF]. This led to the invention of many IoT applications like remote healthcare monitoring, environment control, intelligent transportation, smart home, etc [START_REF] Idrees | Energy-ecient data transmission 29 and aggregation protocol in periodic sensor networks based fog computing[END_REF][START_REF] Witwit | A comprehensive review for rpl routing protocol in low power and lossy networks[END_REF]. The health technology sector is invaded by IoT techniques and applications to produce a more brilliant future named the Internet of Medical Things (IoMT) [START_REF] Al-Turjman | Intelligence in the internet of medical things era: A systematic review of current and future trends[END_REF][START_REF] Jain | Internet of medical things (iomt)-integrated biosensors for pointof-care testing of infectious diseases[END_REF]. The growth of IoMT occasioned by the increased number of connected health devices that can gather, generate, fuse, analyze, send medical sensed data to Cloud computing.

IoMT is composed of a collected data from medical and biosensor devices and applications [START_REF] Jaber | Energy-saving multisensor data sampling and fusion with decision-making for monitoring health risk using wbsns[END_REF]. These IoMT nodes are used to monitor the health situation of the patient, gather clinical data, and transmit it to the medical experts via the data centers of the remote Cloud platform [START_REF] Oniani | Articial intelligence for internet of things and enhanced medical systems[END_REF]. The main goal of IoMT is to improve the healthcare systems. For instance, most healthcare applications require fast response and decision in case of emergency, high bandwidth over the IoMT network for sending the big data sensed from the patients every day.

These requirements represent big challenges in the IoMT network. This led to the emergence of the concept of fog computing by which the intelligence and processing are brought near the source of data generators [START_REF] Rocha Filho | A fog-enabled smart home solution for decision-making using smart objects[END_REF]. While, the Edge gateway is always close to the biosensors. The Edge gateway has no capability as the Cloud to train the machine learning algorithm and making a big analysis on the huge EEG data. The Fog gateway can be located in the middle between the Cloud and the data generators (biosensors). Figure 1 refers to the Edge-Fog computing architecture in IoMT Network. Therefore, reducing the collected sensed data at the Edge gateway and make a decision at the Fog gateway can provide a fast response to the medical experts.

In addition, it is conserving the IoMT network bandwidth by decreasing the amount of transferred data from Fog to the Cloud data centers. Table 1 shows the list of acronyms with corresponding full terms in this paper.

Various conditions have diagnosed by employing remote monitoring systems of electroencephalogram (EEG) like epileptic seizures detection, brain death testing, anesthesia, and movement disorders [START_REF] Emam | Edgehealth: An energy-ecient edge-based remote mhealth monitoring system[END_REF]. EEG refers to the electrophysiological process of registering the brain's electrical activity [START_REF] Ieracitano | A novel explainable machine learning approach for eeg-based brain-computer interface systems[END_REF]. EEG evaluate variations in the electrical activity that the brain has produced. The ionic current between and within the neurons leads to these voltage changes. EEG signals are scanned by tiny discs of metal named electrodes that were placed on the head. The electrical activity of the brain captured and registered by these EEG electrodes. The gathered signals of EEG are amplied, digitized, and nally transmitted to the computer or mobile gateway for saving and processing these EEG data [START_REF] Le | The neurogeneration: New era in brain enhancement revolutionising the way we think, work and heal[END_REF]. The EEG analysis supports the medical experts to verify the medical investigation, helps the scientists and researchers to understand the behavior of human, and people to enhance their O, S) from Bonn University [START_REF] Andrzejak | Indications of nonlinear deterministic and nite-dimensional structures in time series of brain electrical activity: Dependence on recording region and brain state[END_REF]. The proposed KCHE technique has compared with some existing methods like [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF] and [START_REF] Srinivasan | Ecient preprocessing technique for real-time lossless eeg compression[END_REF]. The results of comparison prove that the proposed KCHE technique outperformed the other approaches in terms of compression ratio. Furthermore, the results of the proposed Naive Bayes algorithm are better than the results of some existing related work such as Novel CNN [START_REF] Zhao | A novel deep neural network for robust detection of seizures using eeg signals, Computational and mathematical methods in medicine[END_REF], TFA +ANN [START_REF] Tzallas | Epileptic seizure detection in eegs using timefrequency analysis[END_REF], DWT+ Kmeans +MLPNN [START_REF] Orhan | Eeg signals classication using the k-means clustering and a multilayer perceptron neural network model[END_REF], 1D-LBP + FT/BN [START_REF] Kaya | 1d-local binary pattern based feature extraction for classication of epileptic eeg signals[END_REF], DWT+ NB/KNN [START_REF] Sharmila | Dwt based detection of epileptic seizure from eeg signals using naive bayes and k-nn classiers[END_REF], TQWT+KNNE+SVM [START_REF] Bhattacharyya | Tunable-q wavelet transform based multiscale entropy measure for automated classication of epileptic eeg signals[END_REF], LMD+ GA-SVM [START_REF] Zhang | Lmd based features for the automatic seizure detection of eeg signals using svm[END_REF], CNN+ M-V [START_REF] Ullah | An automated system for epilepsy detection using eeg brain signals based on deep learning approach[END_REF], CWT+CNN [START_REF] Türk | Epilepsy detection by using scalogram based convolutional neural network from eeg signals[END_REF], CNN [START_REF] Acharya | Deep convolutional neural network for the automated detection and diagnosis of seizure using eeg signals[END_REF], MEMD+ANN [START_REF] Zahra | Seizure detection from eeg signals using multivariate empirical mode decomposition[END_REF].

Literature review

One of the most important challenges in the IoMT networks is how to achieve remote patient health monitoring and decision making accurately and rapidly.

To deal with this challenge, it is important to perform data reduction for the gathered EEG data at the Edge gateway using lossless compression before sending it to the Fog gateway and then implement machine learning for detecting the epileptic seizure at the Fog gateway. Several papers considered EEG data compression methods that introduced various algorithms and techniques. The work in [START_REF] Srinivasan | Ecient preprocessing technique for real-time lossless eeg compression[END_REF] proposed a wavelet transform approach to achieve a real-time EEG data lossless compression. The authors in [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF] Human to compress data without loss has introduced by [START_REF] Rajasekar | Human quantization approach for optimized eeg signal compression with transformation technique[END_REF]. To increase the privacy of the data and reduce the complexity of data, the authors used inverse discrete cosine transform and discrete cosine transform, where the EEG data have sent eciently. In [START_REF] Rasheed | Lossless compression and implementation for medical signals using verilog[END_REF], the author introduced a lossless Log2 sub band compression method to calculate the dierence between two 24-bit samples.

The bits are compressed in four cases: 8, 14, 20, 26. The data are compressed and sent serially. The work in [START_REF] Khalid | Eeg compression using motion compensated temporal ltering and wavelet based subband coding[END_REF] presented a new compression method for EEG signal that employs MCTF (motion-compensated temporal ltering ) and DTW (discrete wavelet transform) to eliminate the intra-channel redundancy.

The authors in [START_REF] Chen | Lossless eeg compression algorithm based on semi-supervised learning for vlsi implementation[END_REF] introduced lossless compression method for EEG data that based on two-level prediction, tri-entropy coding, and voting prediction. The two-level prediction used six functions and twenty-seven conditions to predict the current sample from previous samples. The best function with the best error is found by voting prediction. The binary code of the value of the error is generated by using Golomb-Rice coding and Human coding. The authors in [START_REF] Al-Nassrawy | High performance fractal compression for eeg health network trac[END_REF] proposed the Fractals compression approach for decreasing the sent EEG data from patient to the Cloud. This can reduce network trac and enhance the performance of the network.

The other related works are focused on the diagnosis and detection of epileptic seizure in EEG data by presenting various techniques and algorithms. The work in [START_REF] Amin | A novel approach based on wavelet analysis and arithmetic coding for automated detection and diagnosis of epileptic seizure in eeg signals using machine learning techniques[END_REF] suggested an approach for separating the seizure-free signals from epileptic seizure signals using discrete wavelet transform and computer-aided diagnostic method. The EEG data is decomposed by eliminating the nonsignicant coecients to produce a xed number of signicant coecients. The arithmetic coding converts the signicant wavelet coecients to bit streams.

Finally, the set of compression feature is regulated, and then the classiers detect the seizure activity. Authors in [START_REF] Aghababaei | Detection of epileptic seizures from compressively sensed eeg signals for wireless body area networks[END_REF] proposed new automatic single-channel seizure detection by adding a new feature that does not need a full rebuilding of original EEGs. This feature employing an orthogonal matching pursuit method in an iterative way on the compressed EEG sensed data and calculate the ratio that increases the energies of the rebuilt EEG signals. The non-seizure and seizure cases are classied based on partial energy dierence. The proposed method is improved to be used in the multichannel EEG signals. In [START_REF] Qaisar | Eective epileptic seizure detection by using level-crossing eeg sampling sub-bands statistical features selection and machine learning for mobile healthcare[END_REF], the authors proposed an adaptive-rate processing and level-crossing sampling for epileptic seizures detection automatically. This can reduce the EEG data transmission by achieving compression. The latency is not considered because the epileptic seizures classication is implemented in the Cloud. In [START_REF] El-Fequi | Prediction of epileptic seizures: A statistical approach with dct compression[END_REF], the authors proposed a lossy compression for EEG data using Discrete Cosine Transform, and then predict the epileptic seizure for the patients. They have studied the eect of lossy compression on the detector of the epileptic seizure.

Several techniques are introduced for epileptic seizure detection from the EEG data [START_REF] Zhao | A novel deep neural network for robust detection of seizures using eeg signals, Computational and mathematical methods in medicine[END_REF][START_REF] Tzallas | Epileptic seizure detection in eegs using timefrequency analysis[END_REF][START_REF] Orhan | Eeg signals classication using the k-means clustering and a multilayer perceptron neural network model[END_REF][START_REF] Kaya | 1d-local binary pattern based feature extraction for classication of epileptic eeg signals[END_REF][START_REF] Sharmila | Dwt based detection of epileptic seizure from eeg signals using naive bayes and k-nn classiers[END_REF][START_REF] Bhattacharyya | Tunable-q wavelet transform based multiscale entropy measure for automated classication of epileptic eeg signals[END_REF][START_REF] Zhang | Lmd based features for the automatic seizure detection of eeg signals using svm[END_REF][START_REF] Ullah | An automated system for epilepsy detection using eeg brain signals based on deep learning approach[END_REF][START_REF] Türk | Epilepsy detection by using scalogram based convolutional neural network from eeg signals[END_REF][START_REF] Acharya | Deep convolutional neural network for the automated detection and diagnosis of seizure using eeg signals[END_REF][START_REF] Zahra | Seizure detection from eeg signals using multivariate empirical mode decomposition[END_REF]. In [START_REF] Zhao | A novel deep neural network for robust detection of seizures using eeg signals, Computational and mathematical methods in medicine[END_REF], the authors proposed an epileptic seizure detector by using a deep neural network. This method includes three fully connected layers and three convolutional blocks.

This method is applied to two, three, and ve-class classication problem. Au-thors in [START_REF] Ullah | An automated system for epilepsy detection using eeg brain signals based on deep learning approach[END_REF] introduced a model named P-1D-CNN (Pyramidal one-dimensional convolutional neural network). The rened approach of the standard network model is used. The work in [START_REF] Acharya | Deep convolutional neural network for the automated detection and diagnosis of seizure using eeg signals[END_REF] applied the CNN for EEG data classication.

The CNN utilized thirteen layers to detect three classes: seizure, normal, and preictal. Authors in [START_REF] Zahra | Seizure detection from eeg signals using multivariate empirical mode decomposition[END_REF] SHORTCOMINGS. Despite presenting various methods for EEG data reduction and epileptic seizure detection, however, to the best of our knowledge, there is no integrated ecient method that combines reducing the volume of EEG data on the Edge network and providing a quick decision at the Fog gateway about the patient's health condition for remote monitoring applications.

For instance, the proposed data reduction methods can aect the quality of reconstructed EEG data and they do not ensure a high EEG data reduction and accuracy at the same time. As for the methods used to detect epileptic seizures, they were not employed at the Fog gateway to monitor patients remotely; in addition to that, they did not provide acceptable percentages for the accuracy of the decision and did not take into account the delay in detecting seizures for remote applications. man encoding approach has utilized to accomplish a high range of compression between 20 -90% according to [START_REF] Rajasekar | Human quantization approach for optimized eeg signal compression with transformation technique[END_REF]. The proposed KCHE method implemented the Human encoding because it is a greedy method, and it requires less time of computation. It minimizes the code length on average to designate the alphabet's representatives. The code with variable length is employed to exchange each character based on the character's repetition. This can make the access time to the characters reduced. The Human coding provides the prex codes to ensure the lossless EEG data compression and avoid the appearance of vagueness. Algorithm 1 refer to the suggested KCHE method.

In Algorithm 1, EEG data values are selected randomly as K centroids a t 1 , ..., a t K . After that, each EEG data in Y is allocated to the closest centroid a t i , where i ∈ K. Then the new centroids are calculated, and the algorithm continues until nding the optimal positions for the centroids. The algorithm converges either: there is no variation in the values of the centroids (i.e., it is stabilized)

2 for i ← 1 to m do 3 N um ← N odeStructure{Group i }; 4
Lef.P U SH(N um);

Accuracy(%) ← Correct N o Length(actual) * 100 (1)
Where the Correct N o is the number of matching between the actual i and 275 predicted i for i=1,..., Length(actual).

After the training process, the trained model can be used to predict the patient's situation from newly received EEG data to detect the epileptic seizure of the patients and send a notication to the medical experts to take the appropriate decision according to the status of the patient.

Finally, the EEG data of the patients will be compressed using proposed KCHE lossless compression method and then transmitting to the data center of the Cloud platform for archiving and further analytic by the doctors to check the progress of the patients.

Performance Analysis and Simulation Results

This section introduces the performance assessment of the proposed Edge-

ii) Compression Ratio: it is formulated as follow.

CompressionRatio(%) = 1 - EEG Compressed EEG Original * 100 (3)
The 2.

As explained in Table 2, when the number of groups K increases, the compression ratio, compression power, and compression time increased while the transmitted EEG data and decompression time are reduced. Therefore, it is essential to select a suitable number of groups that can balance the compression ratio and the compression/decompression time. The suggested KCHE method assigns 100 to K, and this reduces the sent EEG data from the Edge gateway to the fog gateway and improves the performance of the IoMT network. This signicant metric plays an essential role in the performance of the IoMT network. This experiment studies the impact of this measure using several EEG data records and compares the ndings with other methods. Figure 3 presents the compression ratio using EEG records (Z, F, N, O, S) for dierent approaches.

330

The proposed KCHE method introduces a better compression ratio compared with HE and LZW. KCHE compressed the EEG data from 85.5% up to 89.5% for all records. HE and LZW compressed the EEG data from 65.9% up to 68.8% and from 42.7% up to 48.4% respectively.

Compression Time

This study investigates the inuence of the suggested KCHE on the time required to compressing the EEG data. Figure 5 gives the time of compression for KCHE, HE, and LZW using dierent EEG records (Z, F, N, O, S). As illustrated in Figure 5, the proposed KCHE consumed little time for compression compared with LZW, while it consumed a little more time for EEG data compression compared with HE. However, the proposed KCHE presented a higher performance especially, in compression ratio and sent EEG data. KCHE improved the performance of the IoMT network. This section studies the impact of the proposed KCHE on the time of the decompression process. Figure 6 shows the time required for a decompression process of dierent methods using EEG records (Z, F, N, O, S). The presented results in Figure 6 showed that the proposed KCHE spent a lower time for decompression compared with LZW whilst it spent a little bit higher time for decompression compared with HE.

Compression Power

This experiment studied the compression power for several methods of lossless compression such as the proposed KCHE approach, JPEG2000 [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF], 2-D SPIHT + AC [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF], 1-D SHORTEN [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF], 2-D SPIHT [START_REF] Srinivasan | Ecient preprocessing technique for real-time lossless eeg compression[END_REF], AC [START_REF] Srinivasan | A two-dimensional approach for lossless eeg compression[END_REF], and 1-D SPIHT [START_REF] Srinivasan | Ecient preprocessing technique for real-time lossless eeg compression[END_REF]. Figure 7 explains the compression power for dierent lossless compression algorithms.

The introduced results of Figure 7 shows that the proposed KCHE lossless compression approach outperforms the other existing methods by providing a better compression power while keeping the quality of the received EEG data at the Fog gateway. The average of compression power of KCHE is four times 370 the average of compression power of other methods for all EEG records (Z, F, N, O, S). The spatial similarity between the received EEG data at the Edge gateway is exploited by the proposed KCHE to reduce the EEG data before sending them to the Fog gateway.

Simulation Results of ESDNB at Fog Gateway

In this section, The proposed ESDNB (Epileptic Seizure Detector based Naive Bayes) approach is evaluated using dierent performance metrics such as Accuracy (Acc), Mean Square Error (MSE), F-Score (F), Sensitivity(Sen), Specicity(Sp), and Precision(Pr) to show the eectiveness of the proposed ES-DNB. The performance of the proposed ESDNB is compared to some existing related work such as Novel CNN [START_REF] Zhao | A novel deep neural network for robust detection of seizures using eeg signals, Computational and mathematical methods in medicine[END_REF], TFA +ANN [START_REF] Tzallas | Epileptic seizure detection in eegs using timefrequency analysis[END_REF], DWT+ Kmeans +MLPNN [START_REF] Orhan | Eeg signals classication using the k-means clustering and a multilayer perceptron neural network model[END_REF], 1-D-LBP + FT/BN [START_REF] Kaya | 1d-local binary pattern based feature extraction for classication of epileptic eeg signals[END_REF], DWT+ NB/KNN [START_REF] Sharmila | Dwt based detection of epileptic seizure from eeg signals using naive bayes and k-nn classiers[END_REF], TQWT+KNNE+SVM [START_REF] Bhattacharyya | Tunable-q wavelet transform based multiscale entropy measure for automated classication of epileptic eeg signals[END_REF], LMD+ GA-SVM [START_REF] Zhang | Lmd based features for the automatic seizure detection of eeg signals using svm[END_REF], CNN+ M-V [START_REF] Ullah | An automated system for epilepsy detection using eeg brain signals based on deep learning approach[END_REF], CWT+CNN [START_REF] Türk | Epilepsy detection by using scalogram based convolutional neural network from eeg signals[END_REF], CNN [START_REF] Acharya | Deep convolutional neural network for the automated detection and diagnosis of seizure using eeg signals[END_REF],

MEMD+ANN [START_REF] Zahra | Seizure detection from eeg signals using multivariate empirical mode decomposition[END_REF]. There are three activities in epileptiform EEG: ictal (during a seizure), interictal (between seizures), and postictal (after a seizure). Table 3 shows the average values of the performance metrics using 5-fold crossvalidation. The EEG datasets merged in various combinations to explore the global classication model of the proposed ESDNB approach. Two classes (seizures, nonseizures), three classes (ictal, normal, and interictal), ve classes (Z, O, N, F, and S). can be classied by this model. This section introduces further results, analysis, and discussion to prove the eciency of the work proposed in this paper. Figure 8 shows the comparison between the EEG data size of both compressed EEG data (by KCHE) and Non-compressed EEG data. The results introduced in Figure 8 show that the KCHE approach reduces the EEG data size after the compression from 85.6

As shown in

% up to 89.2% compared with Non-compressed EEG data for dierent EEG data records. These results ensure the eciency of the proposed lossless KCHE approach in compressing and reducing the EEG data before transmitting them to the Fog gateway while keeping the quality of data of the original.

Figure 9 shows the energy consumption at the edge node for both approaches: compressed EEG data (by KCHE) and Non-compressed EEG data. In this paper, the employed energy consumption model is based on the Medusa II sensor 430 device [START_REF] Idrees | Perimeter-based coverage optimization to improve lifetime in wireless sensor networks[END_REF]. It uses the microcontroller called Atmel's AVR ATmega103L. There are four units inside this device: processing, communication, sensing, and power supply. Table 5 summarizes the consumed energy (denoted in milliWatt/second) for various states of the sensor device. The packet size is 1024 bits.

E EdgeN ode = P i=1 E i S * T i S + E i P r * T i Compr * T Dif f + E i C * D i Bits P (4)
Where P is the total number of periods (P =50), E i S refers to the energy of 435 sensing at period i, T i S refers to the time required to sense the EEG data during period i (T i S = 47.2 seconds), E i P r is the energy needed to process while applying the compression algorithm, T i Compr refers to the compression time, E i C is the energy required to transmit one bit in period i (E i C = 0.2575), D i Bits refers to the total number of transmitted bits by the Edge node. The results conrm that the KCHE approach reduces the consumed energy at the Edge device from 86 % up to 89% compared with the Non-compressed EEG data approach for dierent EEG data records. One might think that the proposed lossless KCHE approach is too costly in terms of energy due to the time required for compression, but the results show that it is very useful to lose as little time as possible during the compression to highly reduce the transmitted data without aecting the quality of received data at the Fog gateway.

In this paper, latency is dened as the time required by the EEG data to travel from the Edge node to the Fog gateway. The EEG data represents a collection of data packets belonging to the same period. The main purpose of reducing the latency is to provide a fast decision response to the medical sta about the situation of the patient. The latency is directly proportional to EEG data size. Therefore, larger EEG data sizes have higher latencies. The latency time T L can be calculated as follows.

T L = T Edge T rans + T Link + T F og Queue + T F og P r .

(

) 5
The T Edge T rans is the time required to transmit EEG data (T Edge T rans =

P ktN o i=1 L/R),
where PktNo is the total number of packets in the period. The T Link refers to the time required to transfer the EEG data across the communication link to Fog gateway (T Link = P ktN o i=1

T L), where TL is the time required by one packet to travel over the communication link to reach the Fog node. The T F og Queue is the waiting time for the received EEG data at the queue of the Fog gateway, and T F og P r is the processing time at the Fog node. In this experiment, the packet length (L) is set to 128 Bytes and the transmission data rate (R) is 250 Kbps. For simplicity's sake, it is assumed that there is only one hop and the T L is It can be seen from the results that the KCHE approach decreases the latency time between the edge and Fog nodes due to the high reduction of the EEG data at the Edge node while keeping the quality of received EEG data at the Fog gateway. The KCHE reduces the latency time from 84.6 % up to 88.2% compared with the Non-compressed EEG data approach for dierent EEG data records. This will help the medical sta to make fast decisions concerning their patients.

Conclusion and perspectives

This paper proposed an Edge-Fog Computing Enabled Lossless EEG data compression with Epileptic Seizure Detection in IoMT networks. The proposed approach applies two ecient algorithms. The KCHE lossless compression algorithm is implemented at the Edge gateway to reduce a large amount of the EEG data before sending it to the Fog gateway. The Epileptic Seizure Detector based Naive Bayes (ESDNB) designed for predicting the Epileptic Seizure at the Fog node from the received EEG data. Finally, the EEG data at Fog node is compressed to send them to the Cloud platform for archiving and further analysis. The results show that the proposed KCHE approach outperforms other existing methods in terms of compression power and compression ratio.

The suggested ESDNB approach outperformed the other algorithms in terms of accuracy. In future works, the lossless compression method will be improved to increase the compression power. Furthermore, a new machine learning approach can be developed to introduce a higher accuracy and robust seizure detection.

Figure 1 :

 1 Figure 1: Edge-Fog computing architecture in IoMT Network.

2 . 3 . 4 .

 234 wellness and productivity. These EEG signals require a large storage capacity to save, process, decision making about the patient situation, and transfer. To deal with these challenges, the compression techniques can be used at the Edge gateway and the machine learning at the Fog gateway to decrease the volume of EEG data before transmitting it to the Fog and to make a fast decision at the Fog level instead of Cloud data centers. Several research works have proposed in the literature either reducing the EEG data or making the decision about the status of the patient. Unlike the above-mentioned works, achieving ecient compression at the Edge layer and accurate decision about the seizure detection at the Fog layer can play important role in reducing the large size of data to the Cloud and decrease the energy consumption and latency. This paper includes the following contributions. 1. A hybrid approach of Edge-Fog Computing Enabled Lossless EEG data compression with Epileptic Seizure Detection in IoMT network is proposed. The proposed approach is based on the Edge-Fog computing architecture in IoMT Network (see Figure 1) and it achieves the lossless compression technique at the Edge gateway and the epileptic seizure detection using Machine Learning at the Fog gateway. The proposed hybrid lossless compression technique combines two ecient methods: K-means Clustering and Human Encoding called (KCHE) to produce a larger lossless compression rate on the gathered data of EEG at the Edge gateway before transmitting it to the Fog gateway. This KCHE technique is employed at the Edge gateway in the proposed architecture of the Edge-Fog computing in IoMT Network. This can lead to improving the performance of the IoMT Network due to decreasing the transmitted EEG data of the patient toward the Fog gateway by proposed KCHE technique along with maintaining the integrity and the accuracy of EEG data at the Fog gateway. Employing the machine learning based on the Naive Bayes algorithm at the Fog gateway for epileptic seizure detection. Naive Bayes algorithm has been trained based on the received EEG data from the Edge gateway. The employed Naive Bayes algorithm introduced a strong detector for epileptic seizure and high accuracy while enhancing the response time concerning IoMT applications. The performance improvement of the proposed work presented through several experiments using Python programming language and depending on real EEG captured data for patients with various records (Z, F, N,

  introduced a model based on MEMD (Multivariate extension of Empirical Mode Decomposition) and neural network for classifying the EEG data into non-ictal EEG and ictal signals. The non-stationary data sets are decomposed and analysed using MEMD. The work in [23] proposed a model combining Continuous Wavelet Transform (CWT) and CNN. The CWT converts the EEG data into ve classes to produce two-dimensional frequencytime scalograms. The CNN is used for the classication of these ve dierent classes.

  OUR APPROACH. An edge-fog computing enabled lossless EEG data compression with epileptic seizure detection in IoMT Network is proposed.Three main functions have performed on the proposed Edge-Fog computing architecture. A hybrid lossless EEG data compression approach is composed of Human encoding and k-means algorithms at the Edge gateway to reduce EEG trac transmitted from Edge to fog while maintaining the quality of received data. An epileptic seizure detector based on an ecient Naive Bayes machine learning algorithm is implemented at the Fog gateway to predict the patient's situation and notify the medical experts rapidly without introducing latency. Finally, the EEG data is compressed and then transmitted to the data centers of the Cloud for further analytic and archiving. The proposed approach can reduce the volume of data trac on the network, keeping the quality of data, reduce the latency, and providing accurate decision about the patient's situation.

  3. Proposed TechniquesThis section introduced an edge-fog computing enabled lossless EEG data compression with epileptic seizure detection in IoMT Network. Figure2refers to the proposed approach based on Edge-Fog computing architecture.

Figure 2 :

 2 Figure 2: Proposed approach based on Edge-Fog computing architecture..

5 end 6 while 8 N 9 N 3 DF ← Rot; 4 while 2 . 3 Summarizing ← SummarizingByClass(trainSet j ); 4 for Row ∈ testSet j do 5 Out 6 Append

 56893423456 Lef.Length() = 1 do 7 N um ← N ovelN ode(); um.Lef t ← X ← Lef.P OP (); um.Right ← Y ← Lef.P OP (); 10 Repetition(N um) ← Repetition(X) + Repetition(Y ); 11 Lef.P U SH(N um); 12 end 13 return Lef ;continue. The nodes with the highest priority in the queue will be eliminated (see lines (7)-[START_REF] Le | The neurogeneration: New era in brain enhancement revolutionising the way we think, work and heal[END_REF]). Then, a new node is built that contains these nodes and their frequency summation as a child. This novel node would be inserted into the queue. Eventually, the node's root is the remaining one in the queue and the tree is formed. Algorithm 2 consumes O(nlogn) of time requirements. 250 In Algorithm 3, the prex codes series converted to a particular byte value in decompression strategy. It accomplished through traversing the tree node by node as each bit collected from the input series. If the traversing arrives at the leaf node, the value of the byte realised, where the value of the leaf represents the needed value of EEG data. Algorithm 3: Human Decoding Input: Rot : Human tree's root, BS : the stream of bits is needed to be decoding. Output: DF : reconstructed le from decompression process 1 M S ← Length(BS); 2 for j ← 1 to M S do DF.LEF T = N U LL and DF.RIGHT = N U LL do 5 if (BS j = 0) then 6 DF ← DF.LEF T ; Fog Gateway Level In the Fog gateway, the decompression process using Algorithm 3 achieved upon receiving the compressed data to reconstruct the original EEG data. These collected data can be used to learn a machine learning algorithm based on a Naive Bayes method to predict the epileptic seizure of the patients in IoMT 260 Network. The Naïve Bayes is simple to construct and precise approach for prediction. The cost of computation of the Naive Bayes is low, consequently, it can be used eciently on a massive dataset [40]. Algorithm 4 shows the Machine Learning based Naïve Bayes. In Line (1) of Algorithm 4, the collected EEG dataset has spitted into K 265 groups using the K-fold cross-validation approach. Each group contains training Algorithm 4: Machine Learning based Naïve Bayes Input: DataSet : dataset of EEG patients, K : Number of folds. Output: M eanAccuracy: Mean Accuracy 1 {trainSet, testSet} ← Split Dataset using K-fold Cross Validation(DataSet, K); 2 for j ← 1 to K do ← P redicting(Summarizing, Row); Out to Predicted ; eanAccuracy ; data set and a test data set. The lines (2)-(13) are used to evaluate the Naïve Bayes algorithm using the split of the cross validation. The lines (3)-(7) refer to the main steps of the Naïve Bayes algorithm. In line (3), the EEG training set has split by class, and the statistics have calculated for every row. These 270 statistics include standard deviation, mean, and count for every column in the EEG dataset. In line (5), the predicting probabilities have calculated to predict the class for a yielded row. In line (9), the AccuracyMetric function returns the percentage of the accuracy that can be calculated as follow.

  EEG Compressed represents the volume of Compressed EEG data after implementing proposed KCHE. The EEG Original represents the volume of the original EEG data before process of compression. iii) Decompression and Compression Processing Time (T): represents the total time of the process of compression and decompression respectively. iv) Transmitted data volume(in KB): represents the volume of the EEG compressed data transferred to the data center of the Cloud platform from Edge gateway. 4.1.1. Number of groups This section investigates the inuence of the groups (clusters) number on the performance of suggested KCHE technique utilizing several metrics of performance. The results conducted by using several sizes of groups (K) like 10, 30, 50, 70, and 100. The record Z of the EEG dataset of Bonn University used during this experiment. The performance metrics versus the number of groups presented in Table

Figure 3 :

 3 Figure 3: The compression ratio.

Figure 4 :

 4 Figure 4: The transmitted EEG Data.

Figure 5 :

 5 Figure 5: The compression Time.

Figure 6 :

 6 Figure 6: The Decompression Time.

Figure 7 :

 7 Figure 7: The Compression Power.

Figure 8 :

 8 Figure 8: The EEG Data Size:Compressed EEG data (by KCHE) vs Non-compressed EEG data.

Figure 9 :

 9 Figure 9: The Energy Consumption at the Edge node.

  0.05 second, and the waiting time for each packet at the queue of the Fog node (T F og Queue ) is 0.001 second. It is assumed there is no packet loss during the simulation. Figure 10 shows the latency time for both approaches: the Compressed EEG data (by KCHE) and the Non-compressed EEG data for dierent EEG data records.

Figure 10 :

 10 Figure 10: The latency time.

Table 1 :

 1 The list of acronyms with corresponding full terms

	Acronym	Full term
	IoMT	Internet of Medical Things
	EEG	Electroencephalogram
	KCHE	k-means Clustering and Human Encoding
	ESDNB	Epileptic Seizure Detector based Naive Bayes
	IoT	Internet of Things
	CNN	Convolutional Neural Network
	TFA	TimeFrequency Analysis
	ANN	Articial Neural Network
	DWT	Discrete Wavelet Transform
	MLPNN	Multi-Layer Perceptron Neural Network
	1D-LBP	One-Dimensional Local Binary Pattern
	FT/BN	Functional Tree/BayesNet
	NB/KNN	Naive Bayes/K-Nearest Neighbor
	TQWT	Tunable-Q Wavelet Transform
	KNNE	K-Nearest Neighbor Entropy
	SVM	Support Vector Machine
	LMD	Local Mean Decomposition
	GA	Genetic Algorithm
	M-V	Majority-Vote
	CWT	Continuous Wavelet Transform
	MEMD	Multivariate Empirical Mode Decomposition
	1-D SPIHT One Dimentional Set Partitioning In Hierarchical Trees
	AC	Arithmetic Coding
	JPEG	Joint Photographic Experts Group
	SHORTEN Simple lossless and near lossless waveform compression
	DWT	Discrete Wavelet Transform
	BCI	Brain Computer Interface
	ASCII	American Standard Code for Information Interchange
	MCTF	Motion Compensated Temporal Filtering
	P-1D-CNN Pyramidal one-Dimensional Convolutional Neural Network
	HE	Human Encoding
	LZW	LempelZivWelch

  3.1. Edge Gateway LevelAfter receiving the EEG data at the Edge gateway, a lossless hybrid compression method applied to decrease the gathered EEG data trac size before transmitting it to the Fog gateway while maintaining the accuracy of received data at the Fog node. The hybrid lossless compression method is consisting of two ecient data reduction techniques: Human Encoding and K-means Clustering. The sensed data of EEG is periodically gathered at the Edge node from the electrodes devices on the head of the patient. There are two records of EEG

data are handled at the Edge gateway in each period. They are denoted as Y = y1, . . . , ym, where m represents the sensed data number of EEG values for the two records (i.e., 8194 EEG data values). In KCHE method, the EEG data of Y are grouped into many groups according to their similarity using K-means Clustering. The main reason behind implementing the K-means clustering by the proposed KCHE is that it is almost easy to implement, scalable for huge data, ensure convergence, simply adjusts to new instances, and generalizes to groups of various sizes and shapes. After that, the lossless Human Encoding is applied to each group of EEG data to compress it into a compressed le. Hu-

  Algorithm 1: KCHE Lossless Compression Input: Y = y 1 , . . . , y m : vector of EEG data values, m : size of vector Y, K : number of clusters CL j ← Φ // ∀ j ∈ K; 6 for each y j ∈ Y do 7 s ← argM in i {||y j -a t i } // allocate y j to the closest point center ;

		Algorithm 2: Human Encoding
		Input: Group, m
		Output: C: compressed le of the clusters
		1 t ← 0;
		2 Initialize K clusters: a t 1 , ..., a t K ;
		3 Repeat ;
		4 t ← t + 1;
		5 end
		return GF ;
		or the maximum number of iterations has reached. The FetchGroups(CL, K)
		function is to produce the needed groups depend on the supplied number of
		groups named K.
		In Algorithm 2, each EEG value (leaf node) is created and put in the queue of
	245	priority. As shown in line (6), if there are many nodes in the queue, the loop will

8 CL s ← CL s ∪ y j ; 9 end for each i ∈ K do a t i ← 1 |CLi| yj ∈CLi y j end Until Convergence ; {Group 1 , . . . , Group K } ← F etchGroups(CL, K); GF ← // empty le; for i ← 1 to K do F L i ← Human Encoding(Group i , Length(Group i )) ; GF ← GF ∪ F L i // combine the compressed le F L i with GF; Output: F L: compressed le of the EEG data group 1 Lef ← QueueStructure();

  Compression Power: it is named the compression ratio. It is the ratio between the volume of uncompressed (EEG Original ) and compressed volume (EEG Compressed ) of data. It is formulated as follow.

	i) CompressionP ower =	EEG Original EEG Compressed
	4.1. Simulation Results of KCHE at Edge Gateway
	The proposed KCHE approach evaluated by achieving several performance
	measures like compression/decompression processing time, the volume of trans-
	mitted data, and Compression Ratio. To show the eectiveness of the proposed
	KCHE approach, some signicant performance criteria are used to evaluate the
	proposed KCHE approach for EEG lossless compression. These metrics are
	dened as follow.

Fog Computing Enabled Lossless EEG data compression with Epileptic Seizure

Detection in IoMT networks. The simulation experiments have achieved using the EEG data of Bonn University. This EEG dataset includes several records (N, O, Z, F, S)

[START_REF] Andrzejak | Indications of nonlinear deterministic and nite-dimensional structures in time series of brain electrical activity: Dependence on recording region and brain state[END_REF]

. A custom simulator-based Python programming language has used to perform the simulation experiments. In this paper, KCHE refers to the name of the proposed EGG compression technique implemented at the Edge node. The Human Encoding algorithm is named as HE, while the Lem-pelZivWelch compression algorithm is named as LZW. The Epileptic Seizure Detector based Naive Bayes method implemented at the Fog gateway is named ESDNB.

Table 2 :

 2 Number of Groups vs Performance Metrics

	Metric	Number of Groups (K) 10 30 50 70 100 150 190
	Compression	85.8987.1488.1588.8089.4690.3790.74
	Ratio
	Compression	7.09 7.78 8.45 8.94 9.52 10.4110.82
	Power
	Transmitted Data	10.39 9.47 8.73 8.24 7.75 7.08 6.79
	in KB
	Compression time	0.03 0.06 0.07 0.08 0.13 0.22 2.82
	(Seconds)
	Decompression time	0.07 0.10 0.18 0.21 0.28 0.31 3.42
	(Seconds)
	4.1.2. Compression Ratio

Table 3

 3

	, the proposed ESDNB approach can provide an accuracy
	from 99.95% up to 99.99% for two classes classication and from 99.53% up to
	99.98% for three classes classication. The ve classes classication is more
	complex and dicult to solve compared to other classes of classication and
	the proposed ESDNB still introduce an accuracy of 99.98%. In two classes
	classication, the proposed ESDNB provides MSE between 0.02% and 0.12%,
	while for three classes classication, ESDNB provides MSE between 0.02% and
	0.49% and for ve classications, ESDNB provides 0.08 of MSE. Moreover, the
	MSE for the ve classes classication of the proposed ESDNB is 0.08. Hence,
	the proposed ESDNB model has a powerful generalization capability and is
	appropriate for dierent problems of classication.
	Table 4 refers to the comparison between the proposed ESDNB approach and
	some other existing related works in terms of accuracy. As shown in Table 4, the
	proposed ESDNB approach provides accuracy from 99.53 % up to 99.99 % using
	the dataset of Bonn University. In the problem of two-class classication, the

Table 3 :

 3 Performance metrics using 5-fold cross-validation.

		Data sets	Acc	MSE	F	Sen	Sp	Pr
		combination
		Z_S	99.99	0.01	99.99 99.99 99.99 99.99
		O_S	99.95	0.05	99.95 99.95 99.95 99.95
		N_S	99.95	0.05	99.95 99.95 99.95 99.95
		F_S	99.95	0.05	99.95 99.95 99.95 99.95
		ZO_S	99.98	0.02	99.97 99.96 99.96 99.98
		ZN_S	99.98	0.02	99.97 99.96 99.96 99.98
		ZF_S	99.98	0.02	99.97 99.96 99.96 99.98
		ON_S	99.98	0.02	99.97 99.96 99.96 99.98
		OF_S	99.98	0.02	99.97 99.96 99.96 99.98
		NF_S	99.98	0.02	99.97 99.96 99.96 99.98
		ZON_S	99.98	0.02	99.97 99.95 99.95 99.98
		ZOF_S	99.95	0.12	99.95 99.93 99.97 99.97
		ONF_S	99.98	0.02	99.97 99.95 99.95 99.98
		ZONF_S	99.95	0.05	99.92 99.93 99.93 99.91
		Z_N_S	99.96	0.07	99.96 99.96 99.98 99.96
		Z_F_S	99.96	0.07	99.96 99.96 99.98 99.96
		O_N_S	99.98	0.02	99.98 99.98 99.99 99.98
		O_F_S	99.98	0.02	99.98 99.98 99.99 99.98
		ZO_NF_S	99.53	0.49	99.60 99.59 99.74 99.61
		Z_O_N_F_S 99.98	0.08	99.98 99.98 100.00 99.98
		accuracy of the ictal and interictal by the proposed ESDNB approach and for
		the datasets combinations N _S,F _S, ZO_S, N F _S, and ZON F _S is better
		than all other methods while it is slightly lower than some methods for Z_S and
		O_S. In a three-class classication problem, the proposed ESDNB approach
	410	provides better accuracy than other methods for O_F _S and ZO_N F _S
		datasets combination. Moreover, the proposed ESDNB approach introduced a

Table 4 :

 4 Comparison between proposed ESDNB approach and some existing methods in terms

	of accuracy.
	Data sets	Existing Methods	Acc	Acc of
	combination			ESDNB
		Novel CNN	99.52
		TFA +ANN	100
		DWT+ Kmeans +MLPNN	100
		1-D-LBP + FT/BN	99.50
	Z_S	DWT+ NB/KNN	100	99.99
		TQWT+KNNE+SVM	100
		LMD+ GA-SVM	100
		CNN+ M-V	100
		CWT+CNN	99.50
		Novel CNN	99.11
		DWT+ NB/KNN	99.25
	O_S	TQWT+KNNE+SVM	100	99.95
		CNN+ M-V	99.6
		CWT+CNN	99.50
		Novel CNN	98.02
		DWT+ NB/KNN	99.62
	N_S	TQWT+KNNE+SVM	99.50	99.95
		CNN+ M-V	99.1
		CWT+CNN	98.50
		Novel CNN	97.63
		1-D-LBP + FT/BN	95.50
		DWT+ NB/KNN	95.62
	F_S	TQWT+KNNE+SVM	98	99.95
		LMD+ GA-SVM	98.10
		CNN+ M-V	99.4
		CWT+CNN	98.50
		Novel CNN	99.38
	ZO_S	DWT+ NB/KNN	99.16	99.97
		CNN+ M-V	99.8
		Novel CNN	98.03
	NF_S	1-D-LBP + FT/BN	97.00	99.98
		DWT+ NB/KNN	98.75
		CNN+ M-V	99.7

4.3. Further Results and Discussion

Table 5 :

 5 The consumed power values EdgeN ode ) at the Edge node is calculated as follows.

	Device Status Sensing Microcontroller Radio Power (mW)
	Processing	ON	ON	ON	26.83
	Listening	ON	ON	ON	20.05
	Active	ON	ON	OFF	9.72
	Sleep	OFF	OFF	OFF	0.02
	The energy required to transmit or receive one bit is 0:2575 Joule
	The simulations were achieved on HP laptop with processor Intel(R) Core(TM)
	i7-7500U CPU @ 2.70GHz (4 CPUs) whose Million Instructions Per Second(MIPS)
	rate is 49,360. To be compatible with the use of a sensor device (Edge node)
	based on a microcontroller (Atmels AVR ATmega103L) with 6MHz owning a
	MIPS rate equivalent to 6, the original time of execution on this laptop is multi-
	plied by 2056.67 ([49,360/4] * [1/6]) and this value represented as the parameter
	T Dif f . The EEG data is composed of 5 data records (Z, F, S, N, O). Each one
	includes 100 les of EEG data. Each EEG data le includes 4097 EEG data
	that require 23.6 seconds to be captured. This paper combines the data of each
	two les to constitute 50 periods for each record. Hence, the average of energy
	consumption (E


Stéphane Cuenat
email: stephane.cuenat@univ-fcomte.fr

Raphaël Couturier
email: raphael.couturier@univ-fcomte.fr

Convolutional Neural Network (CNN) vs Vision Transformer (ViT) for Digital Holography 1 st

Keywords: Digital holography, CNN, Efficientnet, Densenet, Vision Transformer, ViT, Transformer

 in which the distance between two consecutive classes was 100µm, our proposal allows us to drastically reduce this distance to 1µm. Moreover, ViT reaches similar accuracy and is more robust than CNN.

I. INTRODUCTION

Digital holography (DH) is an emerging field in imaging applications [START_REF] Kim | Principles and techniques of digital holographic microscopy[END_REF]. It is mostly exploited in 3D image processing, surface contour measurements, microscopy [START_REF] Acharya | Comparative study of digital holography reconstruction methods[END_REF], and even in microrobotics [START_REF] Hong | Real-time holographic tracking and control of microrobots[END_REF]. A major challenge in microrobotics and/or photonics is to be able to determine metrics in the context of complex imaging devices. Among those metrics, the 3D positioning of micro-objects is particularly interesting. With earlier hologram image reconstruction, the overall experimental setup needed to be determined ahead of time including object's depth position [START_REF] Ren | Autofocusing in digital holography using deep learning[END_REF], otherwise many diffraction calculations were needed to be applied for various depth settings. According to [START_REF] Ren | Learning-based non parametric autofocusing for digital holography[END_REF] and [START_REF] Ilhan | Digital holographic microscopy and focusing methods based on image sharpness[END_REF], these techniques consume a lot of time as they necessitate many diffraction calculations and signal processing, and thus heavy computations were required in this scope. Nowadays, Deep Learning (DL) is reshaping the world of computer science and is used in many application areas including DH. Particularly, DL helped in coping with time consumption and heavy computation concerns of the older techniques to determine depth position: instead of applying many diffraction calculations, training a deep neural network enabled to determine the depth predictions [START_REF] Ren | Learning-based non parametric autofocusing for digital holography[END_REF] and [START_REF] Shimobaba | Convolutional neural networkbased regression for depth prediction in digital holography[END_REF]. These predictions can be approached either as a classification problem [START_REF] Ren | Autofocusing in digital holography using deep learning[END_REF] [10] [START_REF] Pitkaaho | Focus classification in digital holographic microscopy using deep convolutional neural networks[END_REF] or as a regression problem [START_REF] Ren | Learning-based non parametric autofocusing for digital holography[END_REF] and [START_REF] Shimobaba | Convolutional neural networkbased regression for depth prediction in digital holography[END_REF].

A first approach using a classification has been presented in [START_REF] Couturier | Using deep learning for object distance prediction in digital holography[END_REF] showing that residual neural networks such as Densenet169 and Densenet201 can achieve good results and determine the auto-focusing distance with a precision of a scale of 100µm.

In this paper, the problem of determining the distance of a view captured by a holographic camera is addressed by modeling it as a classification problem. The outcomes proved that the built networks are capable of performing predictions with an accuracy level of 99% at a micrometer scale, using 10 classes for the classifications, where each class corresponds to a different distance from the object varying with a step of 1 micrometer (so this corresponds to a distance 100 times smaller than in [START_REF] Couturier | Using deep learning for object distance prediction in digital holography[END_REF]). The proposal is presented thereafter throughout the following sections. Section 2 presents some of the existing literature, more specifically on deep learning and its benefits for addressing classification problems in digital holography. The context of this study is highlighted in the following section. Section 4 is dedicated to a detailed presentation of the proposed deep neural networks and the experimental results. Finally, a conclusion aims to summarize the findings and the potential future works.

II. RELATED WORK

First, DL is approached globally before digging deeper into its use in DH, then a presentation of what a transformer model means and how this architecture has been applied to classification problems is given. A Convolutional Neural Network (CNN) is a well-known DL architecture that is widely used for analyzing and classifying images by extracting and learning features directly from them [START_REF] Gu | Improve image classification using data augmentation and neural networks[END_REF]. Many CNN models are available, each having its own particularity and advantages. Densenet [START_REF] Huang | Densely connected convolutional networks[END_REF] (a densely connected network) is one of them, it is known for its significant results when compared to other models. It even necessitates fewer parameters for training [START_REF] Kumar | Adding binary search connections to improve densenet performance[END_REF]. According to the authors of this CNN model [START_REF] Huang | Densely connected convolutional networks[END_REF], Densenet networks do not encounter optimization issues, even when scaling to hundreds of layers. Their main motivation to create this model was to cope with the vanishing of the input information that occurs at the output of the network after it has passed through many layers, as well as the vanishing of the gradient in the opposite direction. In the following, some works in the literature that tackle DH using DL are discussed. Many studies in DH focus on reconstructing the target object's amplitude and phase once its distance is known; a process referred to as "autofocusing". In particular, identifying the object distance is crucial for the object reconstruction [START_REF] Ren | Autofocusing in digital holography using deep learning[END_REF]. In the literature, autofocusing has been explored by exploiting advances in DL (also called learning-based approaches). To be more specific, two main approaches are investigated to tackle the problem: using classification [START_REF] Ren | Autofocusing in digital holography using deep learning[END_REF] [10] [START_REF] Pitkaaho | Focus classification in digital holographic microscopy using deep convolutional neural networks[END_REF] and using regression [START_REF] Ren | Learning-based non parametric autofocusing for digital holography[END_REF] and [START_REF] Shimobaba | Convolutional neural networkbased regression for depth prediction in digital holography[END_REF].

The focus is first put on the classification approach and its adoption in the literature. In this approach, [START_REF] Pitkaaho | Performance of autofocus capability of deep convolutional neural networks in digital holographic microscopy[END_REF] and [START_REF] Pitkaaho | Focus classification in digital holographic microscopy using deep convolutional neural networks[END_REF] were the first to work on predicting depth in DH in discrete values. In [START_REF] Pitkaaho | Performance of autofocus capability of deep convolutional neural networks in digital holographic microscopy[END_REF], the authors demonstrated that autofocusing in DH can be achieved using DL. They adopted a CNN that is built on top of the AlexNet architecture. They started off with a number of holograms that they prepared first by eliminating the "zero-order" and the "twin-term". They used 21 classes for the labeling and they applied data augmentation on the prepared holograms to increase the size of the dataset. Moreover, the network was trained with manually defined depth values. 90% of the data was used to train the network and the remaining 10% for the validation. Their learning rate was set up to the value of 0.01. As they concluded, their network did not scale properly. Moreover, they stated that their network "generalized well" at a millimeter scale without mentioning the obtained accuracy level to prove it. The authors of [START_REF] Huang | Densely connected convolutional networks[END_REF] used a CNN to predict the object distance by training their network with hologram-specific labels that correspond to the actual distances. They used a uniform technical setup to capture 1,000 holograms, ending up with 5 distance labels. Their experimental results proved that the network is able to predict the distance without any knowledge of the technical setup and with less time consumption than the traditional methods. This proves that they coped with the issues that were encountered in the work [START_REF] Pitkaaho | Performance of autofocus capability of deep convolutional neural networks in digital holographic microscopy[END_REF]. However, although they provided estimates at a millimeter scale (axial range of =3 mm, which is appropriate for imaging systems), they only worked on 5 classes, which may not be enough to generalize their findings.

As shown in [START_REF] Couturier | Using deep learning for object distance prediction in digital holography[END_REF], a first step has been reached using either Densenet169 or Densenet201. To train the model, 10,101 images were used with a split rule of 70% / 30%. All the images (hologram) used were simulated holograms.

Vision Transformer architecture (ViT) has been introduced with the advent of the transformer architecture, mainly used in the field of language translation (NLP). ViT follows the core concepts of a transformer network which is based on the concept of self-attention. As pointed in [START_REF] Vaswani | Attention is all you need[END_REF] "attention is all we need". Such a network is based on an encoder which is built using self attention map mechanism. Contrary to CNN, ViT does not imply any convolution layer. The input image is split in patches and fed into ViT network. ViT architecture achieved state-of-the-art performance on Imagenet.

In this paper, 2 different architecture (CNN and ViT) are used to tackle the problem of depth prediction in the DH context. Each architecture classifies in 10 classes and at a micrometer scale. It uses a dataset of 3,600 images that are augmented and split using the 80-20% rule, without using the training images in the testing. The model is pre-trained using Imagenet. Experimental results presented thereafter prove that the network is able to predict depth with 99% of accuracy.

III. PROPOSED SOLUTION

The objective is to localize objects at the micrometre scale. We use holograms of a target to retrieve the 6 degrees of freedom (6 DOF) of a structured target. The target is generated in such a way that it encodes the position (X and Y) using a binary code. The object image needs to be reconstructed first. For that purpose, engineers rely on the known methods which imply a series of Fourier and inverse transformations. These transformations consume most of the time and do not allow one to get an idea of the re-constructed object (6 DOF) in a real-time approach. In this paper, a method is proposed to extract the reconstruction distance Z (which is the distance along the optical propagation) only using deep learning and classification models. As input, produced holograms on a distance Z over 10µm are considered. Each hologram (see Figure 1) is recorded using the same target. In this paper, this problem is approached using classifier models (ViT & CNN). For that purpose, the set of holograms has been split in 10 classes. Each class contains a total of 360 holograms. The digital holography microscope used produces holograms with a resolution equal to 1024x1024.

A series of deep-learning architectures (CNN & ViT) has been compared using the following crop approaches to create four datasets of input images (holograms) either taking the original hologram or its negative version (Figure 2): IV. RESULTS

All trainings have been executed on a NVidia GPU V100 series. A simple split rule on the input dataset has been applied: 80% for training and 20% for validation, basically 3,400 images in total. 200 random images have been extracted from the full dataset of holograms to build our test dataset randomly. Each training has been executed with a max of 200 epochs. An early stop on the valuation loss with a patience of 20 epochs is considered during training. Below the proposed approaches are compared either by applying a Sobel filter on the hologram passed to the neural network or without any filter applied. The results show for each configuration the value of the valuation loss (val. loss) and valuation accuracy (val. accuracy, Figure 3) after 200 epochs (Tables I &II). The best models are taken from the comparison and further analyzed to give results during inference on a test dataset (Figure 4). All the models have been trained with the following frameworks: Tensorflow and Keras. The Adam optimizer has been used with a learning rate of 10 -4 . For the CNN, a Global Average Pooling layer has been added before the prediction layer (full connected layer).

List of architectures compared: 4 scenarios are considered for each model (Figure 2). The results are shown in Table I andTable II: • SFO: Sobel filter applied on the original hologram. is bounded by 1 -3µm. In case of ViT B16, a slightly higher number of errors is visible due to the lowest performance of the model. Even if the model is pointing a different zone than the one used during training, ViT B16 performs well and the max absolute error in number of classes is of 1 class (1-3µm).

V. VIT VS CNN

According to our results and considering the same ROI as the one used during training, the best architecture for our purpose seems to be EfficientnetB7. Such a model achieves a better performance compared to a model trained using ViT. A ViT network should perform as well as a residual neural network such as Densenet or Efficientnet [START_REF] Dosovitskiy | An image is worth 16x16 words: Transformers for image recognition at scale[END_REF], even reaching 11, Grad-Cam's (as described in [START_REF] Selvaraju | Grad-cam: Visual explanations from deep networks via gradient-based localization[END_REF]) for CNN and the attention map for ViT.

Grad-cam is giving an idea of where a CNN network is looking during training. The figure shows where the neural network focuses after the last convolution layer (block7d project conv for EfficientnetB7 and conv5 block32 2 conv for Densenet169) before batch normalization and prediction layer (dense layer). The network seems to focus its attention on specific location inside the hologram. In case of Densenet169, the CNN strongly focuses on these specific locations inside the hologram. For ViT models, the attention map (Figure 11) is generated. This demonstrates that the model tries to look globally inside the hologram which significantly influences the performance of the model during the training and the inference. It seems that ViT is slightly less accurate during training (val.loss and val. accuracy) than CNN (Densenet169 or EfficientnetB7). Densenet169 focuses more on specific asperities which explains the obtained results (Figure 3), the valuation accuracy reaches an higher value compared to EfficientnetB7 or ViT B16. It seems that the CNN architecture learns the shape of the target more than the physical phenomena. During inference and taking the same ROI for the test dataset, we can see that EfficientnetB7 performs slightly better than Densenet169. This goes in the direction of our assumption as EfficientnetB7 tries to consider the hologram more globally during training. Taking a different ROI, ViT B16 achieves a better performance. This is totally explainable as the attention map shows, ViT B16 is learning from the whole hologram and not specific locations (this is due to the self-attention [START_REF] Vaswani | Attention is all you need[END_REF]). ViT models seem to focus their attention on the phenomena more than the target. The general performance of the model is slightly impacted, but the max absolute error stays in an acceptable range bounded by 1 -3µm.

VI. CONCLUSIONS

Our experiments showed that the reconstruction distance can be found for digital holography using deep learning techniques, especially classification models. The 1-3µm scale has been reached for a dataset of holograms on a scale of 10µm. This solution allows to surpass by a factor 2 to 3 the optical resolution of the microscope (using a 10x microscope objective) knowing that the optical resolution is defined as: r = λ/(N A) 2 = 6.6µm (with NA = 0.3: numerical aperture and λ = 0.6µm). The max error of one class stays below or equal to 1 -3µm when the model fails to recognize the right distance. ViT models are more robust when pointing arbitrary ROI than CNN networks. In future work, our focus will be on regression models. A regression might help to reach a higher accuracy as the problem of auto-focusing is not a discrete, but a continuous function.

•

  A region of interest (ROI) is cropped at the center of the hologram (512x512).• A Sobel filter is applied on the hologram image and a ROI is cropped at the center of the hologram (512x512).

Fig. 1 :

 1 Fig. 1: Original hologram (1024x1024)

•Fig. 2 :

 2 Fig. 2: Four different datasets of 512x512 images(holograms) used for training

Fig. 3 :Fig. 4 :

 34 Fig. 3: valuation accuracy (val. accuracy) per model architecture

Fig. 5 :

 5 Fig. 5: ViT B16 inference results considering images cropped at the center of the input hologram

Fig. 6 :Fig. 7 :Fig. 8 :

 678 Fig. 6: ViT B16 inference results considering images cropped in the bottom left corner of the input hologram

Fig. 9 :Fig. 10 :

 910 Fig. 9: Densenet169 inference results considering images cropped at the center of the input hologram

Fig. 11 :

 11 Fig. 11: Grad-Cam (CNN) and attention map (ViT) of the best architecture (EfficientNetB7, Densenet169 & ViT B 16)

TABLE II :

 II Test results considering negative images with (SFN) or without Sobel filter (NSN) applied. Bold values correspond to best results.

			SFO		NSO
		val. loss val. accuracy val. loss val. accuracy
	ViT L32	0.89	0.56	0.66	0.69
	ViT B32	1.03	0.56	0.61	0.72
	ViT B16	0.88	0.72	0.36	0.85
	EfficientnetB7 0.69	0.71	0.08	0.9735
	EfficientnetB4 0.19	0.93	0.16	0.94
	Densenet201	0.15	0.95	0.31	0.89
	Densenet169	0.27	0.9	0.34	0.9
	TABLE I: Test results considering the original images with (SFO) or without
	Sobel filter (NSO) applied
			SFN		NSN
		val. loss val. accuracy val. loss val. accuracy
	ViT L32	1.38	0.37	1.11	0.51
	ViT B32	1.25	0.43	0.57	0.75
	ViT B16	0.67	0.68	0.22	0.9074
	EfficientnetB7 0.03	0.9941	0.13	0.95
	EfficientnetB4 0.59	0.72	0.33	0.88
	Densenet201	0.24	0.91	0.75	0.62
	Densenet169	0.05	0.9955	0.61	0.71

ACKNOWLEDGMENT This work was supported by ROBOTEX (ANR-10-EQPX-44-01), by Cross-disciplinary Research (EIPHI) Graduate School (contract ANR-17-EURE-0002), the French Investissements d'Avenir program, the I-SITE Bourgogne Franche-Comté (BFC) project (contract ANR-15-IDEX-03) and Région Bourgogne Franche-Comté (ControlNet project). This work was performed using HPC resources from GENCI-IDRIS (Grant 20XX-AD011012913).


domain: chim phys

text:
Li-Wei Hsu

Maxime Bernier

Emilie Herault

Frédéric Garet

Olivier Lavastre

Correction of THz Images for Trustful Identification of Library of Materials in Reflection Configuration

Keywords: HTE High Throughput Experimentation, THz, reflection imaging, accurate comparison, misalignment correction

Terahertz multispectral imaging is an emerging technique for material identification, as many molecules present unique spectral signatures in the frequency range that typically spreads from 100 GHz up to several THz. In most cases, samples to identify are imaged in transmission, which is most of the time not the appropriate configuration regarding industrial requirements. Unfortunately, in reflection configuration, the sample thickness leads to terahertz beam misalignment (defocusing, lateral shift…) that involves erroneous estimation of the reflected amplitude. Such misalignment prevents any absolute characterization of the sample under testing. Thus, to evaluate libraries of materials, one must prepare samples showing exactly the same thickness. This process could be extremely time-consuming and very often, not applicable for fast evaluation in the industry. In this paper, we propose a novel method that evaluates the effect of the unwanted misalignment artifacts, due to the varying sample thickness. Such a method is applied to correct the THz amplitude image and to get an absolute image in reflection configuration, in order to compare library of materials whatever the sample thickness. Article highlights: Misalignment induced by thickness variation, Direct measurements using THz reflection spectroscopy, Accurate and fast comparison of samples with different thicknesses, New method to evaluate material library.

Introduction

Nowadays, THz imaging spectroscopy is largely applied in different applicative fields such as biology [START_REF] Ajito | THz chemical imaging for biological applications[END_REF], the pharmaceutical industry [START_REF] Shen | Terahertz pulsed spectroscopy and imaging for pharmaceutical applications: A review[END_REF], food inspection [START_REF] Lee | Food inspection system using terahertz imaging[END_REF], explosives detection [START_REF] Federici | THz imaging and sensing for security applications-explosives, weapons and drugs[END_REF], automotive inspection [START_REF] Ellrich | Terahertz quality inspection for automotive and aviation industries[END_REF], material detection and identification [START_REF] Miles | Terahertz Frequency Detection and Identification of Materials and Objects[END_REF], or environmental monitoring [START_REF] Demers | UAV-mounted THz spectrometer for real-time gas analysis[END_REF]. In order to accelerate analysis speed, there is a strong interest in developing parallel analysis methods, instead of performing individual experiments one by one. In this context of fast experiments, the high throughput experiment (HTE) is a well-established method [START_REF] Lavastre | Organometallic Combinatorial Chemistry[END_REF]. HTE was efficiently applied in the optical domain, such as UV or visible spectroscopy, not only for the fast discovery of innovative materials [START_REF] Gaudry | Second-order non-linear optical response of metallo-organic compounds: towards switchable Volume 12 Issue 9[END_REF], but also to study their corresponding physicochemical properties, like rheological [START_REF] Chiang | Optical tweezers based active microrheology of sodium polystyrene sulfonate NaPSS‖[END_REF] or adhesive properties [START_REF] Lavastre | Development of new Highthroughput screening method to compare and to detect efficient catalysts for adhesive materials[END_REF]. However, for an accurate comparison between analytical data, it is mandatory to use only flat samples showing the same thickness, and particularly if optical methods are used, such as, analysis based on contactless Raman spectroscopy [START_REF] Lavastre | Contactless Raman Spectroscopy-based Monitoring of Physical States of silyl-modifierd Polymers during Cross_Linking[END_REF] or on fluorescent properties of light emitting diode films [START_REF] Lavastre | Discovery of New Fluorescent Materials From Fast Synthesis and Screening of Conjugated Polymers[END_REF]. Preparation of samples with the same geometry, i.e. shape and thickness, is really time-consuming. The possibility to investigate a large number of samples without thickness consideration could be really useful for users. We report here a new algorithm based on THz Time Domain Spectroscopy (THz-TDS) results, in order to make reliable THz images, whilst taking into account only the amplitude of the THz pulse [START_REF] Auston | Coherent time-domain farinfrared spectroscopy[END_REF]. Such a technic allows us to probe a very broad band spectrum, from typically 0.1 THz, up to several THz, through a single measurement of a picosecond electromagnetic pulse. This technic has been initially developed to characterize materials i.e. to measure the dispersion of the complex refractive index 𝑛 = 𝑛 -𝑖𝜅 of a material over the corresponding frequency range [START_REF] Grischkovsky | Farinfrared time-domain spectroscopy with terahertz beams of dielectrics and semiconductors[END_REF]. The imaginary part 𝜅, called extinction coefficient, is related to the absorption coefficient  of the material, while its real part n rules the velocity of the terahertz electromagnetic wave in the sample. When launching a picosecond electromagnetic burst, with spectral components spread typically from 0.1 THz to typically several THz, the pulse transmitted by the sample is shifted in time, distorted and attenuated because of the material dispersion and absorption. By making the ratio of the spectrum of the transmitted pulse, obtained by the Fast Fourier Transform (FFT) time domain measured signal transmitted by a sample, to the FFT of a reference signal without sample, the frequency dependent complex transmission coefficient 𝑇 of the sample under test is calculated. Finally, the complex refractive index can be numerically extracted from 𝑇 [START_REF] Duvillaret | A reliable method for extraction of material parameters in terahertz timedomain spectroscopy[END_REF].

By repeating this extraction process on different parts of the sample under test (raster scanning), we can rebuild the image of the sample and have spectral information for each pixel: it is the so-called THz multispectral image. This imaging process can either map the refractive index or the absorption coefficient at any available THz frequency, and can be performed in transmission as well as in reflection configuration. In the latter case, the complex refractive index is analytically calculated from the complex Fresnel reflection coefficient𝑅 , according to equation [START_REF] Ajito | THz chemical imaging for biological applications[END_REF], which can be written for a reflection under anincidence angle 𝜃 𝑖 and for a TE polarization [START_REF] Bernier | Comparative study of material parameter extraction using terahertz time-domain spectroscopy in transmission and in reflection[END_REF]: to extract precisely n and . In addition, this later processing suffers from miscellaneous experimental conditions [START_REF] Bernier | Determining the complex refractive index of materials in the farinfrared from terahertz time-domain data[END_REF][START_REF] Naftaly | Metrology issues and solutions in THz time-domain spectroscopy: Noise, errors, calibration‖[END_REF] that could lead to erroneous images, unless they are considered or corrected by sophisticated and timeconsuming algorithms [START_REF] Bernier | Accurate characterization of resonant samples in the terahertz regime through a technique combining timedomain spectroscopy and Kramers-Kronig analysis‖[END_REF][START_REF] Bernier | Precise determination of the refractive index of samples showing low transmission bands by THz time-domain spectroscopy‖[END_REF]. For the sake of speed, simplicity and reliability, all of which are mandatory for reliable identification of library of materials for industrial applications, we propose an empirical imaging method based on the peak-to-peak amplitude measurement of the reflected THz waveforms, associated with a simple correction algorithm. 

R

Samples under test and experimental setup description

Sample materials such as glucose, maltose and polyethylene were studied in the experiment; we used -compressed‖ powder materials in order to get flat-face plain pellets. The pellets were fabricated using a 13mm diameter mold and a pressure of 10 tons. For the sample preparation, maltose and glucose powder were weighed on an electronic scale (100, 200, 300, 400, 500, and 600mg), to get six flat-face plain tablets with different thicknesses.

The THz images were obtained using a Teraflash pro THz-TDS system, developed by the TOPTICA company. We used the system in a reflection configuration at a non-normal incidence (incident angle of 8°), that provides a useful spectrum from 0.1 THz up to 3 THz. For the reference measurement, we used a stainless-steel plate that completely reflects the THz signal and that also serves as a holder to put the samples in. We chose a 70 picosecond measurement time window in order to be able to measure sample pellets with thicknesses up to 3 mm with sufficient signal to noise ratio. This way, we record the main reflected THz pulse as well as the first echo induced by the sample. The image of a 13 mm diameter sample contains 530 pixels. For each pixel, we measure the temporal shape of the THz pulse that contains all the spectral information of the material. The distance between 2 pixels corresponds to a sample shift of 0.5 mm. An algorithm written with MATLAB is used to ease the process on matrix calculations and data visualization and to plot the images. We can see on these bare THz images (lower figure), i.e. with no correction applied, that the measured amplitudes differ when the sample thickness varies (the blue color representing the amplitude values is not the same from one sample to the other). This result is not coherent as all the samples are made of pure maltose. The sample's refractive indexes are therefore the same, and according to equation (1), the reflected THz amplitude should be the same for all pellets. By taking a closer look at the time domain graph for only one pixel of the image (see Figure 2), we can see some interesting results. It is interesting to note that since the first pulse does not enter in the sample, the time shift of the first pulse observed for the different samples is only due to the different position of their upper surfaces h, i.e. to their thicknesses difference; the thicker the sample, the sooner the pulse arrives. Therefore, if we consider as reference the position of the metallic plate, h=d where d is the unknown thickness of a sample that can be written as:

Results and Discussion

Impacts of thickness on amplitude signals

∆ℎ = 𝑑 = c 2 𝑛 𝑎𝑖𝑟 cos 𝜃 𝑎𝑖𝑟 Δ𝑡 (2)
Where Δtis the delay between reflected peak pulse (region A) and the one used as reference, c the speed of the light, n air the refractive index of air (n air =1) and  air the incident angle.

In our case, this angle is fixed by the commercial system we used ( air = 8°).

Using this -optical‖method, we evaluated the thicknesses of various pellets made of different materials (maltose, glucose and HDPE) and different material powder quantities, and we compared with micrometer measurements as a classical reference method (see figure 4). A very good agreement is obtained between the thicknesses calculated from the THz pulse reflection measurements (dots) using equation ( 2), and mechanically measured (dashed lines), regardless of the material used to fabricate the pellet.

Figure 4:

Comparison of samples thicknesses measured with palmer micrometer system (dashed lines) and evaluated using reflected THz pulses measurements (dots).

Thus, the thickness of a pellet can be easily calculated for each pixel in the image in order to plot the thicknesses image of each sample (see figure 5). We can notice that this method does not depend on the material used to make the pellet as the THz signal is reflected at the top surface of the samples and does not propagate inside the sample. Thus, the signal peak position only depends on the sample thickness, as long as the material that constitutes the sample does not exhibit too much dispersion. Similar results have been obtained from the other samples made of glucose and polyethylene.

However, the time domain graph (Fig. 2) also shows a decrease in the amplitude of the peaks in the region A. Such a phenomenon would be expected if the refractive index of the material in the pellet changes, as predicted by equation ( 1). This is not the case here as all the tablets are made of pure maltose. One explanation could be related to a shift and/ or a change in size of the reflected beam on the receiver. In such cases, the receiver response would be affected and the measured reflected signal would vary depending on the thickness of the sample.

Indeed, when the THz pulse probes the sample under a given incident angle, the measured reflected signal will be delayed as explained previously but also a laterally shifted (x in Fig. 3) in comparison to the reference peak measurement, for which the reflected beam is fully centered at the surface of the receiver. According to figure 3,we can note that if the sample is probed under normal incidence  i = 0° and Δx=0.

However, for the sake of simplicityof the optical setup, most of the available commercial THz imaging systems are using non-normal incidence experimental configuration in reflection. Moreover, imaging systems require focused THz beam (to get the smallest spatial resolution as possible) that can induce artefact of the same type when the reflection height varies, because of beam defocusing.

For these reasons, it is thus necessary to analyze and correct this geometrical issue created by a non-normal incidence and/or focused THz beam. The correction procedure is described in the following section.

Correction procedure and algorithm

Taking these undesired effectsinto account, the peak-to-peak amplitude E THz of the reflected THz pulse is governed by the modulus of the Fresnel reflection coefficient (eq. 1). Onone hand, this depends only on the refractive index of the material that constitutes the sample under test, and on the other hand, by an error function f induced by the spatial shift x and the defocusing of the reflected beam as previously described(equation 3): Finally, this correction process of the THz reflected amplitude has been applied on all the pulses corresponding to all the pixels of each image (Figure 10 b). Such a method can then be applied to verify the homogeneity of a sample or the presence of a sample with different composition, by using THz reflection. Indeed, as the THz reflected amplitude is directly linked to the refractive index of the material of the sample (equation 1), it can be used after correction, as a direct and reliable criterion to detect a change of composition of a given sample compared to a reference one.

𝐸 𝑇𝐻𝑧 𝑚𝑒𝑎𝑠 = 𝑅 × 𝑓 × 𝐸 𝑇𝐻𝑧 0 , (3)

Conclusion

The thickness measurement of chemical compound pellets can be directly achieved by using the Terahertz time-domain spectroscopy experiment in a reflection configuration.

Because of some artefacts induced by the variation of sample thicknesses (beam shift and defocusing effect), it becomes necessary to correct the bare results by a correction function, which depends on the THz system used and that can be empirically estimated through a calibration step. We validate this method on different material pellets (maltose, glucose, polyethylene) for which the impact of such artefacts have been decreased by a factor 10. One can easily apply this method to i) extract the sample thickness without any contact with the sample, and ii) compare samples showing different topology. This also leads to saving a lot of time because no particular sample preparation is needed. The future work will include a large variety of materials and will be used to create a database of the targeted chemicals for future materials, mixture identification. In addition, in order to better discriminate chemical products, a similar approach will be performed in the frequency domain that would allow to obtain better performance, for example, on material exhibiting specific signatures in the THz frequency range.

  𝜃 𝑖 = 𝑛 2 -sin 2 𝜃 𝑖 -cos 𝜃 𝑖 𝑛 2 -sin 2 𝜃 𝑖 +cos 𝜃 𝑖 (1) Regardless of the experimental configuration (transmission or reflection), imaging the optical properties of samples in the spectral domain requires time-consuming pre-processing (FFT of the waveforms for each pixel), and post-processing Volume 12 Issue 9, September 2023 www.ijsr.net Licensed Under Creative Commons Attribution CC BY

Fig. 1

 1 Fig. 1 shows images of 6 pellets made of pure maltose, based on the measurement of the THz reflected signal amplitude. As can be seen on the upper part of the figure,each pellet has a different thickness.

Figure 1 :

 1 Figure 1: Pure maltose pellets with different thicknesses (upper figure) and the corresponding images base on the reflected THz signal amplitude (lower figure).

Figure 2 :Figure 3 :

 23 Figure 2: Amplitude of the THz time domain signals reflected on maltose pellets with different thicknesses and the reference signal (arrow).The time domain signatures of each sample, exhibit two pulses (regions A and B on Fig.2), as schematically illustrated in Fig.3. The first one (region A) corresponds to the reflection at the upper surface of the sample under testing. This pulse does not penetrate the sample and the time flight of the THz pulse is shortened as the sample gets thicker: this reflected signal appears earlier than for the reference signal.The second one (region B) corresponds to the reflection at the back side of the pellet, after the THz pulse has passed through the sample twice. As the THz wave travels slower in the material than in the air, the pulse appears later than the reference one.We can notice that such a phenomenon is at the origin of multiple inner reflections (echoes) that would appear in the waveform (theoretically an infinity of echoes), but the chosen 70 ps measurement time window only allows us to record the first two pulses regarding sample thickness i.e. the pulse reflected at the upper surface and the first echo.

Figure 5 :

 5 Figure 5: Thickness mapping of the 6 maltose samples, obtained from the first reflected pulse.

Volume 12 Issue 9 ,

 9 September 2023 www.ijsr.net Licensed Under Creative Commons Attribution CC BY perfectly parallel faces), its orientation on the metallic plate holder etc.

Figure 9 :

 9 Figure 9: Corrected amplitude of the measured THz pulses for maltose pellets (red) compare to bare results (blue).

Figure 10 :

 10 Figure 10: Non-corrected (a) and corrected (b) amplitude map of the 6 maltose samples. By comparing Fig. 10.a and 10.b, we can see that the decreasing of the amplitude variation induced by the THz beam misalignment tends to homogenize the color of the different images, as expected for samples made of the same material.

Paper ID: SR23704151849 DOI: 10.21275/SR23704151849

Acknowledgements

The authors thank the CNRS (National Center for Scientific Research, France). All the THz measurement have been performed on the characterization platform PLATERA (https://www.platera.tech/). Funding NATO Science for peace (GS-5973).

where 𝐸 𝑇𝐻𝑧 𝑚𝑒𝑎𝑠 , 𝐸 𝑇𝐻𝑧 0 , are the peak-to-peak amplitude of the reflected and incident THz pulse respectively, |R| the modulus of the complex reflection coefficient, and f the error function induced by the misalignment and defocusing effects. To quantify the dreadful effect of the error function f, a calibration step is performed; for that the sample is removed and only the sample holder remains. As this holder is made of stainless steel, the THz pulse is totally reflected (|R|=1), and the pulse 2 (region B in Fig. 2) disappears. By changing the vertical position of the reference metallic plate, the reflected pulse is temporally delayed (t) and its amplitude varies due to i) the lateral shift (misalignment) and ii) defocusing of the reflected THz beam detected (see Fig. 6). On Fig. 7, we clearly illustrate this effect, by measuring the corresponding THz signal for two positions of the metallic plate, from both side of the reference one (in green). Thus, if the plate is moved above the reference level by using a translation stage, the time delay becomes shorter than the reference value. Whereas it is the opposite when the mirror is moved below the reference position. Meanwhile, the parallel shift ∆𝑥 on the receiver is given by:

In our case, for the samples with the largest thickness (5 mm), this shift can reach 1.4 mm. The effect of such shift, and/or a beam defocusing is not very easy to predict theoretically, as it depends for example on the THz beam path in the optical system, on the THz beam interaction with the active area of the detector, etc. For that reason, we carefully and quantitatively investigated these effects on the THz pulse amplitude by varying the height of the stainless-steel holder. Fig. 8 represents the amplitude variation measured for the different heights of the reference plate (dots). As expected, the maximum amplitude is obtained at the reference position, whereas it decreases continuously when one deviates from it.

The error function f is then obtained by fitting the experimental results with a second order polynomial function (dashed curve in figure 8) relating to the equation below:

𝑓 = -8 × 10 -4 ∆𝑡 2 + 1.2 × 10 -3 ∆𝑡 + 1

(5)

Corrected amplitude and image

Equation ( 5) has then been used to correct the bare amplitude measurements (Fig. 2) obtained on the samples with different thicknesses. Fig. 9 shows the corrected results for the maltose tablets. We can see that the varying values of the peak amplitude has been greatly decreased compared to region A of Fig. 2. After correction, the THz pulse amplitude keeps roughly constant with a variation of the order of 3% at most, against 30% before correction, if we exclude the results obtained from the thickest sample. For the thicker pellet, the corrected result is not in agreement with the others, whereas the correction function keeps being valid for these ranges of thicknesses (see Fig. 8). Such artefacts can originate from the sample geometry (not Paper ID: SR23704151849 DOI: 10.21275/SR23704151849

Competing interest

There are no conflicts to declare.