Code & Cure

#1 - Eye Spy with My AI: Tackling Diabetic Retinopathy

Vasanth Sarathy & Laura Hagopian Season 1 Episode 1

What if a simple photograph of your eye could prevent blindness? Diabetic retinopathy silently steals vision from millions worldwide, yet it's treatable when caught early. The challenge? Too few specialists, limited access to care, and not enough awareness about this serious complication of diabetes.

We dive deep into how artificial intelligence is transforming this landscape by analyzing retinal photos with remarkable accuracy. Through neural networks trained on thousands of eye images, these systems can detect subtle signs of disease—microaneurysms, hemorrhages, and abnormal blood vessels—that signal potential vision loss. With accuracy rates exceeding 98% for severe cases, AI technology serves not as a replacement for ophthalmologists but as a powerful triage tool that extends their reach.

The implications are profound, especially for underserved areas where specialists are scarce. By implementing AI screening at primary care visits, more people with diabetes can receive timely evaluation without the barriers of specialist referrals, travel costs, or time off work. The technology represents a perfect example of human-AI collaboration: machines handle initial screening at scale, while medical professionals focus their expertise on treatment and complex cases. This partnership model could revolutionize preventive care for one of the leading causes of preventable blindness worldwide.

References mentioned:

Credits: 

Theme music: Nowhere Land, Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0
https://creativecommons.org/licenses/by/4.0/

Speaker 1:

Millions of people go blind from diabetic retinopathy, but it is potentially preventable. So what if AI could catch it early just from a photo of your eye? Today we're unpacking the tech that could change the future of diabetic vision care.

Speaker 2:

Hello and welcome. My name is Vasant Sarathy, I'm an AI researcher and I'm with Laura Hagopian.

Speaker 1:

I am an emergency medicine physician who now works in digital health.

Speaker 2:

We're very excited. This podcast is going to be all about unpacking how artificial intelligence and emerging technologies in general are going to be transforming the way we think about our body and our mind, and today is going to be our first episode. Are you excited, laura?

Speaker 1:

I'm excited. I chose the topic, so I'm very excited.

Speaker 2:

What are we talking about?

Speaker 1:

We're talking about diabetic retinopathy. That's right. Are you excited?

Speaker 2:

I'm excited. I'm pretending like I didn't hear this before, but I am very excited. All right, what is that? Go ahead, get started. What is diabetic retinopathy?

Speaker 1:

Well, this is a complication that people with diabetes can have, and it's a leading cause of blindness around the world. So it's a serious problem, and there are lots of great treatments available for it, and better to get treated before you maybe even have symptoms. But the problem is that many people with diabetes don't actually get screened. They don't actually get the regular eye exams to identify diabetic retinopathy, and so then, if they don't have the exams, we don't know they have it. It's harder to preserve their vision, and so that's why I think this is an important topic from the clinical side of things.

Speaker 2:

But then the question really is why is it that people are not getting appropriately screened or screened fast enough?

Speaker 1:

Yeah, I mean it's a problem around the world. Right, there aren't necessarily enough ophthalmologists or optometrists to do these dilated eye exams. But beyond that, a lot of people aren't aware that they need to happen and it can be hard to go to eye appointments. Right, you have to travel. It costs money.

Speaker 1:

You have to take time off work. It's just another thing to add to the list of all the things you have to do with diabetes. Some clinics may not have the right equipment, they may not have the right support staff, they may not have the right resources, and telehealth is used for this to some degree too, but there may not be enough trained, trained physicians or professionals to really grade these images yeah, it seems like this is a particularly tough problem in low resource areas or places that are hard to get to or are poorer or developing countries and such and um, it does seem like it's.

Speaker 2:

You know, like you mentioned, there's not enough people to do this, which is often the starting point for thinking about an automated system to consider, uh, not replacing people necessarily, because that's not what we're interested in, uh, but helping people and potentially providing, you know, sort of additional hands on the problem and assisting people who are actually able to do this at a larger scale. So, you know, I think that's kind of where I think both of us talked about this this past week and we thought about how, you know, ai can in fact help this, and we're obviously not the first people to think about this. There's quite a bit of research that people have already done and even systems that people have already built that have started to target this issue. So we thought this would be a great topic, because it's an important problem and it's something that maybe AI can actually solve effectively and has already started making an impact and has already started making an impact.

Speaker 1:

