Motor Imagery Multi-Tasks Classification for BCIs Using the NVIDIA Jetson TX2 Board and the EEGNet Network

Nowadays, Brain–Computer Interfaces (BCIs) still captivate large interest because of multiple advantages offered in numerous domains, explicitly assisting people with motor disabilities in communicating with the surrounding environment. However, challenges of portability, instantaneous processing time, and accurate data processing remain for numerous BCI system setups. This work implements an embedded multi-tasks classifier based on motor imagery using the EEGNet network integrated into the NVIDIA Jetson TX2 card. Therefore, two strategies are developed to select the most discriminant channels. The former uses the accuracy based-classifier criterion, while the latter evaluates electrode mutual information to form discriminant channel subsets. Next, the EEGNet network is implemented to classify discriminant channel signals. Additionally, a cyclic learning algorithm is implemented at the software level to accelerate the model learning convergence and fully profit from the NJT2 hardware resources. Finally, motor imagery Electroencephalogram (EEG) signals provided by HaLT’s public benchmark were used, in addition to the k-fold cross-validation method. Average accuracies of 83.7% and 81.3% were achieved by classifying EEG signals per subject and motor imagery task, respectively. Each task was processed with an average latency of 48.7 ms. This framework offers an alternative for online EEG-BCI systems’ requirements, dealing with short processing times and reliable classification accuracy.


Introduction
Applications based on Brain-Computer Interfaces (BCI) are numerous in the recent literature due to their benefits in various domains [1]. Typically, BCI systems use brain signals to allow effective communication between a given user and local surroundings. BCI-based electroencephalographic signals (EEG) are the most implemented because of recent advances in brain electrical functioning studies and reliable technologies [2,3]. Such EEG signals were used by Fraiwan et al. [4] to evaluate the subjects' enjoyment and visual interest in experiencing museum expositions. For instance, BCI-based EEG signals are used in biomedical applications for mental and cognitive disease diagnoses and rehabilitation [5,6]. Lastly, Hekmatmanesh et al. [7] proposed a systematic review of and right legs. In the first step, the Accuracy Rating-based Classifier method (ARbC) and Channels Mutual Information-based Approach (CMIbA) are developed to make up discriminant channel subsets. Next, MI signals from discriminant channels are processed to be classified into the six aforementioned classes using the EEGNet network.
The main contributions of this paper are summarized as follows, 1. Results comparison of channel selection between the ARbC method and CMIbA. 2. Reliable accuracy results of the tongue, passive, left and right hands, and left and right legs MI tasks classification. 3. Processing time reduction using the NJT2 platform resources. 4. Convergence acceleration of the learning process implementing the Cyclic Learning Rate (CLR) algorithm.
In sum, this work deals with processing time reduction and reliable classification accuracy for embedded EEG BCI-based applications.

