Is there any way to train a neural network to recognise abnormal images?

2 views (last 30 days)
Cai Chin
Cai Chin on 20 Dec 2020
Commented: Cai Chin on 31 Dec 2020
Hi, I am using MATLAB R2020a on a MacOS. I am analysing ECG signals in real-time on a cycle-by-cycle basis by plotting the co-ordinates associated with each cycle in the phase space. I am trying to identify abnormal trajectories in the trace for each individual. I was wondering if there was any way of training a neural network machine learning algorithm by feeding it some cycles from that individual to form a 'template' of a normal trajectory and then using this template for comparison with the remaining cycles to find and flag abnormal cycles? Is there also a way of feeding the normal cycles into the template to update it as new normal cycles are found, whilst excluding abnormal cycles?
Any suggestions would be greatly appreciated. Thanks in advance

Answers (1)

Abhishek Gupta
Abhishek Gupta on 23 Dec 2020
Hi,
As per my understanding, you want to train a Neural Network to flag the normal or abnormal ECG signal cycle. Following steps would help you to achieve the same: -
  1. Create dataset: Using imageDatastore() create an ImageDatastore object containing all the image files.
  2. Implement & Train a Deep Learning Network: Follow the below documentation to create a simple deep learning architecture for classification task: - https://www.mathworks.com/help/deeplearning/ug/create-simple-deep-learning-network-for-classification.html
After sufficient training, your network would learn features corresponding to the normal or abnormal cycle. You can then give any input image, and it will tell you whether it is a normal or abnormal example.
Yes, you can update or improve your model by retraining your network with the new data. This task can be done by saving the trained network and then loading it back before retraining the model on the new images.
  1 Comment
Cai Chin
Cai Chin on 31 Dec 2020
Hi, thank you for your answer. I trained a LSTM neural network to classify time-dependent 2-dimensional input signals derived from ECG's. I have used this example to train the network on raw data first but this took about an hour with a 77% classification accuracy. The example suggests using time-frequency analysis for feature extraction to speed up the training process and improve accuracy but this involves altering the method for one-dimensional data:
Is there any way of doing this feature extraction using 2-dimensional input signals. If not this method of feature extraction, is there another method for feature extraction that might be more suitable?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!