Yeah, and Vasant, you're touching on a really important point here, because it really does need human-AI collaboration to develop a solution like this. Technology here isn't about replacing ophthalmologists, it's about augmenting their capabilities. So there's this synergy that we can see between AI and human clinicians, where possibly the AI could handle the mass screening, identify the high risk patients for vision loss, and then the human ophthalmologists can focus their expertise on those complex cases.

Speaker 2:

Almost like a triaging tool at some level. Is that right?

Speaker 1:

Yeah, exactly Almost like a triaging tool. So I think it's probably important to talk about how have we traditionally done this?

Speaker 1:

How have we traditionally gone about screening people for diabetic retinopathy? And the traditional method is with what's called a dilated fundus exam, and that's when you have someone who's well-trained who dilates the eye and takes a look inside the back of it, and that requires an expert right. It requires someone who really knows what they're doing to be able to see into the back of the eye. It requires you to go to a physical appointment to have an ophthalmologist or optometrist look in the back of your eye. So that's sort of the traditional method. But there are other methods that are being used. Retinal photography is another method that's being used and that can be done, sometimes with or sometimes without dilating the pupil, and then that's sent over via, you know, telehealth computer to an ophthalmologist who doesn't necessarily need to physically be there anymore. So that's the second method is having an ophthalmologist look at it, but not physically be the one looking into your eye by taking a photograph but not physically be the one looking into your eye by taking a photograph.

Speaker 2:

So can I ask a really silly question here? Is it the case that is there a difference between the physician actually looking at a real eye versus looking at an image of an eye? Is there some extra benefit gleaned from the physician being there? From this triaging standpoint? I'm sure there is, obviously from a medical standpoint, but from this sort of thinking about it from a purely triaging standpoint, can effective diagnosis happen from physicians looking at images?

Speaker 1:

Yeah, I mean the simple answer is yes. You know they've done studies comparing these two things like the optometrist or ophthalmologists doing that dilated look at the back of the eye, comparing that to retinal photography and they had good sensitivity and specificity. I mean the studies look at. Okay, at least 86% of cases had agreement and when there were disagreements, it wasn't like someone was necessarily missing, that there was retinopathy. It might've been a disagreement about the grade, because you can grade it as mild, moderate, severe, et cetera.

Speaker 1:

So for the most part, retinal photography works really well. Which begs the question do we need a expert professional to be looking at these photographs or could that be piece of the triage be automated so that we can use an AI system? We could use a computer algorithm to continually learn and update and detect retinopathy. And for the people who have retinopathy, now you refer them into care, now you get them to see an ophthalmologist so that you can get the treatment on board, whether that's laser, vegf et cetera. There's a lot of treatments available, but if we want to scale something like this, potentially the AI can do that and evaluate the retinal images.

Speaker 2:

Yeah, that does seem like again an opportunity for AI systems and particularly feels a little bit I'm feeling a little bit more reassured hearing that things can be effectively done with images.

Speaker 2:

Now, this is not the case for all medical diagnosis, as we know. There's lots of situations where just piece of data like an image or a write up or something is not enough. But in this particular instance, for this particular purpose, which is diagnosing and grading diabetic retinopathy for the purposes of as sort of as a triage, it seems like a lot of the boxes in terms of AI risk, you know, kind of say boxes, but a lot of points about AI risk is mitigated because we worry less about this. We want to catch those cases early on and anything we can do in that front is going to be really helpful. And so, yeah, no, I think that that's exactly where I it's tough because there's a lot of hype about AI right now and there's a lot of talk about generative AI and chat, gpt and LLMs and all those things, but in this particular instance, that is not the kind of AI we're looking at.

Speaker 1:

Oh, okay, tell me more. What kind of AI are we looking at here? Well, you, know.

Speaker 2:

I think it's worthwhile spending a few seconds just thinking about AI broadly, because AI is a term that's heavily used right now in public speak and it's a buzzword. It's a powerful word signifying a lot of things. Currently it signifies chat GPT world of AI, but before chat GPT which chat GPT is based on were neural networks, and neural networks were used for lots of things like detecting photos in your Facebook picture. I mean, that's a form of AI, it's a form of computer vision where an image is taken and an AI system or a neural network let's be more broad about that term is able to detect certain features in an image. Which kind of applies here If you can sort of see the connection between Facebook photos and diabetic retinopathy. But there is a connection.

Speaker 1:

No, I get it right, because they're images and so you're using image recognition techniques of some sort.

Speaker 2:

Yes, and image recognition techniques is one sort of school of AI which all falls into this larger school of what's called machine learning, where you have machines learning from data, and again there's a lot of interesting discussions to be had that may not be part of this conversation necessarily about what AI means, but here we're sort of focused much more on image recognition, image classification, things like. There are many subtopics in this space. So, for instance, image classification might be able to say this image is an image of a dog or an image of a cat, and so on. Image recognition might get a little bit more specific and say there is a table over here in the image and draw a little box around the table, and then you have image segmentation which says oh, you know, this part of the image is the foreground and this part is the background, and sort of drawing these blobs to represent which parts of the image you care about. So there's many subtopics here, all of which apply here to diabetic retinopathy, which then you know, I think the reason we started this podcast, I think was because the connection between sort of the medical aspect and the AI aspect is so tight that in order to develop good AI systems you do need a fairly deep knowledge in what the medical side of things, the thing you're looking at, the object you're studying.

Speaker 2:

So to that end you know, yes, I can talk about faces and tables and such, but in a diabetic retinopathy situation, when you're looking at a fundus image, what are the types of things that one looks at? Like, what are you looking at? Can you give us a sense for what that image is?

Speaker 1:

Yeah, absolutely. I mean, there are a lot of observable findings that are used to kind of classify or grade the diabetic retinopathy. So you're looking in the back of the eye for things like microaneurysms, but are there little hemorrhages inside the back of the eye? Is there beating of the veins? Are there new blood vessels forming? Is there hemorrhage in other layers? Is there actually any thickening of the macula or the retina at all? So those are the things that you're looking for, and it's something that ophthalmologists are certainly trained to do. Is that something that you can train an AI model to do?

Speaker 2:

Yeah, I mean that's what people have started to do.

Speaker 2:

When I started looking at this a little bit more, there are these conceptual diagrams that people have in their papers showing um, the back of the retina and what is a version of the fundus, and you can sort of see these like um, almost tree-like structures that are um on this on.

Speaker 2:

You know, you sort of have an orange background imagine an orange background and like red tree-like structures coming out, blood vessels, aka blood vessels, um, and you have other things in the image. So you don't not only have those tree-like structures in a typical fundus image, but you have other things that are different color and the colors may not mean much in terms of um, uh, the real um, fundus, but for our purposes we can sort of distinguish them. There's all these fuzzy areas, areas that are in the middle of the trees. There are these other regions that are different colors, slightly different colored, but they're also kind of fuzzy looking. So you have this sort of almost like world inside of this that has all of these features and that's something that image systems can recognize if, in fact, we have enough data to allow them to learn that ability to recognize that.

Speaker 1:

Okay, wait, I want to stop you there, because what does enough data mean? How do you actually, how do you train the AI to recognize, like I know? As a physician, I'm trained to recognize X, y or Z. If someone comes in with certain symptoms, I kind of know what to look for. But how do you train the AI on an image? How many images do you need to train it? How does it know to figure out what's mild, moderate, severe, what's proliferative diabetic retinopathy? That's something that, like as a physician, we might be trained on right or ophthalmologists would be trained on, but how does an AI system know how to recognize that from images?

Speaker 2:

Yeah. So when humans look at these images, especially trained humans, you're looking at everything at the same time. You're looking at what the things are that you're seeing. You're also looking at anomalies and oddities in the image at the same time as you're looking at what grades you have to give it, and so on. With an AI system it's a little bit more specific.

Speaker 2:

So you're specific and computer scientists think about this this way, in terms of specific tasks. So, for instance, maybe the computer is trained only to recognize all of the blood vessels. Maybe the computer is trained only to recognize all of the blood vessels. Maybe the computer is trained only to recognize a hemorrhaging blood vessel. And in order to train that, for instance, you would give it images of blood vessels that are normal versus blood vessels that are hemorrhaged, and those images are going to look different and those differences are represented in the pixels of the image. Pixels then convert to numbers which the AI system is able to process, and those differences are represented in the pixels of the image. Pixels then convert to numbers which the AI system is able to process and a neural network, which is often what's used for these purposes.

Speaker 2:

You can think of it as a machine with a lot of knobs, and what you do is you give it these images, pixels, which, like I said before, is converted to numbers, and those numbers you also give it the right answer.

Speaker 2:

So you also say this is a hemorrhage or this is a regular, normal blood vessel, and so on, and those images and the right answers allow the machine to go sort of back and forth and adjust its own knobs and once it's done, it now has, you know, the machine has all the knob settings to be exactly what it needs to be, so that when a new image comes in, it's able to tell you one or the other whether it's hemorrhaging blood vessel or it's just a regular blood vessel. And this that's at the core of the neural networks itself. Now there is a whole bunch of different methods and architectures and ways of arranging these neural networks that make one better than the other for different purposes, and researchers have explored that, you know, in various fields, but also specifically for diabetic retinopathy as well. But that's just image detection. And the grading is another issue as well, which is, instead of just saying whether it's hemorrhaging or not, you could give it images and you could tell it this is severe, this is moderate, this is light, okay.