Related Works
In the recent literature on embedded BCIs (EBCI) based on MI-EEG signals, numerous works dealing with brief processing time and high classification accuracy have been proposed [30,31]. Embedded platform-based BCI designs aim to build low-cost and low-power consumption systems, meeting user adaptability and dedicating available resources to application-specific functions. Belwafi et al. [23] proposed a review of EBCI systems focusing on pathological disorders, functional substitution, and most implemented architectures. Despite recent advances in embedding computational architectures design, they reported a few of the EBCI systems presented in the related literature.
Generally, the central processing unit of the EBCI is ported by a microprocessor or microcontroller integrated into FPGA cards, Arduino boards, Nvidia's developer cards, or specifically dedicated platforms. In this sense, Ma et al. [32] implemented a classifier-based convolutional neural network into a Xilinx FPGA platform to classify MI-EEG signals. Comparatively, implementing the same model on a portable computer equipped with the NVIDIA GeForce GTX1070 i7-7700 resources, the configured FPGA was revealed to be eight times faster than the PC, achieving an average classification accuracy of over 80%. Lately, EBCI systems-based EEG classifiers have been implemented into the NJT2 board, taking advantage of the NVIDIA ® Jetson™ board deployment [33]. In fact, Khatwani et al. [34] implemented a convolutional neural network model into Artix-7 FPGA and NJT2 platforms to detect artifacts carried in EEG signals of multiple channels. Based on the basic ICA algorithm, their method achieved an average accuracy of 74 %, detecting seven different artifact types using 64 EEG channels. In another recent framework [35], convolutional stacked auto-encoder and convolutional long short-term memory models were proposed to classify MI-EEG signals for drone control using the NJT2 board. A latency time of 10 ms was reported for generating drone navigation commands based on left-hand and right-hand imagined movement. Similarly, Ascari et al. [36] implemented a networked nodes modular architecture hosted on the NJT2 platform for outdoor portability. The average accuracy of 50% was achieved based on the subject-specific classification processing EEG signals from Cz, Pz, and {Cz, Pz} channels with an average offset between streams of 0 ± 0 ms.
On the other hand, the EEGNet has been implemented more frequently on FPGA boards than on other platforms for EBCI-based EEG signals in the recent literature [37]. Moreover, Hernandez-Ruiz et al. [38] implemented an EEGNet-based architecture into an FPGA board to classify MI-EEG signals, achieving accuracies of 83.15%, 75.74%, and 65.75% for the defined tasks. Lately, Enériz et al. [39] utilized the Xilinx Zynq FPGA to set up a real-time EEGNet-based BCI. Table 1 summarizes the recent state-of-the-art focused on related works.  [35] NJT2 BCI competition IV 3 9-10 ms Ascari et al. [36] NJT2 Own 2 0 ± 0 ms Finally, regarding the recent literature based on HaLT's dataset [40], Yan et al. [41] used the referred public dataset to improve classification accuracy by designing an attention mechanism and global features aggregation based on deep learning. They reported an average accuracy of 76.7% for classifying EEG signals of twelve subjects with the EEGNet network. In another work, Keerthi Krishnan and Soman [42] proposed a variational mode-decomposed EEG-spectrum image model for MI classification using the dataset provided by [40]. Their work achieved an average accuracy of 90.2 ± 4.34% with the EEGNet network converting EEG signals from C3, Cz, and C4 channels into spectrum images by using the variational mode decomposition (VMD) and the short-time Fourier transform (STFT). Likewise, a generative adversarial network (GAN) was proposed by An et al. [43] to denoise MI-EEG signals using the same dataset. Lately, the EEGNet network has been implemented to classify MI-EEG signal-based BCI utilizing HaLT's benchmark [44]. An average classification accuracy of 80.9 ± 8.6% was achieved by classifying EEG signals from eight channels. In sum, taking advantage of more than five BCI interaction paradigms, Kaya's dataset offers a wide range of BCI implementation possibilities to the related literature. Table 2 presents Kaya's experiment's data organization related to six mental imagery tasks. The referred BCI interaction paradigm contemplates 6 MI tasks executed by 12 subjects, each with a determined number of sessions. Table 2. Summary of BCI interaction paradigm data related to six mental imagery tasks, as presented in [40].

Materials and Methods
The method developed in this work addresses the practical challenge of multi-class classification and expedited processing of EEG signals on dedicated platforms using the NJT2 development board and the artificial neural network EEGNet. All developed processing algorithms are integrated directly into the NJT2 embedded platform to exploit hardware resources. Figure 1 presents the high-level general diagram of the proposed method. Two main steps are developed to process MI-EEG signals. The first one aims to select discriminant channels employing two approaches (ARbC and CMIbA), while the second implements the EEGNet network to classify discriminant channel features. The ARbC approach also utilizes the EEGNet architecture but with parameters adapted to single-channel signals.  [40]. The red rectangle centered on the circle refers to "Passive" and moves according to the subject's MI task. The first step consists of selecting discriminant channels from the 19 provided. Next, two comparative methods are used: the ARbC method and the CMIbA. Therefore, the EEGNet network classifies the feature signals into six classes to give the output.

Referred Public Dataset
The dataset published in [40] was used to implement the proposed method. Explicitly, this work used EEG data provided by the BCI interaction paradigm related to six mental imagery states. On a Graphical User Interface (eGUI), a fixation point considered the neutral starting point for tasks was presented to experiment participants. Each trial began with an action signal to imagine movements of the right and left hands, closing and opening the respective fist once, movements of the right and left leg briefly, and movements of the tongue or a circle as a passive response for 1.0 s. For example, the tongue MI task was interpreted as the imaginative pronunciation of a distinct letter as "el". At the same time, participants did not engage in any voluntary mental imagery until the subsequent trial began for the passive state. These visual stimuli were presented on the eGUI once to the participants in each trial and in sequential order, as presented in Table 3. Table 3. The BCI interaction segment for imagining limbs motion, following the eGUI's visual stimuli.
A total of 29 recording sessions were performed by seven males and five females aged between 20 and 35 who were declared healthy for the experiment. Each session contains a sequence of BCI interaction segments recorded with a break of 2.0 min, and each trial requires an average of 3.0 s. Accordingly, this BCI interaction contains 87 interaction segments for all 29 sessions in the referred dataset.
MI-EEG signals were recorded using the EEG-1200 JE-921A standard medical equipment. A total of 19 EEG channels placed according to the standard 10-20 electrodes placement system (see Figure 2) provided the benchmark EEG signals. . Channels' spatial location on the skull in making the referred dataset. According to the 10-20 system, uppercase letters define the brain cortex where an electrode is placed. F for Frontal, T for temporal, P for parietal, and O for occipital cortex. The lowercase "z" is utilized to locate electrodes on the skull's longitudinal axis. A1 and A2 mean left and right reference voltage electrodes, respectively.
The Neurofax software was used to record data at 200 Hz, and hardware pass-band filters of 0.53-70 Hz were applied to all recorded EEG signals. It is worth mentioning that the EEG-1200 equipment integrates a hardware notch filter at 50 or 60 Hz to isolate EEG signals from electrical grid interference. Figure 3 presents the experimental paradigm's data acquisition and processing overview.

MI -EEG
Neurofax ASCII File Offline Analysis Neurofax DB eGUI Figure 3. Overview of the EEG acquisition and processing in the experimental paradigm. The red rectangle on the eGUI moves over the specific limb icon as a visual stimulus to engage the respective mental task of imagined movement. MI-EEG signals from six mental states were recorded by EEG-1200 equipment and processed using Neurofax recording software [40]. In addition, ASCII data were converted into Matlab files for further processing.

NVIDIA Jetson TX2 Embedded Board
The NJT2 is a power-efficient embedded computing device mainly designed for artificial intelligence applications. Building around an NVIDIA Pascal TM -family GPU with 8 GB and 59.7 GB/s of memory and bandwidth, respectively, this supercomputer on a module integrates a wide range of standard hardware interfaces. It is also considered a fast and power-efficient platform for robust data applications; the NJT2 card has been used successfully in recent research [34][35][36].
The NVIDIA SDK manager based on Ubuntu is the operating system used on the NJT2 card, accessible from [45]. After installing the operating system, a host computer must load the modules into a Micro-SD card following the steps provided in [46]. Once the Jetson software with the SDK Manager is installed, the NJT2 card is ready to be used as an embedded computer. Additionally, the specific libraries are installed according to the application requirements. Table 4 summarizes the main characteristics of the NJT2 card used to implement the present project, according to the serial number provided.

The EEGNet Network Architecture
EEGNet is a compact convolutional network proposed by Vernon et al. [26]. It demonstrated its effectiveness in processing EEG signals for BCI-based systems, considering the numerous related works [47][48][49]. Three convolutional layers are configured in the EEGNet. EEG raw data are first convolved in the temporal layer (Part a) using frequency filters, as shown in Figure 4.  . The encapsulated EEGNet structure. EEG signals were organized by subject, channel, and sample length. This data matrix was expanded to four dimensions fulfilling the EEGNet input matrix dimension. In Part (a), temporal features are extracted by Conv2D, and in Part (b), spatial filters are applied to enhance feature maps. Then, feature maps are combined in Separable Conv2D (Part (c)), providing the output class probability (Part (d)).
Next, EEG feature maps extracted from the temporal convolutional layer (Part (a)) serve as input for the depthwise convolutional layer (Part (b)), where frequency-specific spatial filters are applied to each feature map. Finally, the separable convolution layer (Part (c)) combines the depthwise and pointwise convolutions of feature maps, both individually and together, to provide an optimal classification (Part (d)). The depthwise and separable convolution layers are activated by the Exponential Linear Unit (ELU) function, defined by while the output dense layer uses the Softmax activation function, to predict the output probability of sequence x i to be classified in class N. Therefore, Equation (2) is considered a normalized probability distribution of output feature sequences.
Consequently, an important key for implementing EEGNet is the number of filters for each layer and the kernels' length. Table 5 shows the EEGNet's input parameters.

Data Processing
Subjects and channels provide EEG data from the referred benchmark. The number of samples was set to 170, corresponding to the duration of 0.85 s per task, remembering that dataset signals were recorded at 200 Hz. This allowed the removal of artifacts at the beginning and the end of each task signal. Therefore, the first signal processing step consists of channel discrimination to constitute contributing channel subsets. Two strategies were implemented to select the discriminant channels among the 19 provided. The ARbC approach uses the EEGNet network to classify signals of each channel, aiming to constitute the subset of six and eight channels with higher classification accuracy. In contrast, CMIbA utilizes the channels' mutual information to evaluate how different the cross-entropy measurement value is. The channel selection by the above-mentioned methods was made on the mixed signals of all 12 subjects, i.e., considering signals of the whole dataset. In fact, the constituted discriminant channel subsets can be more suitable for any subject considered separately and be served for the subjects' performance comparison purposes.
Thus, the ARbC method aims to increase the amount of useful training data allowing the neural network to learn more discriminating features. In fact, the proposed software-level approach uses a group-utility metric-based channel selection strategy to improve classification accuracy [50,51]. Hence, the EEGNet network was configured by setting temporal filters (F1), pointwise filters (F2), and spatial filters (D) to four. This EEGNet filter value choice was made according to preliminary training tests to find the classifier's optimal configuration according to data features. The model was compiled with the categorical cross-entropy loss function, and the Nadam optimizer was set to 0.001. The network was trained with 2000 epochs, with a batch size of 330, using 10-fold cross-validation. Consequently, two subsets of six and eight discriminant channels were formed.
According to information theory, the mutual information between two random variables σ and ρ is given by where K represents the complexity of information carried by each variable. In the case of probabilistic variables, (3) can be written as where H is the self-information entropy. Based on the assumption that independent random variables should not share mutual information, Kullback-Leibler Divergence (KLD) was used to assess how far a joint distribution of channel signals is from the distribution of their products.
Let P and Q be two probability distributions on the finite channel set S = [1, i, · · · , j, · · · , 19], clustering channels signals of the nth subject. KLD, or the relative entropy between P and Q, is given by where P(a) is the occurrence probability of the ath datum. Therefore, mutual information is found evaluating the KLD as, where P(S i ) and P(S j ) represent signal distributions of channels i and j, respectively, and P(S i , S j ) is a joint distribution. Equation (6) was computed by considering a given channel and its neighbors, two by two, then by pair grouping, based on channel individual distribution to obtain the discriminating channels subset.
• If S i = S j , where H is the self-entropy distribution. Entropy values of two-by-two channel combinations are calculated, that is, the entropy of 171 combinations considering 19 channels. Next, channel combinations with entropy values different from zero are combined with the remaining channels to constitute discriminating channel groups. This process is repeated until a group of n channels with the same self-entropy distribution is constituted. Finally, the Discriminant Channel Subset (DCS) is constituted as follows, where n is the nth discriminant channel for all subjects' signals.
In the next stage, signals of discriminant channel subsets were processed by configuring the EEGNet with new parameters in Keras and TensorFlow, as shown in Table 6. New parameter configuration changes took into account the number of channels, the optimization of hyperparameters, and the learning acceleration at the software level.
EEG data were arranged as a four-dimension tensor to meet the EEGNet's input dimension [26], receiving the number of samples, the number of channels, the length of the sample, and the unitary position by the input layer. Parameter k in Table 6 refers to the number of channels, taking a value of six or eight depending on the channel discriminant set. The proposed architecture was configured with four temporal filters (F1) in the Conv2D convolutional layer, using 16 parameters for k set to six or eight. After the batch normalization, the Depthwise Conv2D layer activated by the ELU function uses 96 or 128 parameters depending on the discriminating set to learn spatial filters in the temporal convolution, setting the number of spatial filters (D) to 4. For its part, the separable Conv2D layer was configured with 16 pointwise filters (F2), and 512 parameters were used to learn within each kernel length. Both EEGNet configurations for the channel selection and processing steps were compiled and trained into the NJT2 board using a batch size of 330, a categorical cross-entropy loss function, and the Nadam optimizer set to 0.0001. The CLR algorithm with a triangular window was also set between 10 −6 and 5 × 10 −2 to accelerate the learning process by training the EEGNet model with a low number of epochs. Thus, the EEGNet model in the classification stage was trained with 1500 instead of 2000 epochs, using 10 repetitions to validate the results.

