How prem-buraga/diabetic-retinopathy works
Main Components
• Frontend Application: Represented by app.py and the two HTML templates (index.html and result.html) which facilitate image uploads and display results.
• Deep Learning Model: Include the trained model file (Model.h5) and testing script (Model_Test.py) which encapsulate the core image classification logic.
• Data Processing & Analysis: Depicted by the exploratory notebook (dv_project.ipynb) which is used for EDA and data preprocessing steps.
Relationships and Interactions
• The Frontend interacts with the Backend: When a user uploads a retinal image via the Flask web interface, app.py routes the image to the backend.
• The Flask app then loads the deep learning model (Model.h5) and performs inference using the logic that is tested in Model_Test.py.
• Results from the model inference are then passed back to the frontend to be displayed in result.html.
• The exploratory analysis and preprocessing (from dv_project.ipynb) inform the model training, and although they may not be part of the live system, they are essential for understanding model development and performance.
• The dataset acts as an input for both training (not detailed in the deployment) and for potential updates to the model.
Architectural Patterns and Design Principles
• Separation of Concerns: Distinct layers for the user interface (templates and Flask routes) and the model inference logic (deep learning model and associated scripts).
• Modularity: Identify the discrete modules—frontend web server, model inference, data preprocessing—that interact through well-defined interfaces (e.g., the HTTP request/response cycle for the web app).
• Reusability and Extensibility: By isolating model testing (Model_Test.py) and EDA (dv_project.ipynb), the system can be extended or updated independently without affecting the deployed web app.
• Python/Flask: For the web server and frontend application (app.py).
• Deep Learning Framework (e.g., TensorFlow/Keras): Implied by the Model.h5 file and the custom DCNN/AlexNet architectures.
• HTML Templates: For rendering the user interface.
• Jupyter Notebook: For EDA and exploring the dataset (dv_project.ipynb).