Every minute that your brain has an artery blocked,
millions of brain cells are dying.
Every successful business starts with a great idea.
Today, moving from concept to reality is easier than ever before.
Join us as we travel around the world
and meet developers, architects, and innovators
to learn how they're building on the AWS Cloud.
Welcome to 'This is My Architecture.'
Welcome to another special episode of 'This is My Architecture.'
Today I'm filming from a slightly less exotic location than usual:
my home, where I've been adapting
to this changing environment that we find ourselves in.
Today we're going to explore how technology is changing
the outcomes of urgent stroke care.
One company that's embracing this idea is Viz.ai,
with the AI standing for artificial intelligence.
About 1 in 4 of us are expected to suffer from stroke during our lifetime.
This new technology promises to dramatically increase survival and recovery.
The process is impressive,
but I'm really interested in understanding the architecture behind the technology.
Earlier this year, before the pandemic,
I had the opportunity to travel to Tel Aviv
and spend some time with Viz.ai, diving deeper into it.
David, what was the big idea for Viz.ai?
So, about 4 years ago, I was hospitalized at Stanford Hospital
with a suspected stroke.
Before that, I was a very happy postdoc at Stanford.
But that experience really gave me the insight into the problems
of stroke workflow.
I was lucky enough to meet Dr. Chris Mansi, co-founder of Viz and CEO,
who is a neurosurgeon by background,
who told me that he actually lost numerous patients on the table
due to such workflow delays.
And he shared his vision of connecting doctors and patients automatically
to avoid and eliminate these delays.
So, you're a technologist. How did you think that could help?
So, 2016 was a very exciting year.
On the AI side, deep learning technology was picking up
and really breaking record after record in computer vision.
Cloud technology was maturing, providing abilities
to crunch the huge data that comes out of CT scans automatically in the cloud
and delivering it all the way to the mobile device of the physician.
Fantastic. Thanks, David. I can't wait to learn more.
Thank you.
Detecting what kind of stroke a patient may be having in a timely manner
is crucial for treatment and well-being.
With Viz.ai's new technology, doctors and medical teams
are able to identify strokes much quicker.
To find out more, let's meet two world-renowned specialists
in the field of stroke care: Dr. Adam de Havenon and Dr. Ramesh Grandhi.
Thanks for joining me today.
Thanks for having me. Yeah, my pleasure, Adrian.
Describe for me what happens when a patient comes into the hospital.
Once in the stroke center,
what is important is to get them for their imaging.
They undergo a CAT scan of the head,
because when a person comes in with a stroke,
we still don't generally know what type of stroke it is.
But scanners only give you pictures.
Somebody has to look at those pictures
and identify that the artery is blocked.
And how long does it take to actually analyze those scans?
Once the images are pulled up, they can be reviewed in a matter of minutes.
However, that's not always the case at other hospitals.
And the truth of it, Adrian, is that there just aren't enough neurologists
to be at all these hospitals.
All of them would essentially wait
for a scan to be transferred to a radiologist.
Going back and forth can slow things down
10, 20, even 30 or 40 minutes.
And when you get that sort of slowdown, what is the effect on the patient?
It can be quite dramatic.
If we're talking about 30 minutes, that might be the difference
between leading a very normal life
to your requiring help with basic things
like getting dressed, going to the bathroom.
So if we look at Viz.ai, how is it changing your approach to patient care?
When a patient gets a CT scan at the hospital,
it's immediately transferred to this app on my phone.
And being able to visualize imaging,
just pulling it up on your phone,
without having to log on to a computer
or wait for the imaging packet to arrive on your computer screen,
is invaluable.
CT, or Computed Tomography, scans are high-resolution image slices of the brain.
And they could be huge: anything from 100 images to 1000.
But how do you get all this data up to the cloud?
Well, I spoke to Michael at Viz.ai about how they did it.
So Michael, let's start with how you collect all those images
from the hospitals.
We deal with different legacy systems, many makes and models of CT scanners.
They all use DICOM protocol.
We have a virtual machine inside the hospital
that utilizes AWS CLI and uploads data directly into an S3 bucket.
In addition to that, we have another flavor
that uses a VPN connection between the hospital and the cloud.
But also, we send images back to the CT scanner after processing
and that happens with the help of an SQS queue and an S3 bucket.
So once those images are in this S3 bucket, how does the workflow kick off?
The S3 bucket uses AWS S3 event notification
and triggers the Lambda.
That Lambda is basically the entry point into our processing account
and processing pipeline.
We start with the study assembler,
which is the first worker that processes the data,
and basically builds from those different DICOM images
a series, a study, and a patient.
And then after that, we have the study processor,
which it uses as kind of a router that identifies
the type of algorithm that needs to run on that specific patient.
They communicate by using a message broker.
We use Apache Kafka.
Next one in line is the ML inference,
which is the heart of the system, the part that runs the algorithm,
and they all connect with the state flow RDS.
So, results from one worker are availble for the other worker through the RDS.
At the heart of Viz.ai is machine learning.
This helps the app discover vessel occlusions from the CT images.
But to better understand what the AI is looking for,
we first need to understand the different types of strokes.
The vast majority of strokes are what we call ischemic strokes,
where a blood vessel to the brain is blocked,
typically by a clot,
and that deprives the brain of the blood.
It causes the brain eventually to die off.
Then we have something called hemorrhagic strokes,
which are also known as intracranial hemorrhages.
Intracranial hemorrhages are a bloody stroke,
and that's when bleeding occurs in the brain.
Finally, the last type of stroke is called the subarachnoid hemorrhage,
in which there's bleeding on the surface of the brain tissue itself,
and that type of stroke represents about 3% of all strokes.
So, I noticed you used different auto scaling groups
for these different phases of the processing.
Why is that?
So, we want to make sure we use the right EC2 instance
for the right workload.
For example, the ML inference needs a heavy, fast, intensive GPU power,
and for that we use P3 instances.
While the other processors, they need lighter processing power,
and for that we can get away with T instances.
So, great, you're really right-sizing the cost of your EC2 farms
across these different parts of your process.
Now, I notice you have a number of AWS security services.
How have you been using those?
So, since we hold very sensitive data in the cloud,
we need to be HIPAA compliant,
and also compliant with other security frameworks.
And for that we use different AWS security services:
Inspector, Macie, KMS, GuardDuty, etc.
Right, and so Macie, for example, helps you identify
some personal identifiable information, or PII information there.
Now, I noticed you have another S3 bucket over here with results.
What happens from here?
The bucket contains the processing results of the algorithm.
And by using AWS Cloudfront,
we can show those images inside a mobile app
in addition to the original images that arrive from the CT scanner.
And by using Cloudfront, we make sure that these images are available globally
in a fast manner.
I really see some fantastic integration that you've done with these AWS services.
Thanks for sharing.
Thank you very much.
So before Viz, a patient who would walk into a hospital, say in Montana,
would get a scan there and it would go through a series of handoffs and escalations,
and the person who is actually making the decision sits in Salt Lake, Utah.
And you can imagine how this takes hours,
and remember with stroke, every minute counts.
With Viz, the scan goes to the cloud, and within 3 to 5 minutes is processed,
and the physician in Salt Lake City gets the alert their phone,
it wakes them up, they can see the images,
and they step into the workflow much, much sooner,
and the patients get treated much sooner.
Viz.ai's machine learning technology further speeds up this process
by alerting a physician once it detects a potential occlusion.
Let's check in with our doctors one more time to see how they use this AI technology.
So how does the artificial intelligence come into play for you as a doctor?
It alerts us even sooner
particularly when patients are at hospitals
where a radiologist, or a neurologist, is not looking at the scans immediately.
And that enables us to activate the cath lab team,
the angio team at these outside hospitals,
and it cuts down on time that can otherwise be spent
getting them on the table and ready to go
for us to deliver this life-saving treatment
For example, I was at home, eating dinner I think,
and my phone alerts,
telling me that there's a patient with a large vessel occlusion.
Immediately I looked at my phone, I scrolled through the image,
I saw that, gosh, this is an artery, we could get this clot out.
And we moved.
We were able to mobilize our efforts and get that young lady on the table
at her community hospital while we were driving up,
and the greatest impact was seeing her walking out of the hospital
two days later.
That ability to both alert me when there's a problem
and then let me look at the problem,
is quite a game-changer I would say, Adrian.
Everything that Dr. Grandhi just told us
requires some serious AI ML muscle to interpret all that data.
Let's head back to Tel Aviv one more time and speak to Shlomi,
and find out how Viz.ai uses artifical intelligence
to enable that telecare workflow.
Shlomi, we learned how you deploy your models into production,
but a big part of your platform is how you improve them over time.
What were some of the challenges that you faced?
So the first thing we need to know is that, when dealing with health care,
we need to have a very large sample size
in order to make sure that every improvement we do to the algorithm
is affecting everybody, and not just the common cases.
The second thing is that we're a small company
and we want to run fast.
Right, well, walk us through how you built it.
So the first thing that we're doing,
we're taking the data from our production system
and processing it in a process we call DI, de-identification.
So we basically take the data and we strip all the PHI from it,
that's protected health information.
So after this point, we have data without PHI.
The second process that we are doing is collecting some metadata from the data
and saving all the results back to S3.
It's a great use of serverless here.
I see Batch. What are you using that for?
We use Batch in order to overcome some Lambda limitation,
especially regarding the amount of space that we have for each Lambda.
Right, so you can run a lot more of those in parallel.
So, I see your algorithm team here. What's the experience like for them?
We wanted to have a very simple process
that everybody can use, so we have a centralized location.
This is Jenkins, who is orchestrating the entire process.
So the developer will go here to Jenkins,
and here we need to have two inputs.
The first is a branch in GitHub,
and the second of all is a list of patients.
So once Jenkins starts to work, it will pull the data from GitHub,
and then it will create a new image in ECR.
Once that is done, we can start sending tasks over to Fargate.
So now we are running multiple instances,
one for each patient,
and once this process is over, we are saving all the data
in a centralized location back in S3.
So your developers are only ever dealing with code,
never have to worry about any of the infrastructure,
and you can maintain versions, which is great.
Now, AWS has lots of different container services.
Now, why did you choose Fargate?
We chose Fargate because we wanted a process that would allow us
to scale very fast, but still maintain a low cost,
instead of using machines and EC2s.
So I see you're using CloudWatch. How are you using that?
So, each instance will write all the logs to CloudWatch,
and then we are using a Lambda to transfer all logs to Sumo Logic.
Right, so you can get a full visualization of what all of this is doing.
Yes. Great. A lot of automation
has gone into this. What sort of benefits have you seen?
So, the two main benefits that we saw from this process,
first of all is the price, we cut down the price in 60%,
and the second is the development time.
We went from a process that ran 2 weeks to just 2 hours.
That's amazing. Thanks for sharing your architecture with us.
Thank you very much.
Viz.ai is in over 300 hospitals in the United States,
with many more to come around the world.
Medical experts are embracing these new tools
to interface with one another, to make the medical workflow much more efficient.
That means vastly better outcomes for stroke patients
in the years to come.
And that's good news for all of us.
Well, that's a wrap for this special episode.
Until next time, stay safe and stay connected.