Speaker 1:

And we know that right, like if there's, if someone has no signs of proliferative retinopathy and they have more than 20 intraretinal hemorrhages in each of the four quadrants, indefinite venous beating in two or more quadrants, those are the things that make would make us say, okay, that's severe. So if we're able to sort of have an algorithm from it on the clinical side, that's something that could be translated into sort of the AI interpretation or triaging of what's going on in this image?

Speaker 1:

I have a question, though so you train it on a set of images and then does it keep learning from new images, or it's just that initial set that it was trained on?

Speaker 2:

It's often the case that you have an initial set that it's trained on and it's deployed and then it's no more learning, it's not not learning anymore.

Speaker 2:

But that doesn't mean that the people who are developing it are not making it better. Uh, they could be taking in the data and working and updating their models, updating the, the training itself, and then releasing new versions that are, uh, trained to allow for new data to come in. And actually, the new data is an interesting point you mentioned because I didn't quite get into this, but it's you know and we can. Next, which is the idea of the data drifting and changing over time. So, if you look at the results, there's a lot of techniques out there and big companies like Google have tools out there, ai tools out there that can do this effectively. And if you look at the tools out there AI tools out there that can do this effectively and if you look at the results that have been reported, they're very high accuracy, very high performance. So you're looking at models that can detect and grade these systems at over 98, 99% accuracy, which obviously is massively helpful from a triaging standpoint.

Speaker 1:

Right For the more severe forms of diabetic brain apathy.

Speaker 2:

That's right, that is exactly right. So one of the challenges is what do you do when you have weaker forms? And also, relating to the point we mentioned earlier, what do you do when it's a little different, when things start to change a little bit? I don't know from a medical standpoint what that actually means, but what ends up happening is these models. If you remember the knob turning example I gave you earlier, all it's doing is learning patterns in those pixels, it's figuring out and associating patterns it's seeing in those pixels with named grades or named conditions, and so that's all it's doing. It's identifying patterns. So that's all it's doing, right, it's identifying patterns, and so that means it assumes that the new pattern it's going to see is going to be similar to the pattern, the collection of patterns it's seen before.

Speaker 2:

But now if, instead, if you have a new pattern, that changes and scientists and computer scientists call that out of distribution, when you have something new that was not in your original pattern collection or distribution of models, distribution of images and so that new thing is now going to be difficult to classify. And this is a really funny example, actually, of this that came to mind, which was that the somebody trained a COVID lung images to distinguish between image detector, to distinguish between COVID and non COVID lungs, and it did great and it performed very well, and you gave it a COVID lung. It would tell you that and so on. And then to that same system. Somebody gave it a picture of a cat and it said with 100% confidence that it was a COVID lung.

Speaker 2:

Now to the machine. It doesn't know that something is a cat. It's just looking at pixels, right. But that's an example of a completely out of distribution image that it has to give you an answer. It doesn't say I don't know what is this, it just says it has to give you one of the other answer cat or, you know, covid lung or not, covid lung, cat is not even in its vocabulary okay, so like, basically, you're telling me we should not send pictures of cats to the ai.

Speaker 1:

That interprets diabetic retinopathy.

Speaker 2:

That is correct.

Speaker 1:

But can I play this back to you in all seriousness If, for example, these AI models were trained on people, say in the United States, and then you took something like this to a different country, Could that change in geography or change in that screen population or change in ethnicity? Could all those things affect the algorithm so that you would need to sort of reprogram it or titrate it or change it a little bit, based on using it in a different location with a different set of people?

Speaker 2:

It could. But, that said, it doesn't depend. It depends much more on the differences in the images themselves. You know, I think one way to think about it is if a doctor looking at an image in the United States you know is able to do it correctly, if you transported that doctor to another country, what changes for them when they look at those images? Do those images look qualitatively different, quantitatively different in some?

Speaker 1:

way.

Speaker 2:

You know, do those cultural differences or genetic differences play out in the actual pixels, in the actual image?

Speaker 1:

Yeah, I got it okay, and you're actually bringing up another really interesting point. Um, I don't know if you meant to or not, but I'm gonna, I'm gonna hook on it which is like oh, the camera that you use is important, right? Um, like the manufacturer, the model, if there's wear and tear, if there's a smudge on it or it's also and this is true no matter where you do it but it's the technician who's taking the images. I know there were some in some of these papers we looked at where the AI was like oh, we can't grade this image, we can't tell you. You know, is this mild, moderate, severe? Like you have to go see an ophthalmologist or an optometrist because we can't tell you? And potentially, if you don't dilate the eye or if you have someone with less training or less experience or the room lighting is off, then all of those things can affect the image that is produced.

Speaker 2:

That is a great point. So we've been sort of talking abstractly about culture and genetics and so on as influencing how it manifests. But in reality what the machine is looking at is a bunch of pixels which is sourced from a camera which is placed in a location that is influenced by lighting and all these other things and the quality of the pixels being produced. And all of that plays into the correct image detection and performance. And so, yes, these systems can perform really well on datasets that are nice and clean and we can show 98% performance. But the real test is being deployed in a real situation, with the cameras available to those people and seeing if these systems can perform well in that Now, as a developer or a computer scientist or an AI technician, you can sort of think about this in advance and say, okay, these are the cameras, this is the kind of setting those people are going to be at.

Speaker 2:

Let's create a data set in our lab that, you know, mimics that situation. You want to capture as much as you can of the real problem that you're solving so that your pixels look very similar to the real situation. But that's a difficult problem and it's not straightforward. But you know, I think this particular application of diabetic retinopathy at least from the literature it seems like there's people have deployed it in these places successfully. I think that this is an example of a successful use of AI in a medical setting.

Speaker 1:

And some of the stuff we were looking at was, yeah, in sort of more resource limited settings, and it's like you don't want to overburden the ophthalmology services there because there just aren't enough of them. But even in the United States this is underscreened, and being able to have an image taking at like sort of a routine appointment would be amazing for so many people to figure out. Okay, do I actually need to be screened or not? Do I actually need to go in and see an ophthalmologist or not? Do I need laser or other treatment or not?

Speaker 2:

Absolutely. I mean, and we, you know, we looked at a little some of the literature on this and some of the new stories on this, so we'll link all that in the show notes as well. So people can, you know, kind of dig deeper, to the extent that they want to dig deeper, um, but I think we are, um, you know. So what are your sort of takeaways here, laura? What do you think are some of the things that, uh, folks can take away from this example of the use of AI in a medical setting?

Speaker 1:

Yeah, I mean, I think this is something that could be really big right.

Speaker 1:

This is something that, from these early studies, looks like okay, we're actually ready for prime time in some locations.

Speaker 1:

Obviously, in the US there are some, are some more regulations etc by the fda, and ongoing research is something that's needed right to prevent drift. But this is a great example of how the technology can be used, how the ai can be used to basically collaborate with humans, and we know that not enough people are screened and we know that this is a huge cause of blindness. So if AI could handle that mass screening, if AI could identify people who are at high risk and get those people into care, it could reduce the workload on providers. And then you would have this second step where you need a human, obviously in the loop for things that are complex or things that are ungradable, to optimize efficiency and accuracy and then decide on next steps. If someone needs treatment, they really do need to see a provider. And so the AI is one step in the process here. It's not the end step, but it's something that can help scale screening for this significant health condition.

Speaker 2:

That's great, I mean, yeah, and so I want to sort of close on this note that we have only touched the surface of this really broad and very exciting to be honest, exciting topic within the medical AI space, and obviously there's a whole bunch of questions, both from a technical standpoint how what are the different AI technologies that are used? What is the next step coming up, what are the biggest AI challenges but also medically speaking. You know, how do we get this out there to people? How do we get this deployed effectively? There's so many questions around this and I would love to hear from you guys if you know what questions you want answered or is there anything that is particularly that you want us to dig deeper into?

Speaker 2:

But I think that you know we've sort of scratched the surface and it looks really interesting underneath and I'm very excited that it's actually being used as an AI person myself. Really interesting underneath, and I'm very excited that it's actually being used as an AI person myself. Yeah, and so I, you know I want to do. You have anything else to add on to this, laura?

Speaker 1:

No, I'm, I'm just excited. I convinced you to do this topic because you weren't so sure at first, and now I think you're fully converted. That it was. It was a pretty cool topic, yeah.

Speaker 2:

I really am, because we hear a lot of stories about AI being used in different situations and people are not sure. People are nervous and people don't trust it and they should be cautious and they should not trust everything that you see out there. But here's an example where you can, and it's exciting and there's so much more to read. We'll put most stuff on the show notes, but that's it for now. Thank you so much for joining us and see you next episode.

People on this episode