Numerical Results
The k-fold cross-validation method was used both in the channel selection and processing steps to validate the achieved results. Therefore, numerical results were obtained by setting k to 10, meaning that the dataset was repeatedly partitioned into ten subsets, where nine were used for training and one for testing each kth iteration. This validation method allows for checking that the model is efficient for different randomized inputs or for some data streams, nothing else. In the channel selection steps, for the ARbC method and CMIbA, training and test sets were formed from signals of all subjects, using nine for training and one for testing. Once the sets of discriminating channels have been constituted, the classification process is performed by exploiting the signals of each subject, taken individually. The proposed model was evaluated using the classification metric given by where TP corresponds to true positive when k features are correctly assigned to class K, TN means true negative when m features of other classes than K are unassigned to class K, and FP as false positive are all features erroneously classified into class K. Additionally, the confusion matrix metric was used to evaluate the implemented classifier performance discriminating MI tasks.

Channel Selection Results
Processing EEG signals of all subjects by channel, higher classification accuracies were obtained in the order reported in Table 7. Hence, discriminant channel subsets for all the subjects were formed by combining signals of the channel, providing higher accuracy than those of the seven remaining channels, delivering the best accuracies. In the case of P4 and O2 channel selection giving the same classification accuracy (36.7%), tests revealed reliable accuracies in adding the P4 channel to the seven discriminant channels already constituted instead of the O2 channel. Table 7. Achieved classification accuracies by implementing the ARbC approach to constitute discriminating channel sets. The highest accuracy is highlighted in blue, while the seven highest accuracies are shown in boldface.

Ref. Channel Brain Area
Accuracy (%) Meanwhile, the channel mutual information approach allowed the formation of six and eight discriminant channel subsets, as presented in Table 8. The number of discriminant channels was determined according to the algorithm proposed in [47], where 6 discriminant electrodes were chosen among the 19 available. In addition, the same subjects participated in the paradigm explored in [47] that was presented in this work, where EEG signals were recorded with the same equipment. Concisely, channel combination tests revealed reliable classification accuracy for subsets of six and eight discriminant channels.
The EEG data point distribution was explored using a t-distributed Stochastic Neighborhood Embedding approach (t-SNE) [52] to visualize data clusters according to the class labels. In the case of multi-class EEG data, t-SNE distributions help to visualize high dimensional data considering the nonlinear relationship between features and targeted classes. Therefore, Figure 5 shows the EEG data clusters after selecting six and eight discriminant channels using the ARbC method and CMIbA.
Therefore, only MI-EEG signals from discriminant channel subsets were processed to evaluate the proposed method's performance.

