Can Artificial Intelligence Tell the Difference Between Ischemic and Hemorrhagic Stroke?

Stroke is a very common and serious medical problem. Ischemic strokes happen when a blood clot blocks blood flow to the brain, causing brain cells to die. A hemorrhagic stroke happens when a brain artery breaks and blood flows freely into the brain. Telling the difference between the two types of stroke is very important as their treatments are quite different, and the longer a stroke goes without treatment, the more brain cells die. Artificial intelligence (AI), a computerised form of learning, has allowed great progress in identifying situations or items in the technological world, but it has rarely been used in medicine. Recently, however, there have been a few reports. For example, AI has been used to detect bone fractures from X-ray images. For this project, AI was tested on computed tomography (CT) images of ischemic and hemorrhage strokes to see whether AI could tell the difference between the two types. The online AI program Google Teachable Machine was used for these experiments. First, multiple images of the two types of strokes were selected from freely-available online sources. Then the images were cleaned to focus on the brain only. The images were organised into categories: ischemic vs. hemorrhagic, large vs. small, and training vs. validation sets. The training set was used to teach the AI program, while the validation set was used to test it. AI correctly identified the type of stroke 77.4% of the time in the validation set. AI incorrectly identified the stroke type 22.6% of the time. AI did very well at telling the difference between the two stroke types, but for this approach to be useful in the hospital, the error rate would need to improve. If the AI program trained on more images, and its error rate went down, then it has potential to be used as a verification method for stroke diagnosis for doctors in the future.
Every 40 seconds someone in the United States has a stroke.[1] Each year about 795,000 people in the US suffer a stroke, and 140,000 of those people die.  Knowing the difference between stroke types is a life or death situation. There are two types of strokes: ischemic and hemorrhagic.[2] Ischemic strokes happen when an artery in the brain gets blocked, usually by a blood clot preventing blood from reaching a part of the brain. As blood carries oxygen and nutrients to the cells in the body;  without these the brain cells die. This is the most common type of stroke, occurring in 87% of cases.[3] Hemorrhagic strokes happen when a blood artery in the brain bursts, causing blood to spill out into the brain.[2] This can be caused by high blood pressure and/or weak arteries.
Both ischemic and hemorrhagic strokes can be life threatening. Ischemic strokes are treated with a clot-busting drug called alteplase (also known as tissue plasminogen activator, or tPA).[2] However, if this drug was given to someone with a hemorrhagic stroke, it would make things much worse by increasing bleeding. Hemorrhagic strokes are often treated with medicine to lower blood pressure to stop bleeding. If this was done for an ischemic stroke patient, it could reduce the blood flow to the brain even more, making the stroke worse. Therefore, it is important to know the difference between these types of strokes as the wrong treatment for either could lead to a worse prognosis. Artificial intelligence (AI) could help with this.
Intelligence is the ability to take memories and do something useful with them. AI is the ability of a computer program to gain and apply knowledge, and to use this knowledge to make decisions.[4-6] To do this, AI needs inputs, which consists of data from many possible sources. The term AI was coined by John McCarthy in 1995 and implementations of AI include Siri on the Apple iPhone and Alexa on Amazon Echo. AI has also been used recently in the field of medicine. For example, AI has been used in studies to help doctors find dangerous infections[7] and identify bone fractures on X-ray images.[8] In the second of these studies, AI improved doctors’ ability to detect bone fractures. In this study, AI was applied to stroke.
Ischemic and hemorrhagic strokes can be distinguished by magnetic resonance imaging (MRI) or computerised tomography (CT) scans[9], two ways of forming images of the inside of the head or body. In this project, only CT scan images were used. Although a trained professional can tell the difference between an ischemic and hemorrhagic stroke on a CT scan, there may not always be someone immediately available with that knowledge, hence the potential of the use of AI. It could also be used as a verification method even when a trained doctor is available.
A CT is a scan that uses X-rays to look inside the head or body taking many pictures from different angles to create a 3D image.[9] CT scans are fast, painless, and accurate, and can reveal internal injuries and bleeding, as well as being used to determine what kind of stroke a person is having. In an ischemic stroke, the brain gets darker (hypodense) where the stroke occurred (Figure 1). In a hemorrhagic stroke, the blood that spills into the brain appears brighter than the rest of the brain (hyperdense).
The objective of this project is to inverstigate whether AI can determine the difference between the two types of strokes based on CT scan pictures. Based on the ability of AI to correctly identify pictures in common technology applications, the hypothesis or expected outcome is that AI will be able to tell the difference between CT scan images of ischemic and hemorrhagic strokes at least 75% of the time after training on >25 pictures of each stroke type.
In this project, the internet will be used to find CT images of stroke and brain hemorrhage. A subset of these will be input into an AI program while telling the program which type of stroke each image represents (AI training). Then the AI program will be tested on a new set of images to see whether it has learned the difference between these types of strokes (AI validation).
Variables and Constants
The independent variable is the number of CT images of each brain stroke and brain hemorrhage used to train the AI program. The dependent variable is AI’s accuracy at telling the difference between new CT scan images of brain stroke and brain hemorrhage. Some constants include: the same kind of image (CT scan), all images in same orientation (axial; Figure 2), and the conditions (lighting, positioning of camera and image) in the room when showing the AI program the images for training and validation.
Selecting the Images
First, CT scan images were found through the use of the search engine “” by searching terms ‘CT stroke,’ and ‘CT large stroke’. This was then repeated while using the terms ‘CT hemorrhage’ to find images of CT scans of hemorrhagic stroke. Examples of each are in Figure 1. A neurologist helped to identify CT images, ensuring they were correctly identified.
Cleaning up the Images
Images were cleaned up by splitting any images that had multiple panels into separate images and removing anything outside the head using image processing software (Adobe Photoshop). The goal was to make the only differences the strokes themselves; not objects outside of the head or labels.
Organising the Images for training and validation
The images were organised into ischemic and hemorrhagic stroke by splitting them into separate folders. These folders were then each split into ‘big’ and ‘small’ based on the size of the stroke. The small strokes were less than approximately 20% of a brain hemisphere (one side of the brain). The big strokes were larger than this approximate cut off. These four sets were then divided into training and validation sets. The training set was 90% of the images (of each stroke type and size), and the validation set was 10% of the images. The training and validation sets of each stroke were visually compared to make sure that they looked similar. In the final training set, there were 127 images, 56 images of ischemic stroke (45 large and 11 small) and 71 images of hemorrhagic stroke (39 large and 32 small). In the final validation set there were 41 images, 20 images of ischemic stroke (18 large and 2 small) and 21 images of hemorrhagic stroke (10 large and 11 small).
Training AI
The free website for Google Teachable Machine ( was used for these experiments. The training and testing was done on a laptop with a camera (to input the images). The images for training and testing were downloaded onto an iPad to display to the camera. The iPad and laptop were set up so that the input frame for the AI program was completely filled with the iPad display (Figure 3). To minimise error in the methodology, masking tape was used to carefully keep the computer and the iPad in the same position throughout the experiments. Training images on the iPad were shown one after the other to the AI program. First, the AI program was trained with ischemic stroke images, then with hemorrhagic stroke images. Next the AI program was tested with new images of each type of stroke type, and its confidence percentage was recorded for each, along with the minimum and maximum confidence displayed (this varied somewhat over time). Several screenshots of this process were recorded (Figure 4).

AI correctly identified the two stroke types in the validation images the majority of the time, as shown in Table 1. AI’s few failures in identification were spread throughout, independent of the type of stroke or stroke size. When AI misclassified the stroke type, its confidence was generally lower than when it classified the stroke correctly. There was also a tendency when AI misclassified the stroke type for its confidence to fluctuate more than when it was correct, as shown in the range column. In one case of a large ischemic stroke validation image (image 5), AI could not reach a conclusion, reporting a confidence of 50% for each stroke type.
Table 1: Performance of AI on the validation set

Figure 4 shows examples of the performance of the trained AI program when tested on validation images. The top example shows AI correctly identifying a small ischemic stroke, with a confidence of 99%. In the middle, is an example of AI, with a confidence of 100%, correctly identifying a large hemorrhagic stroke. Occasionally, AI incorrectly classified a stroke. The bottom example is one such instance. In this example, AI incorrectly identified a hemorrhagic stroke as an ischemic one, with a confidence of 85%.

Table 2 shows AI’s error rates on top and the correct rates on the bottom. The lowest percentage correct was 72.7% on small hemorrhagic strokes. The highest percentage correct was 100% on small ischemic strokes, but there were only two validation examples. It is difficult to distinguish whether this encouraging result is due to chance or is a result of significance. The performance of AI was otherwise similar in every stroke type and size. Overall, AI correctly identified the stroke type 77.4% of the time.
Table 2: The error rate and correct rate of the trained AI program. On average, AI was correct 77.4% of the time.

This project is important because it shows that AI could be helpful in telling the difference between brain stroke and brain hemorrhage, a life or death decision. AI did very well in telling the difference between the two types of strokes, supporting the hypothesis that a correct rate of >75% could be achieved.  AI did slightly better when injuries were large versus small, but the results were extremely close, and more examples would be needed to figure out if this is a true difference.
AI could be applicable to doctors as a verification method in the future. For example, following the reading of a stroke CT scan by a trained doctor, AI could be used to make an independent check. If AI disagrees with the doctor’s read, then the image could be passed on to another doctor for further confirmation. This might help to eliminate potential human errors and prevent patients from getting the wrong treatment. AI could instead be used in place of a doctor (as a first check). To do this, however, the error rate would have to be much lower. One way to work towards lowering the error rate, would be to give AI more images to train. In order to do this more images would be needed, not just from Google but from hospital and doctors’ databases.
If this study was repeated, there are some areas that could be improved. First, as AI is trained on the second type of stroke (hemorrhagic), it would be interesting to note its decisions on the images as it learns. This could show how many training images it takes before the percentage correct starts to improve. This could help to understand how much data is required for AI to learn. It would also be interesting to give the AI program a few training images of each type, then run the validation set (without learning), give a few more training images, run the validation set again, and repeat until it exceeds the goal accuracy. This would also help to understand how AI learns. There are also limitations related to the use of images from the internet. Hospital records may provide better reliability and may be more relevant than internet images. Such images were not available for this study, but could be used, providing patient privacy was protected. In the future, AI may be an important part of how doctors diagnose patients more often, or even help to suggest treatments.
In this project, AI was tested on how accurately it could tell the difference between CT scan images of brain stroke and brain hemorrhage. It is critical to know the difference between the two main types of brain strokes because the treatments for them are very different. This project is important because a computer program that can identify stroke type from CT scan images could save lives. Overall, AI did very well at identifying the type of brain stroke that was shown. AI correctly identified the type of stroke 77.4% of the time. This confirmed the study’s hypothesis, exceeding the goal of 75% correct. AI could be useful as a verification method for doctors in the future, catching errors to make sure patients get the correct medications. It could also be a first check in situations where a trained doctor is not available, providing the error rate could be lowered.
I would like to thank my family for encouraging me throughout the whole time I was doing this project. I would especially like to thank my dad for helping me, including providing identification of the type of stroke in the images used, as a neurologist. I would not have been able to do this without him.

  1. “Stroke”, Centers for Disease Control and Prevention, last modified November 5, 2018,
  2. Marcella A. Escoto, “Strokes”, KidsHealth, The Nemours Foundation, last modified December 2018,
  3. “Ischemic Strokes (Clots)”, American Heart Association, accessed March 2018,
  4. Tim Slavin, \”What Is Artificial Intelligence?\”, Beanz, February 2016,
  5. “Artificial Intelligence”, Kids.Net.Au, accessed March 2018,
  6. “Machine Vision”, Kids.Net.Au, accessed March 2018, _vision.
  7. Matthieu Komorowski, Leo A. Celi, Omar Badawi, Anthony C. Gordon and A. Aldo Faisal, “The Artificial Intelligence Clinician learns optimal treatment strategies for sepsis in intensive care,” Nature Medicine 24, no. 11 (November 2018): 1716–1720,
  8. Robert Lindsey, Aaron Daluiski, Sumit Chopra, Alexander Lachapelle, Michael Mozer, Serge Sicular, Douglas Hanel, et al., “Deep neural network improves fracture detection by clinicians,” PNAS 115, no. 45 (November 6, 2018): 11591-6,
  9. Mayo Clinic Staff, “CT Scan”, Mayo Foundation for Medical Education and Research, May 9, 2018,
  10. David Ferguson, “CT Brain Anatomy Tutorial”, October 16, 2011,
  11. Stephan A. Mayer, Nikolai C. Brun, Kamilla Begtrup, Joseph Broderick, Stephen Davis, Michael N. Diringer, Brett E. Skolnick, Thorsten Steiner and Recombinant Activated Factor VII Intracerebral Hemorrhage Trial Investigators, “Recombinant activated factor VII for acute intracerebral hemorrhage,”The New England Journal of Medicine 352, no. 8 (February 24, 2005): 777-85,
  12. Ulf Nestler, Daniel Memia-Zolo, Nidal Salloum, Mehdi Mejdoubi, François Lengelle, Raoul Santiago, William Cécile, Remus Stegaru and Norbert Manzo, “Sinogenic Subdural Empyema in a Ten-Year-Old Boy with Sickle Cell Anemia,” Open Journal of Modern Neurosurgery 3, no. 4 (October 2013): 53-58,

About the Author

Story Kummer, USA
Story Kummer is a 12 year old girl who is in 6th grade at Forsyth School in St. Louis, Missouri. Story enjoys art, soccer, volleyball, running, hanging out with her friends, and spending time with her family. Her favorite holiday is Halloween. Her favorite science memory is seeing the total solar eclipse when it passed her home in 2017. When Story grows up she wants to be a teacher, an artist, or a scientist.

4 thoughts on “Can Artificial Intelligence Tell the Difference Between Ischemic and Hemorrhagic Stroke?”

  1. Safiyeh husain

    Very well done, I now know the difference between a hemorrhagic stroke and an ischemic stroke.

  2. The figure 1, the caption stated stroke on the left side of the brain. It should be the Right side instead of left correct?

Leave a Comment

Your email address will not be published. Required fields are marked *