How aipi540spring2025avengers/retinal-fundus-disorder-detection works
Main Components
• User Interface: Represented by main.py, which launches the Streamlit web app. This component accepts user image uploads and displays prediction results from all approaches.
• Data Management: Include the data directory and its subdirectories for raw, processed, and output data. This is the central repository for the retinal images and results used for both training and inference.
• Machine Learning Pipelines:
• Naïve Approach: Illustrated by scripts/naive containing the rule-based classifier logic. It uses image properties such as edge density and brightness.
• Deep Learning: Under scripts/deep, the deep learning model training is handled (using an EfficientNet-B4 based CNN). Pre-trained deep models (as seen with mobilenetv3.pth in the models directory) should be clearly indicated.
• Notebooks: The notebooks directory (with EDA.ipynb and naive_eva.ipynb) shows exploratory analysis and validation, useful for illustrating where experimentation and diagnostics occur.
Relationships and Interactions
• Model Artifacts: Connect the training scripts (in the scripts folders) with the models directory to show how models get saved and later loaded by the inference routines.
• Integration: Tie the outputs from the pipelines back to the Streamlit UI (main.py), which collates the predictions and displays them to the user.
Architectural Patterns and Design Principles
• Separation of Concerns: Different pipelines are separated into discrete directories (naive, traditional, deep), clearly indicating modular design.
• Reusable Components: The central data folder, configuration files (requirements.txt, packages.txt), and setup scripts (setup.sh) show that the project is designed to be reproducible and maintainable.
Relevant Technologies and Frameworks
• Python scripts for algorithmic implementations.
• Streamlit for the user interface.
• Various ML libraries (likely scikit-learn for SVM and PCA, Torch for deep learning models, and OpenCV/numpy for image pre-processing in the naive approach).
• EfficientNet-B4 architecture for deep learning.
Implementation Strategy
• For each processing pipeline, break it down further to showcase sub-stages: pre-processing, model inference, and output.
• Incorporate notes (possibly annotations) that mention critical dependencies like the setup.sh environment initialization, the importance of GPU/TPU for deep learning model training, and the use of pre-trained models.