Results Processing Discriminant Channel Signals
From a general point of view, the results obtained by developing the ARbC method and CMIbA revealed differences considering achieved accuracies and the taxonomy of discriminant channels. The channel selection methods developed refer to whole dataset signals. Table 7 presents average accuracies using the ARbC to classify all dataset signals by channel. According to the ARbC selection algorithm, the eight high-accuracy values were obtained with Fp1, F8, Fp2, F7, P3, Cz, O1, and P4 channel signals, in this order, respectively. For its part, CMIbA allowed the forming of a discriminant channel subset by selecting P4, T6, T3, P3, F4, O2, Fp2, and Fz channels. Therefore, {Fp1,F8,Fp2,F7,P3,Cz,O1,P4} and {P4,T6,T3,P3,F4,O2,Fp2,Fz} discriminant channel subsets were constituted from the 19 provided, proceeding by the ARbC method and CMIbA. Both approaches have the Fp2, P3, and P4 channels in common, considering the subset of eight discriminant channels, while five of those are different. The difference in the taxonomy of channel subsets is explained by the particularity of metrics used by the ARbC method and CMIbA, and also by the signal spread of each channel when mixed with data from other channels.  The results of processing MI-EEG signals from the discriminant channel subset are shown in Table 8. Next, the signals of the selected channels per subject are processed; subject A performed EEG data classification, achieving 86.8% and 89.0% accuracy with the ARbC method and CMIbA, respectively. For its part, subject B achieved an accuracy of 68.0% using the ARbC method using data from eight discriminant channels, compared to 76.3% with CMIbA. For all subjects, increasing the number of discriminant channels revealed improvements in classification accuracy, except for subject K using the ARbC method. According to Table 7, adding two more discriminant channels to subject H using the ARbC method decreased the classification accuracy compared to other subjects. The same observation is made for subject J. The best accuracy was achieved by subject J combining eight discriminating channels with CMIbA (99.7%), while the lower accuracy of 53.7% was obtained using subject I, processing six channel signals. Finally, concerning the classification accuracy per MI task, Table 9 summarizes the confusion matrix average results by classifying each mental imagery task. Confusion matrices diagonal results reported in the aforementioned table represent the coincidence percentage between the predicted and the true labels for a given output data sequence.
For illustration purposes, Figure 6 presents EEG data related to the described imagined movements for subject J's Fp1 channel signals. It can be observed that signals corresponding to the passive task are relatively close to magnitude zero before classifying.

Discussions
Two EEG channel-selection methods are evaluated on how each affects the classification accuracy by increasing the number of channels, considering the same test subject and network architecture. Regarding the cerebral cortices' spatial activation and for all database signals, almost all brain areas are activated during the experience paradigm. This behavior does not mean that a particular subject would not have had a more activated cortex than others, only that channels were selected based on all subjects' signals. Further, classifying the set of signals as indicated in Table 8 was carried out illustratively to provide information on the classifier's average performance (59.3% and 55.2%). However, practically, a BCI system can exclusively be used by one subject at a time; what matters more is each subject's performance. The results demonstrate that one selection approach can be more effective than the other, depending on the EEG data provided by each subject and on the number of channels.
For subjects K and M, the ARbC method is efficient. In contrast, the CMIbA is suitable for subjects A, B, C, E, F, G, H, I, J, and L. For subjects, C, E, G, H, I, J, and M, either the ARbC method or CMIbA may be recommended depending on the number of discriminating channels. For six discriminant channels, the ARbC method is suitable, while for eight discriminant channels, the CMIbA is desirable.
Regarding classification accuracies, results achieved in this work are compared to those published in the recent related works, as presented in Table 10. In [42], a VMD mode approach to extract EEG features was implemented before using the EEGNet in the classification step. Their work also implemented a subject-dependent classification approach using the referred dataset. Comparing their results with those achieved in this work, subjects A, C, J, and L performed data classification, while the remaining subjects obtained the best results with the approach developed in [42]. This difference in the accuracy evaluation is essentially due to the implemented strategies in the preprocessing before classifying EEG signals. Lately, Yan et al. [41] proposed a similar work based on Kaya's benchmark. They reported an average accuracy of 76.79% in classifying MI-EEG signals from 19 channels. This work achieved an average accuracy of 83.7% using eight channel features. Table 10. Comparison with other state-of-the-art methods related to the Halt dataset. Sel.Ch. means selected channels, and µ is the average classification accuracy.

Works
Keerthi et al. [42] Yan et al. [ Focusing on the processing unit and the latency, another aspect targeted in this work, Table 11 presents the latency per MI task per subject. The lower average latency of 36.7 ms was obtained by subject J while classifying MI tasks; because of the low number of subject J's sessions. Therefore, Table 12 compares this framework with similar works in the recent literature. The purpose is to compare EEGNet network successful implementations on the NJT2 board with the proposed method. Khatwani et al. [34] achieved a latency inferior to 84.1 ms using 64 EEG channels to detect an artifact type. The maxima latency was evaluated at 84.1 ms classifying EEG artifacts. In this work, the average latency per task and per subject was evaluated at 48.7 ms. For their parts, Maiti et al. [35] controlled a drone generating commands with a maximum latency of 10 ms. From a particular point of view, this latency improvement is essentially due to the few channels, compared to the number of channels used in this work. In another work, Ascari et al. [36] processed EEG signals with an average latency of 0 ± 0 ms using two channels. Despite the size of the datasets used in the above-mentioned works, the number of channels used is a determinant factor in evaluating the latency per MI task. Therefore, this framework uses robust EEG data provided by twelve subjects in comparison to the mentioned works. Each MI task needed 48.7 ms to be classified, processing signals from eight discriminant channels. Only 7.6% of the proposed method's NJT2 resources were used.

Conclusions
This work developed a multi-class classification of MI-EEG signals for BCI systems, implementing EEGNet on the NJT2 platform. Prior to processing signals, two channel -selection approaches were used to determine the discriminant channel subsets, the ARbC approach, and CMIbA. Since discriminant channel subsets were made up, the EEGNet classified MI-EEG signals into six classes. The results obtained prove the classification accuracy improvement using the two proposed channel selection approaches. Increasing the number of channels allowed one approach to achieve more reliable accuracies than the other approach, depending on the subject data. Processing acceleration strategies implemented by utilizing the NJT2 platform resources and the CLR algorithm allowed for dealing with the processing time challenge. The highest classification accuracy of 99.7% was achieved with subject J's signals, processing data with a latency of 36.7 ms per task. The successful carrying out of the classifier presented in this work is offered as an alternative for the embedded BCI system's development. However, based on the approaches developed in this work, increasing the number of discriminating channels beyond eight tends to decrease the classification accuracy. In future work, we expect to control an electric car using the results achieved in this work. Moving forward, backward, turning right and left, neutral, and accelerating are the expected tasks to be performed. The framework's source codes are available from 1 January 2023, on GitHub https://github. com/Tatyvelu/Motor-Imagery-Multi-Tasks-Classification-for-BCIs-Using-the-Jetson-TX2 -board-and-a-Modified-EEGNet-A.  Acknowledgments: The authors would like to thank Institut Supérieur Pédagogique Technique de Kinshasa and Institut Supérieur Pédagogique de Kikwit for their valuable contributions to this research.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of this study; in the collection, analyses, or data interpretation; in the manuscript writing, or in the decision to publish the results.