Think2Type: Thoughts to Text using EEG Waves

—Visually impaired and differently abled people who can’t use their hands have to depend on a helper when they wish to use a computer or a smartphone and they wish to enter any data. Depending on someone also causes privacy and security threats as all information including confidential information like passwords,etc also have to be shared so that the helper can write the data into the device. Think2Type is a BCI solution which will translate a user's active intent to text represented by morse code. BCI or ‘Brain Computer Interface’ is a technology that enables its users to interact with computers by means of brain-activity only, this activity being generally measured by ElectroEncephaloGraphy (EEG). Our solution helps them to be more independent as they merely have to think about the characters in the password and use active intent to enter them. The intents correspond to 'dot' and 'dash' of Morse code representation of alpha numerics. It will be converted to the corresponding text and provide them with complete confidentiality.


INTRODUCTION
Thoughts to Text using BCI (Brain-Computer Interface) is a relatively new and emerging field. The electroencephalogram (EEG) is the depiction of the electrical activity occurring at the surface of the brain. This activity appears as EEG waveforms of varying frequency and amplitude measured in voltage (specifically microvoltages).
When a person thinks about something, voltage fluctuations are generated, resulting from ionic current within the neurons of the brain. These EEG signals typically occur in microvolts and can be measured from various spots on the head, in a non -invasive manner.
The difficult question is to differentiate between the "brain activity" of different alphabets as our brain perceives words as phonetics and not alphabetically. To counter that problem we are using morse code to digitize the data. So now instead of thinking about an "a",the user needs to think of the morse code of 'a'.
We take input in the form of EEG signals, denoise it both in the hardware and the software.
The processed signal is analysed using a deep learning model which is explained further. This model understands the latent features of these signals and classifies them as a series of zeros and ones. This series is Morse code representation of the character which the person wishes to enter. Thus alphanumeric text is obtained from EEG signals after decoding this morse code .

International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181 http://www.ijert.org Block Diagram of the system . Uniqueness: Brain wave activities of alphabet characters are very similar and recognition and classification is a very difficult task. Our Idea is quite unique as there were no papers / patents / articles which had a direct implementation of our idea for this problem.

B. Background:
According to W.H.O, there are around 39 million blind and 285 million visually impaired people [4]. A majority of them are from India, That is India currently has around 12 million blind people which makes India home to one-third of the world's blind population. When such people want to use a computer or a smartphone, they have to rely on their caretakers to enter all data which is required by the applications. It is more problematic when it is sensitive information like passwords and bank details as issues of trust and security come into play.
Our solution is a Brain-Computer Interface(BCI) which will read the subject's active intent in the form of EEG signals and then convert it into alphanumeric data which will be entered in the required text fields . This will be used by differently-abled people to enter sensitive information in devices.

C. Connection:
In order to input the active intent of the user, he will think about moving his left arm for zero and right arm for one and both the arms for '/' or space. Thus he will input the morse code [6] of the intended text. This will be captured, using electrodes and thus obtained by the hardware. Denoising filters will be applied to it along with analog to digital converters. This will be passed to the Deep Learning model. Latent features will be extracted by the model which will be used to classify the signals into a series of ones, zeros and slashes or spaces. This will be the inputted morse code.The last step will be decoding the morse code into alphanumeric text and sending it to the intended place.

D. Goal of the work:
The main aim of our product is to help them become more independent, enabling them to live a fuller and more secure life. By using our device they can keep their confidential details to themselves without the risk of anyone misusing them. Though this solution is designed for people with impairments, it can be used by anyone who wishes for confidentiality of their data.

II. LITERATURE SURVEY
As stated in papers [1] , [2], [3] , [5] and [6] , Deep Feature engineering is a proven method for processing brain waves as many researchers have tried and tested neural network approach to classification of EEG waves.
And further studies in [1] , [3] , and [4] show that Motor Imagery produces brain waves which can be generalized and hence a deep learning model can be trained upon the signals corresponding to imagined motor movements. Also due to the miniscule differences and diversity in the thoughts of different subjects, EEG waves of alphabets, Brain wave activities corresponding to alphabet characters cannot be recognized or classified from signals obtained by non-invasive means with current progress in the field.

III.
IMPLEMENTATION STRATEGY: The modular diagram describes the journey of the thoughts of the user in the form of user intent to characters which will appear in the input field. The EEG waves captured from the user via electrodes will be sent to the hardware kit where the signal will undergo analog to digital conversion and . This is further passed on to a morse code to text converter, and the output of which is passed on to the input field.
Input Data: EEG waves will be collected from the subjects using the hardware. This includes the process of capturing the intent of the individual in terms of morse code. A band will be worn by the end user. We are using a velcro band which will be worn around the forehead. The user will think about the input text in the form of its morse code. For Eg. if 'password' is the word the user wants to enter in the given field securely, he will have to think about the morse code of the word, and thus think '0110/01/000/000/011/111/010/100'. In order to enter a zero, the user will think about moving the left arm, for a one, right hand and both the hands together for a '/' or a space. Three electrodes will be attached to the band which will capture the EEG waves.Thus we will have three channel-data which will be forwarded to the hardware kit.

F. Integration:
The intent of the user will be captured via EEG waves which will be sent to the hardware. The software part of the project is a python desktop application with a deep learning model built using Keras and Tensorflow. major part of our dataset. This data set consists of over 1500 one-and two-minute EEG recordings, obtained from 109 volunteers. Subjects performed different motor/imagery tasks while 64-channel EEG were recorded using the BCI2000 system 2 . Each subject performed 14 experimental runs: two one-minute baseline runs (one with eyes open, one with eyes closed), and three two-minute runs of each of the tasks described on their website 1 .
The data was available in the EDF format. We created our own data set for training of the model which was a mixture of both, the one described above and other collected by us using the NeuroSky MindWave Mobile 2 kit 3 . We extracted and transformed data such that we finally have 3 labels to train our model on. We input the eeg signals of a particular character to the function 'run' which runs through the entire pipeline and verifies if the model correctly interpreted its waveform and gave back the same result. In the given scenario, the EEG wave form of 'h' is inputted to the model and it returns the same letter after decoding it.

Case 2:
We input a text phrase to the function 'phrase' which converts that text to its morse code, and inputs the wave forms, corresponding to the characters, to the model. It then receives the morse code output and decodes it to alphanumeric text which is outputted. The phrase entered, must be the output phrase.    Fig. ) we can infer that the learning rate is appropriate and there is no problem of either variance or bias. Hence we can say that the model neither overfits the training data nor underfits it. Classification of every class is done unbiased.

VI. CONCLUSION AND FUTURE SCOPE
For the general population to be able to use Think2Type, the cost effectiveness of the product can be improved. The device can be made more portable and hassle free to use, by making the design more compact. Wired connections can be replaced with a wireless connection like Bluetooth. The GUI of the software can be improved and it can be made easy to use for everyone.
With the little step of users, learning the morse code and adapting to the methodology used, the problem of entering sensitive data especially for visually impared and other differently abled people and the fantasy of typing what you think can be achieved.