This project is based on ResNet101 and YOLOv8 to detect the focus that cause high myopia
I do not have much specialize knowledge on ophthalmology and I am doing this because this is a meaningful project to learn and deploy. If there is any problems related to my contents, welcome to pull request or post and issue. Thanks a lot!
In the webui, the user can upload an ultra high definition fundus image and type in the name
The program will run classification model and trained YOLOv8 model to identify the focus (Labeled image and word result)
After identification, the program will summarize all of the data into a pdf file
The dataset can be divided into two parts:
The Classification is mainly classifying the pictures with leopard-spot lesion or not.
There are two directory under classification:
├─dataset
├─classification
├─train <- Training
│ ├─no <- Without leopard-spot lesion
│ └─yes <- With leopard-spot lesion
└─val <- Validation
├─no
└─yes
Focus list:
Name | Label |
---|---|
peripapillary atrophy | PPA |
macular degeneration | MD |
vitreous opacities | weiss |
drusen | DR |
optic disc | OD |
fuchs dystrophy | Fuch |
Peripapillary atrophy describes atrophy or thinning in the layers of the retina and retinal pigment epithelium around the optic nerve in the back of the eye
Age-related macular degeneration is the most common cause of severe loss of eyesight among people 50 and older. Only the center of vision is affected with this disease. It is important to realize that people rarely go blind from it.
Vitreous opacities are floating objects inside the vitreous body. They can be of different sizes, shapes and densities. New objects are treated conservatively, and laser treatment is not usually indicated until the floaters stabilize in size and density.
Drusen bodies are extracellular deposits of lipids, proteins, and cellular debris which are found within the layers of the retina and appear as small, yellow deposits on dilated eye exams.
The optic disc is the round spot on the retina formed by the passage of the axons of the retinal ganglion cells, which transfer signals from the photoreceptors of the eye to the optic nerve, allowing us to see.
Fuchs (pronounced "fooks") dystrophy is an eye disease in which cells lining the inner surface of the cornea slowly start to die off. The disease most often affects both eyes.
Installastion of PyTorch: link
pip install -r requirements.txt
python classification.py
or use jupyter notebook to run
The training result of ResNet18 with pre-trained model:
python yolo.py
or use jupyter notebook to run
The training result of YOLOv8 with pre-trained model yolov8s.pt
:
Usage: python webui.py [options]
A common command: python webui.py
-l --language Language of the UI site