A deep learning of Deep Learning

Shivan Sivakumaran
2 min readSep 4, 2021

In the previous newsletter, before my declared absence, we talked about what is an algorithm. We ended by having the problem of grading diabetic retinal images — a task that is not as easy as sorting people’s names!

Grading retinal images for diabetic retinopathy (DR) is an image classification problem. We have images, and we need to grade them into these possible categories: healthy, background DR referrable DR.

Why is this useful?

In Aotearoa, 250,000 people have diabetes and a quarter have DR. Fortunately, individuals with diabetes are screened with routine retinal imaging taken at least biennially. But, unfortunately, that’s a lot of images to grade! On top of this, grading these images requires experts — of which there are too few.

Can AI plug this gap?

But first, what is deep learning? Deep learning is a subset of machine learning. Machine learning is where computers are programmed to learn from data. Machine learning includes methods from statistics like regression and optimisation from calculus.

Deep learning takes these mathematics principles to the next level. Taking inspiration from the human brain’s architecture, deep learning involves virtual neurons that interact and interconnect. An example of what deep learning can do is classify images.

Photo by me. A diagram of a basic neural network

Images are translated into a pixel by pixel array. This is then fed to the input layer. The input layer connects to intermediate or hidden layers, which respond to certain elements of the image. The earlier layers respond to edges and diagonals, while the latter hidden layers respond to more complicated elements in the image. In the end, an output layer provides the result (e.g. cat or dog).

The deep learning model is able to respond in this way because it has been trained on known images. This means well-curated data is needed to train the model, so it responds in the way we want.

Let’s create our own image classier. The task is to classify metal frames and acetate frames. We collect this data using Bing Image Search.

However, we can see that this isn’t perfect. We get metal frames, but not the ones that we were quite thinking about.

Metal frames…

Back to the drawing board… Gathering data is difficult. In the next newsletter, we will dive deeper into deep learning. Let’s change the scope of what we are learning by detecting blue eyes and brown eyes.

Thanks for reading and looking forward to the next one.

--

--