Georeactor Blog

RSS Feed

An unexpected dive into fundus photography and ML

Tags: prosemlhealthmetaphysics

Can computer vision tell a choroidal nevus from a melanoma?

This week, I went to an optometrist and we reviewed Mars-like images of the back of my eyeball, using the latest in a 100-year-old field known as fundus photography (this was quite cool; the article includes a few photos).

A choroidal nevus is a mole which occurs in an eye of ~5% of white American adults (one article said an eye doctor sees them daily). A specialist needs to review the location, size, thickness, and internal fluid compared to any previous images to estimate the risk of this interfering with vision or becoming a melanoma. Because I have been putting off eye appointments for years, we don't have context and it's a bit sketchy for now. Looking through datasets of similar cases has put my mini nevus into context and been something of a relief. Considering how common these are, it is quite rare for them to become cancerous. I decided to do a deep dive into ML data around this detection.

Existing Models and Survey Papers

There is HuggingFace content which mentions melanoma and nevus classes, but these typically focus on skin cancer. Similarly the study Distinguish the Value of the Benign Nevus and Melanomas Using Machine Learning: A Meta-Analysis and Systematic Review is in dermatology.

Early this year, two people uploaded fundus-related Spaces:


After failing to turn up data on HuggingFace, I found a 2018 ICML workshop on nevus photos, which draws from 28,000 images hosted by the American Society of Retina Specialists (ASRS), coincidentally based in Chicago. Only 131 are specifically tagged with choroidal nevus, with just two in the past year (is this site losing momentum?).

A good deal of research into fundus imaging focuses on screening patients for diabetic retinopathy, "the most common cause of blindness in working-age adults". EyePACS currently has over 5 million images related to this screening. Kaggle hosted a competition with them in 2015, and with a separate group (Aravind Eye Hospital, which does screenings across India) in 2019. The community posted a resized and cropped combination of the datasets here:


A White Paper on Ophthalmic Imaging for Choroidal Nevus Identification and Transformation into Melanoma notes the difficulty of this problem:

Using fundus photographs taken with a specific digital fundus camera with a preset width of field, image magnification, and resolution, and from patients of similar race could add bias to the results, precluding their generalizability

The recent Cleveland Clinic paper A Prediction Model to Discriminate Small Choroidal Melanoma from Choroidal Nevus is highly relevant, but suffers from a small private dataset (123 training, 240 validation from another clinic taken between 1997–2001, half of these positive melanomas; half stable for 2+ years). After a closer read of the paper, measurements and other patient info (such as sex) are entered into a tabular model. When analyzing feature importance, they get the same variables that you'd expect from reading other articles on the condition:

Patients with melanoma were significantly younger, more frequently male, more frequently presented with symptoms, more frequently located closer to the optic disc and fovea, had a larger largest basal diameter and height, more frequently had SRF and orange pigment, and less frequently had drusen

I assume the measurements came from optometrists or trainees, so I wonder if they could measure without bias for whether it looked good or bad to them overall?
In a press release, an author of the paper discussed the potential of a model to reduce overtreatment (estimated 25% in retrospective cases).

A new paper Explaining Eye Diseases Detected by Machine Learning Using SHAP: A Case Study of Diabetic Retinopathy and Choroidal Nevus came out last month, but I don't have access.

I picked up on three main reasons for choroidal nevus vs. melanoma being under-researched:

Aside on probability

A patient walks into an optometrist after several years with a previously undetected choroidal nevus and no other issues. From the doctor's perspective, this looks like a developing problem. When I booked a follow-up, she wrote "4–6 weeks is the latest I would get seen for this".

From my perspective, within 10 days I hitched a ride with a man having an eye problem, got pestered about not using my health benefits, watched a video about the view from an upcoming hike, decided to get new glasses now that I've settled down, then this happened. Most of that was medically irrelevant, but from my perspective the optometrist visit was not a red flag, and finding a time-sensitive problem in this chain of events would be wild.

Anyway I'll agree to keep monitoring (really struggling not to say "keep an eye on it"). I think this could be a case study on Bayesian probability. For example: