Alzheimer and frontotemporal dementia diagnostic device based on electroencephalogram
By optimizing EEG signal analysis using deep learning technology, transforming and expanding images using the MNE library, and combining it with a PyTorch neural network model, the accuracy and cost issues of existing EEG diagnostic methods have been resolved, achieving efficient and accurate diagnosis of Alzheimer's disease and frontotemporal dementia.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2026-03-27
AI Technical Summary
Existing EEG-based diagnostic methods for Alzheimer's and frontotemporal dementia suffer from low diagnostic accuracy and high cost, and are significantly affected by noise and the experience of professional physicians.
Using deep learning technology, by optimizing the model structure and parameters, the EEG data is converted into CSD and PSD images using the MNE library. The images are then augmented using bilinear interpolation, merged to form a three-dimensional tensor, and a neural network model is built using PyTorch for prediction and diagnosis.
It enables more accurate, rapid, and objective disease diagnosis, reduces diagnostic costs, and improves diagnostic accuracy and stability.
Smart Images

Figure CN116712085B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The technical field of the present patent is the field of medical diagnosis, in particular a diagnosis device for Alzheimer's disease and frontotemporal dementia based on electroencephalogram. BACKGROUND
[0002] Alzheimer's disease and frontotemporal dementia are common neurological diseases in the elderly, mainly manifested as memory loss, language impairment, and impaired cognitive function. With the intensification of population aging, the incidence of these diseases is also increasing, which brings a huge burden to society and patients themselves.
[0003] Currently, the medical community usually uses electroencephalogram (EEG) based diagnosis technology to determine whether a patient has these diseases. However, due to problems such as noise, signal interference, and the influence of professional doctors' experience and professional knowledge on the results, traditional EEG diagnosis methods have low diagnostic accuracy and high cost.
[0004] In order to solve these problems, in recent years, deep learning technology has been widely applied in the medical field. Using deep learning algorithms, features can be automatically extracted from a large amount of EEG data, and electroencephalogram patterns related to Alzheimer's disease and frontotemporal dementia can be established. This deep learning based EEG diagnosis technology has very high accuracy and stability, and can greatly reduce the cost of diagnosis. Therefore, deep learning based EEG diagnosis technology has become an important development direction of current Alzheimer's disease and frontotemporal dementia diagnosis technology. SUMMARY
[0005] The purpose of the present application is to overcome the shortcomings of the prior art, and the present application provides a diagnosis device for Alzheimer's disease and frontotemporal dementia based on electroencephalogram, which adopts deep learning technology to efficiently and accurately analyze and diagnose electroencephalogram signals by optimizing the structure and parameters of the model, thereby realizing more accurate, fast and objective disease diagnosis.
[0006] The present application provides a diagnosis device for Alzheimer's disease and frontotemporal dementia based on electroencephalogram, which comprises:
[0007] The acquisition module acquires electroencephalogram data of the patient to be diagnosed;
[0008] The conversion module converts the electroencephalogram data into CSD images and PSD images using the mne library;
[0009] The expansion module expands the CSD images and PSD images using the bilinear interpolation method to obtain CSD and PSD images with consistent width and height;
[0010] a merging module, merging the extended CSD image and the PSD image to form a three-dimensional tensor with eight channels;
[0011] a prediction module, inputting the three-dimensional tensor into a diagnostic model and making a prediction based on the diagnostic model to obtain a prediction result;
[0012] a diagnostic module, classifying and comparing the prediction result with diagnostic criteria of Alzheimer's disease and frontotemporal dementia to obtain a comparison result and diagnose the patient.
[0013] Optionally, the electroencephalogram data of the patient to be diagnosed is collected, including:
[0014] Based on the electrical signals generated by the activity of brain cells collected by the electrodes placed in the corresponding positions of the patient's head, the change relationship between the potential of the electrical signal and the time is converted into electroencephalogram data;
[0015] The electroencephalogram data is recorded and stored.
[0016] Optionally, the electroencephalogram data is converted into CSD image and PSD image using MNE library, including:
[0017] Install the mne library and import the electroencephalogram data to be processed;
[0018] Using the functions configured in the mne library, a blank reference channel is created to eliminate the aliasing effect of the scalp area;
[0019] Based on the mne.time_frequency.csd_morlet() function in the mne library, the source density is calculated, and the CSD image is filtered;
[0020] Using the visualization function in the mne library, the CSD image is visualized;
[0021] Using the mne.time_frequency.psd_multitaper() function in the mne library, the power spectral density is calculated, and the PSD image is filtered;
[0022] Using the visualization function in the mne library, the PSD image is visualized.
[0023] Optionally, the CSD image and the PSD image are extended by using the bilinear interpolation method to obtain CSD and PSD images with consistent width and height, including:
[0024] Initialize the image and read the data of the original image;
[0025] Using the numpy.meshgrid() function to generate a new grid coordinate matrix with extended width and height, all coordinates of the target image are obtained;
[0026] The new pixel values are filled by using the bilinear interpolation based on the scipy.interpolate.interp2d() function to generate new CSD and PSD images.
[0027] The size of the images is adjusted by using the skimage.transform.rescale() function to obtain CSD and PSD images with consistent width and height.
[0028] Optionally, the expanded CSD and PSD images are merged to form an 8-channel three-dimensional tensor, including:
[0029] The CSD and PSD images are each taken as a channel to form two two-dimensional images with the same width and height.
[0030] The two two-dimensional images are spliced in the depth dimension to form an 8-channel three-dimensional tensor.
[0031] A dimension is added at the front of the array to represent the number of samples, and the shape of the three-dimensional array is changed from [8, height, width] to [1, 8, height, width] using the numpy.expand_dims() function.
[0032] Optionally, the training process of the diagnostic model comprises:
[0033] A deep neural network model is constructed as an initial diagnostic model; the deep neural network model is a neural network model constructed using PyTorch, which has an input layer, multiple convolutional layers, batch normalization layers, Dropout layers, fully connected layers, and an output layer.
[0034] Electroencephalogram data of Alzheimer's patients and frontotemporal dementia patients and normal control group data are collected to obtain Alzheimer's patient data set, frontotemporal dementia patient data set, and normal control group data set, and the electroencephalogram data in the data set are labeled with disease type or normal.
[0035] All labeled electroencephalogram data in the data set are converted into labeled CSD images and labeled PSD images using the mne library.
[0036] The labeled CSD images and labeled PSD images are expanded by using the bilinear interpolation method to obtain labeled CSD images and PSD images with consistent width and height.
[0037] The expanded labeled CSD images and PSD images are merged to form a labeled three-dimensional tensor with 8 channels.
[0038] importing the labeled three-dimensional tensors into an initial diagnosis model;
[0039] dividing the labeled three-dimensional tensors in the initial diagnosis model into a training set, a validation set and a test set;
[0040] training the initial diagnosis model using the training set, verifying the accuracy of the model after each round of training using the validation set, and adjusting the model parameters according to the results of the validation set to obtain a trained diagnosis model;
[0041] testing the trained diagnosis model using the test set to verify the generalization ability and accuracy of the trained diagnosis model;
[0042] further optimizing the model according to the results of the test set.
[0043] Optionally, the structure of the diagnosis model comprises:
[0044] the dimension of the input data of the input layer is (160, 240, 8);
[0045] the convolutional layer comprises a first convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 128, and a ReLU activation function; a second convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 64, and a ReLU activation function; and a third convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 32, and a ReLU activation function;
[0046] the batch normalization layer is added after each convolutional layer to accelerate model training and improve model accuracy;
[0047] the Dropout layer is added after the second and third convolutional layers;
[0048] the output layer contains 3 neurons and uses a softmax activation function to map the output to a probability space, which corresponds to three classification labels: Alzheimer's disease, healthy population and frontotemporal dementia.
[0049] Optionally, the further optimization of the model comprises:
[0050] for the divided data set, during the forward propagation process, each layer is sequentially calculated and weighted starting from the input layer, and a preliminary output result is obtained through a nonlinear function, i.e. an activation function;
[0051] using a loss function to calculate an error value, and performing backpropagation according to the error value;
[0052] At the end of each batch of processing, the parameters of the model are updated using an optimizer.
[0053] Optionally, the step of classifying and comparing the prediction result with the diagnostic criteria of Alzheimer and frontotemporal dementia, obtaining the prediction result and diagnosing the patient, comprises:
[0054] classifying the prediction result as Alzheimer's disease, frontotemporal dementia or other diagnostic categories according to the trained diagnostic model;
[0055] comparing the prediction result with the diagnostic criteria of frontotemporal dementia and Alzheimer's disease according to medical standards and medical history information;
[0056] according to the comparison result, finally giving the patient a diagnosis of whether he / she has Alzheimer's or frontotemporal dementia.
[0057] In the specific implementation of the present application, due to the use of deep learning technology, the structure and parameters of the model are optimized to efficiently and accurately analyze and diagnose electroencephalogram signals, thereby achieving more accurate, rapid and objective disease diagnosis. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor.
[0059] Figure 1 is a flowchart of the electroencephalogram-based Alzheimer's and frontotemporal dementia diagnosis method in the embodiments of the present application;
[0060] Figure 2 is a structural composition diagram of the electroencephalogram-based Alzheimer's and frontotemporal dementia diagnosis device in the embodiments of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0062] Embodiment one, please refer to Figure 1 , Figure 1is a flowchart of an electroencephalogram-based Alzheimer's and frontotemporal dementia diagnosis method in an embodiment of the present application.
[0063] As shown in Figure 1 An electroencephalogram-based Alzheimer's and frontotemporal dementia diagnosis method, the method comprising:
[0064] S11: Collecting electroencephalogram data of a patient to be diagnosed;
[0065] In the implementation of the present application, the collecting of the electroencephalogram data of the patient to be diagnosed comprises: converting the change relationship between the potential and time of the electrical signal generated by the brain cell activity based on the electrode placed at the corresponding position of the patient's head into electroencephalogram data; recording and storing the electroencephalogram data.
[0066] Specifically, the electrode is placed at the corresponding position of the patient's head and connected to an amplifier, and the electronic amplification technology is applied to amplify the electrical signal generated by the brain cell activity changing over time, and then the relationship curve between the potential and time is recorded with the potential as the vertical axis and the time as the horizontal axis, and the electroencephalogram data is converted; the electroencephalogram data is recorded and stored.
[0067] S12: Converting the electroencephalogram data into CSD images and PSD images using the MNE library;
[0068] In the implementation of the present application, the converting of the electroencephalogram data into CSD images and PSD images using the MNE library comprises: installing the mne library and importing the electroencephalogram data to be processed; using the functions configured in the mne library, creating a blank reference channel to eliminate the aliasing effect of the scalp area; based on the mne.time_frequency.csd_morlet() function in the mne library, calculating the source density and filtering the CSD images; using the visualization function in the mne library to visualize the CSD images; using the mne.time_frequency.psd_multitaper() function in the mne library to calculate the power spectral density and filter the PSD images; using the visualization function in the mne library to visualize the PSD images.
[0069] Specifically, before data processing, the MNE library and the electroencephalogram data to be processed need to be installed and imported, and before signal processing, a blank reference channel is created using the functions configured in the MNE library to process the aliasing effect of the scalp area; based on the function of the MNE library, the function of the MNE time_frequency.csd_morlet() function uses a morlet wavelet-based method to calculate the source density and filter the CSD image; the visualization function of the MNE library, such as the plost_csd() function, can be used to visualize the CSD image; the function of the MNE library, such as the function of the MNE time_frequency.psd_multitaper(), is used to calculate the power spectral density and filter the PSD image; and the visualization function of the MNE library, such as the plost_csd() function, is used to visualize the PSD image.
[0070] S13: The CSD image and the PSD image are expanded by using a bilinear interpolation method to obtain CSD and PSD images with consistent width and height;
[0071] In the specific implementation process of the present application, the bilinear interpolation method is used to expand the CSD image and the PSD image to obtain CSD and PSD images with consistent width and height, which includes initializing the image and reading the data of the original image; using the numpy.meshgrid() function to generate a new grid coordinate matrix after expansion of width and height, obtaining all coordinates of the target image; based on the scipy.interpolate.interp2d() function, bilinear interpolation is realized to fill in new pixel values and generate new CSD and PSD images; using the skimage.transform.rescale() function to adjust the image size to obtain CSD and PSD images with consistent width and height.
[0072] Specifically, first, the image needs to be initialized and the data of the original image is read; the numpy.meshgrid() function can quickly generate a data grid coordinate matrix, and all coordinates of the target image can be obtained from the rectangular grid; the scipy.interpolate.interp2d() function is a function for interpolating data, and based on the scipy.interpolate.interp2d() function, bilinear interpolation can be realized on the grid to fill in new pixel values and generate new CSD and PSD images; the skimage.transform.rescale() function is used to realize the scaling of the image to obtain CSD and PSD images with consistent width and height.
[0073] S14: The expanded CSD image and the PSD image are merged to form a three-dimensional tensor with 8 channels;
[0074] In the implementation of the present application, the merging of the expanded CSD image and the PSD image to form an eight-channel three-dimensional tensor comprises: taking the CSD image and the PSD image as a channel respectively to form two two-dimensional images with the same height and width; splicing the two two-dimensional images in the depth dimension to form an eight-channel three-dimensional tensor; adding a dimension at the front of the array to represent the sample quantity, and using the numpy.expand_dims() function to change the shape of the three-dimensional array from [8, height, width] to [1, 8, height, width].
[0075] Specifically, the essence of splicing is to realize the accumulation of elements, construct an empty three-dimensional array, and then fill in the two two-dimensional images to splice the two two-dimensional images in the depth dimension to form an eight-channel three-dimensional tensor; add a dimension at the front of the array to represent the sample quantity, and use the numpy.expand_dims() function to change the shape of the three-dimensional array from [8, height, width] to [1, 8, height, width].
[0076] S15: inputting the three-dimensional tensor into a diagnosis model and performing prediction based on the diagnosis model to obtain a prediction result;
[0077] In the implementation of the present application, the training process of the diagnostic model comprises: constructing a deep neural network model as an initial diagnostic model; the deep neural network model is a neural network model constructed using PyTorch, which has an input layer, multiple convolutional layers, a batch normalization layer, a Dropout layer, a fully connected layer, and an output layer; collecting electroencephalogram data of Alzheimer's disease and frontotemporal dementia patients and normal control group data, obtaining Alzheimer's disease patient data set, frontotemporal dementia patient data set and normal control group data set and labeling the electroencephalogram data in the data set with disease type or normal; using the mne library to convert all labeled electroencephalogram data in the data set into labeled CSD images and labeled PSD images; using a bilinear interpolation method to expand the labeled CSD images and labeled PSD images to obtain labeled CSD images and PSD images with consistent width and height; merging the expanded labeled CSD images and PSD images to form a labeled three-dimensional tensor with 8 channels; importing the labeled three-dimensional tensor into the initial diagnostic model; dividing the labeled three-dimensional tensor in the initial diagnostic model into a training set, a validation set and a test set; training the initial diagnostic model using the training set, verifying the accuracy of the model using the validation set after each training, and adjusting the model parameters according to the results of the validation set to obtain a trained diagnostic model; testing the trained diagnostic model using the test set to verify the generalization ability and accuracy of the trained diagnostic model; further optimizing the model according to the results of the test set.
[0078] Specifically, the structure of the diagnostic model comprises: the dimension of the input data of the input layer is (160, 240, 8); the convolutional layer comprises a first convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 128, and a ReLU activation function; a second convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 64, and a ReLU activation function; a third convolutional layer using a convolutional kernel with a size of 3x3, a step of 1, an output channel number of 32, and a ReLU activation function; the batch normalization layer is added after each convolutional layer to accelerate model training and improve model accuracy; the Dropout layer is added after the second and third convolutional layers; the output layer contains 3 neurons and uses a softmax activation function to map the output to a probability space, and the probability space corresponds to three classification labels: Alzheimer's disease, healthy population and frontotemporal dementia.
[0079] Specifically, the further optimization model comprises: for the divided data set, sequentially calculating and weighting each layer from the input layer in the forward propagation process, and obtaining a preliminary output result through a nonlinear function, i.e., an activation function; calculating an error value using a loss function, and performing back propagation according to the error value; and updating parameters of the model using an optimizer at the end of processing of each batch.
[0080] S16: classifying and comparing the prediction result with diagnostic criteria of Alzheimer and frontotemporal dementia, obtaining the prediction result and diagnosing the patient.
[0081] In the implementation of the present application, the classification and comparison of the prediction result with the diagnostic criteria of Alzheimer and frontotemporal dementia, the obtaining of the prediction result and the diagnosis of the patient comprise: classifying the prediction result into Alzheimer disease, frontotemporal dementia or other diagnostic categories according to the trained diagnostic model; comparing the prediction result with the diagnostic criteria of frontotemporal dementia and Alzheimer disease according to medical standards and medical history information; and finally giving a diagnosis of whether the patient has Alzheimer or frontotemporal dementia according to the comparison result.
[0082] Specifically, the prediction result is classified into Alzheimer disease, frontotemporal dementia or other diagnostic categories according to the trained diagnostic model; the prediction result is compared with the diagnostic criteria of frontotemporal dementia and Alzheimer disease according to medical standards and medical history information; and finally a specific diagnostic result is given to the patient by comprehensively considering factors such as imaging and clinical manifestations of the patient. This process requires the professional knowledge and experience of doctors, and the diagnostic model serves as an auxiliary tool to quickly make a preliminary diagnosis of the patient.
[0083] In the implementation of the present application, since the deep learning technology is adopted, the structure and parameters of the model are optimized, and the electroencephalogram signal is efficiently and accurately analyzed and diagnosed, thereby realizing more accurate, rapid and objective disease diagnosis.
[0084] Embodiment two, please refer to Figure 2 , Figure 2 is a structural composition schematic diagram of the electroencephalogram-based Alzheimer and frontotemporal dementia diagnosis device in the embodiment of the present application;
[0085] As Figure 2 , the present application also provides an electroencephalogram-based Alzheimer and frontotemporal dementia diagnosis device, which comprises:
[0086] The acquisition module 21 acquires electroencephalogram data of a patient to be diagnosed;
[0087] In the embodiment of the present application, the electroencephalogram data of the patient to be diagnosed is collected, including: converting the change relationship of the potential and time of the electrical signal generated by the brain cell activity collected by the electrode placed at the corresponding position of the patient's head into electroencephalogram data; recording and storing the electroencephalogram data.
[0088] Specifically, the electrode is placed at the corresponding position of the patient's head and connected to the amplifier, and the electrical signal generated by the brain cell activity of the brain over time is amplified by using the electronic amplification technology, and then recorded, taking the potential of the electrical signal as the vertical axis and the time as the horizontal axis, to convert the potential-time relationship curve into electroencephalogram data; the electroencephalogram data is recorded and stored.
[0089] The conversion module 22: converts the electroencephalogram data into CSD images and PSD images using the MNE library;
[0090] In the embodiment of the present application, the electroencephalogram data is converted into CSD images and PSD images using the MNE library, including: installing the MNE library and importing the electroencephalogram data to be processed; using the function configured in the MNE library, creating a blank reference channel to eliminate the aliasing effect of the scalp area; based on the function of mne.time_frequency.csd_morlet() in the MNE library, calculating the source density and filtering the CSD images; using the visualization function in the MNE library, visualizing the CSD images; using the function of mne.time_frequency.psd_multitaper() in the MNE library, calculating the power spectral density and filtering the PSD images; using the visualization function in the MNE library, visualizing the PSD images.
[0091] Specifically, before data processing, the MNE library and the electroencephalogram data to be processed need to be installed and imported, and before signal processing, a blank reference channel is created using the function configured in the MNE library to process the aliasing effect of the scalp area; based on the function of mne.time_frequency.csd_morlet() in the MNE library, a method based on morlet wavelet is used to calculate the source density and filter the CSD images; using the visualization function in the MNE library, such as the function of plost_csd(), the CSD images can be visualized; using the function of mne.time_frequency.psd_multitaper() in the MNE library, calculating the power spectral density and filtering the PSD images; similarly, using the visualization function in the MNE library, such as the function of plost_csd(), the PSD images can be visualized.
[0092] The expansion module 23: the CSD image and the PSD image are expanded by using a bilinear interpolation method, and consistent CSD and PSD images in width and height are obtained.
[0093] In the specific implementation of the present application, the CSD image and the PSD image are expanded by using a bilinear interpolation method, and consistent CSD and PSD images in width and height are obtained, including: initializing the image, reading the data of the original image; using the numpy.meshgrid() function to generate a new grid coordinate matrix after expansion in width and height, obtaining all coordinates of the target image; based on the scipy.interpolate.interp2d() function to realize bilinear interpolation, fill in new pixel values, and generate new CSD and PSD images; using the skimage.transform.rescale() function to adjust the image size to obtain consistent CSD and PSD images in width and height.
[0094] Specifically, first, the image needs to be initialized, and the data of the original image is read; the numpy.meshgrid() function can quickly generate a data grid coordinate matrix, and all coordinates of the target image can be obtained from the rectangular grid; the scipy.interpolate.interp2d() function is a function for interpolating data, and based on the scipy.interpolate.interp2d() function, bilinear interpolation can be realized on the grid, new pixel values are filled in, and new CSD and PSD images are generated; using the skimage.transform.rescale() function to realize image scaling to obtain consistent CSD and PSD images in width and height.
[0095] The merging module 24: the expanded CSD image and the PSD image are merged to form a three-dimensional tensor with 8 channels;
[0096] In the specific implementation of the present application, the expanded CSD image and the PSD image are merged to form a three-dimensional tensor with 8 channels, including: taking the CSD image and the PSD image as a channel respectively, forming two two-dimensional images with the same width and height; the two two-dimensional images are spliced in the depth dimension to form a three-dimensional tensor with 8 channels; a dimension is added at the front of the array to represent the number of samples, and the numpy.expand_dims() function is used to change the shape of the three-dimensional array from [8, height, width] to [1, 8, height, width].
[0097] Specifically, the essence of splicing is to realize the accumulation of elements, build an empty three-dimensional array, and then fill in two two-dimensional images to splice two two-dimensional images in the depth dimension to form a three-dimensional tensor with 8 channels; add a dimension at the front of the array to represent the number of samples, and use the numpy.expand_dims() function to change the shape of the three-dimensional array from [8, height, width] to [1, 8, height, width].
[0098] The prediction module 25 inputs the three-dimensional tensor into the diagnostic model and makes a prediction based on the diagnostic model to obtain a prediction result.
[0099] In the specific implementation process of the present application, the training process of the diagnostic model includes: constructing a deep neural network model as an initial diagnostic model; the deep neural network model is a neural network model constructed using PyTorch with an input layer, multiple convolutional layers, a batch normalization layer, a Dropout layer, a fully connected layer, and an output layer; collecting electroencephalogram data of Alzheimer's disease and frontotemporal dementia patients and normal control group data, obtaining Alzheimer's patient data set, frontotemporal dementia patient data set and normal control group data set and labeling the electroencephalogram data in the data set with disease type or normal; using the mne library to convert all labeled electroencephalogram data in the data set into labeled CSD images and labeled PSD images; using a bilinear interpolation method to expand the labeled CSD images and labeled PSD images to obtain labeled CSD images and PSD images with consistent width and height; merging the expanded labeled CSD images and PSD images to form a labeled three-dimensional tensor with 8 channels; importing the labeled three-dimensional tensor into the initial diagnostic model; dividing the labeled three-dimensional tensor in the initial diagnostic model into a training set, a validation set and a test set; training the initial diagnostic model using the training set, verifying the accuracy of the model after each training using the validation set, and adjusting the model parameters according to the results of the validation set to obtain a trained diagnostic model; testing the trained diagnostic model using the test set to verify the generalization ability and accuracy of the trained diagnostic model; further optimizing the model according to the results of the test set.
[0100] Specifically, the structure of the diagnostic model comprises that: the dimension of the input layer input data is (160, 240, 8); the convolution layer comprises that: the first convolution layer uses a convolution kernel with a size of 3x3, a step length of 1, an output channel number of 128, and a ReLU activation function; the second convolution layer uses a convolution kernel with a size of 3x3, a step length of 1, an output channel number of 64, and a ReLU activation function; the third convolution layer uses a convolution kernel with a size of 3x3, a step length of 1, an output channel number of 32, and a ReLU activation function; the batch normalization layer is added behind each convolution layer, which is used to accelerate the model training and improve the model accuracy; the Dropout layer is added behind the second and third convolution layers; the output layer comprises 3 neurons, and a softmax activation function is used to map the output to a probability space, and the probability space corresponds to three classification labels: Alzheimer's disease, healthy people and frontotemporal dementia.
[0101] Specifically, the further optimized model comprises: for the divided data set, in the forward propagation process, each layer is sequentially calculated and weighted from the input layer, and a preliminary output result is obtained through a nonlinear function, that is, an activation function; an error value is calculated using a loss function, and back propagation is performed according to the error value; at the end of processing of each batch, the parameters of the model are updated using an optimizer.
[0102] The diagnostic module 26: classifies and compares the prediction result with the diagnostic criteria of Alzheimer's and frontotemporal dementia, obtains a comparison result and diagnoses the patient.
[0103] In the specific implementation process of the present application, the classification and comparison of the prediction result with the diagnostic criteria of Alzheimer's and frontotemporal dementia, the final prediction result and the diagnosis of the patient comprise: according to the trained diagnostic model, the prediction result is classified into Alzheimer's disease, frontotemporal dementia or other diagnostic categories; according to the medical standards and medical history information, the prediction result is compared with the diagnostic criteria of frontotemporal dementia and Alzheimer's disease; according to the comparison result, the patient is finally diagnosed with Alzheimer's disease or frontotemporal dementia.
[0104] Specifically, according to the trained diagnostic model, the prediction result is classified into Alzheimer's disease, frontotemporal dementia or other diagnostic categories; according to the medical standards and medical history information, the prediction result is compared with the diagnostic criteria of frontotemporal dementia and Alzheimer's disease; combined with imaging, the patient's clinical manifestations and other factors, a comprehensive consideration is made, and finally a specific diagnostic result is given to the patient. This process requires the professional knowledge and experience of doctors, and the diagnostic model can be used as an auxiliary tool to quickly make a preliminary diagnosis of the patient.
[0105] In the specific implementation of the present application, the deep learning technology is adopted, the structure and parameters of the model are optimized, the electroencephalogram signal is efficiently and accurately analyzed and diagnosed, and therefore more accurate, fast and objective disease diagnosis is realized.
[0106] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, which can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0107] In addition, the above detailed introduction is provided for the embodiments of the present application, and the principles and implementation manners of the present application are described by using specific examples. The above embodiment description is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, the specific implementation manner and application range can be changed according to the idea of the present application. In summary, the content of the description should not be understood as a limitation of the present application.
Claims
1. A diagnostic device for Alzheimer's disease and frontotemporal dementia based on electroencephalography (EEG), characterized in that, The device includes: Acquisition module: Acquires electroencephalogram (EEG) data from patients to be diagnosed; Conversion module: Uses the mne library to convert EEG data into source density CSD images and power spectral density PSD images; The expansion module uses bilinear interpolation to expand the CSD and PSD images, resulting in CSD and PSD images with consistent width and height. Merging module: Merges the expanded CSD image and PSD image to form a three-dimensional tensor with 8 channels; Prediction module: Inputs the three-dimensional tensor into the diagnostic model and performs prediction based on the diagnostic model to obtain the prediction result; Diagnostic module: Classifies and compares the predicted results with the diagnostic criteria for Alzheimer's disease and frontotemporal dementia, obtains the comparison results, and diagnoses the patient.
2. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 1, characterized in that, The collection of electroencephalogram (EEG) data from the patient to be diagnosed includes: Based on the electrical signals generated by brain cell activity collected by electrodes placed at corresponding positions on the patient's head, the change relationship between the potential and time of the electrical signals is converted into electroencephalogram (EEG) data. Record and store electroencephalogram (EEG) data.
3. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 1, characterized in that, The method of using the mne library to convert EEG data into CSD and PSD images includes: Install the mne library and import the EEG data to be processed; Use the functions configured in the mne library to create a blank reference channel to eliminate aliasing in the scalp area; Based on the mne.time_frequency.csd_morlet() function in the mne library, the source density is calculated and the CSD image is filtered. Use the visualization functions in the mne library to visualize CSD images; Use the mne.time_frequency.psd_multitaper() function from the mne library to calculate the power spectral density and filter the PSD image; Use visualization functions from the mne library to visualize PSD images.
4. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 1, characterized in that, The method of using bilinear interpolation to augment CSD and PSD images to obtain CSD and PSD images with consistent width and height includes: Initialize the image and read the data from the original image; Use the numpy.meshgrid() function to generate a new, expanded grid coordinate matrix to obtain all coordinates of the target image; Bilinear interpolation is implemented using the scipy.interpolate.interp2d() function to fill in new pixel values and generate new CSD and PSD images; Use the skimage.transform.rescale() function to resize the image to obtain a CSD image and a PSD image with the same width and height.
5. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 1, characterized in that, The process of merging the augmented CSD image and PSD image to form a three-dimensional tensor with 8 channels includes: The CSD image and the PSD image are each treated as a channel, forming two two-dimensional images with the same width and height. The two two-dimensional images are stitched together in the depth dimension to form a three-dimensional tensor with 8 channels; Add a dimension at the beginning of the array to represent the number of samples, and use the numpy.expand_dims() function to change the shape of the three-dimensional array from [8, height, width] to [1, 8, height, width].
6. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 1, characterized in that, The training process of the diagnostic model includes: A deep neural network model is constructed as the initial diagnostic model; the deep neural network model is a neural network model constructed using PyTorch with an input layer, multiple convolutional layers, batch normalization layers, Dropout layers, fully connected layers, and an output layer; We collected electroencephalogram (EEG) data from Alzheimer's disease patients and frontotemporal dementia patients, as well as data from normal control groups, to obtain datasets for Alzheimer's patients, frontotemporal dementia patients, and normal control groups. We then labeled the EEG data in the datasets with disease type or normal data. Use the mne library to convert all labeled EEG data in the dataset into labeled CSD images and labeled PSD images; The labeled CSD image and labeled PSD image are expanded using bilinear interpolation to obtain a labeled CSD image and PSD image with the same width and height. The augmented labeled CSD image and PSD image are merged to form a labeled 3D tensor with 8 channels; Import the labeled 3D tensor into the initial diagnostic model; The labeled 3D tensor in the initial diagnostic model is divided into a training set, a validation set, and a test set; The initial diagnostic model is trained using the training set. After each round of training, the accuracy of the model is verified using the validation set. The model parameters are then adjusted based on the results of the validation set to obtain a well-trained diagnostic model. The trained diagnostic model is tested using a test set to verify its generalization ability and accuracy. Based on the results of the test set, the model was further optimized.
7. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 6, characterized in that, The structure of the diagnostic model includes: The dimensions of the input data in the input layer are (160, 240, 8); The convolutional layers include: a first convolutional layer using a 3x3 kernel with a stride of 1, 128 output channels, and ReLU activation; a second convolutional layer using a 3x3 kernel with a stride of 1, 64 output channels, and ReLU activation; and a third convolutional layer using a 3x3 kernel with a stride of 1, 32 output channels, and ReLU activation. The batch normalization layer is added after each convolutional layer to accelerate model training and improve model accuracy; The Dropout layer is added after the second and third convolutional layers; The output layer contains 3 neurons and uses the softmax activation function to map the output to a probability space, which corresponds to three classification labels: Alzheimer's disease, healthy people, and frontotemporal dementia.
8. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 6, characterized in that, Further optimization of the model, including: For the partitioned dataset, during the forward propagation process, each layer is sequentially calculated and weighted starting from the input layer, and the initial output result is obtained through a non-linear function, namely the activation function. The error value is calculated using a loss function, and backpropagation is performed based on the error value. At the end of each batch, the optimizer updates the model's parameters.
9. The electroencephalogram-based diagnostic device for Alzheimer's disease and frontotemporal dementia according to claim 6, characterized in that, The predicted results are categorized and compared with the diagnostic criteria for Alzheimer's disease and frontotemporal dementia to obtain prediction results and diagnose patients, including: Based on the trained diagnostic model, the prediction results are classified into Alzheimer's disease, frontotemporal dementia, or other diagnostic categories. The predicted results were compared with the diagnostic criteria for frontotemporal dementia and Alzheimer's disease based on medical standards and medical history information. Based on the comparison results, the patient is ultimately diagnosed with either Alzheimer's disease or frontotemporal dementia.
Citation Information
Patent Citations
Feature extraction method based on power spectrum density and cross-correlation entropy spectrum density fusion
CN110059564A
Method for providing information on major depressive disorder and device for providing information on major depressive disorder using same
WO2023048546A1