How lokeshbhaskarnr/dermaevolve---an-advanced-skin-disease-predictor works
Project Type and Purpose
• DermaEvolve is a monolithic, full-stack machine learning web application.
• Purpose: Allow users to upload skin‐lesion images via a Streamlit UI, preprocess them, run inference with one of several pre-trained CNN models, and display the predicted skin disease and confidence score in real time.
File-Structure Analysis
• Top-level artifacts:
• app.py – the Streamlit application entry point (UI + controller logic)
• Android_Compatible_models – collection of .tflite models for mobile deployment
• assets – static assets used by the UI
• Dataset_Sample & Dataset_And_Models_Analytics – offline data and Jupyter notebooks (for training/analysis)
• requirements.txt – dependency list
• .streamlit/config.toml & .devcontainer – environment configuration
• No separate “backend” or “frontend” directories: the Streamlit app handles both.
README Insights
• Technologies: Streamlit (web UI), TensorFlow (model loading + inference), OpenCV/Pillow (image preprocessing), NumPy/Matplotlib (data handling + visualization).
• Models supported: MobileNet, NASNet, Custom CNN, ResNet50, DenseNet169.
• Usage flow: image upload → preprocessing → model selection → inference → result display.
Main Components & Relationships
a. Streamlit Web UI
• Handles user interactions: image upload form, model-selection dropdown, “Predict” button, result display.
b. Preprocessing Module
• Uses OpenCV/Pillow to resize, normalize, and convert image to tensor form.
c. Model Inference Engine
• Loads TensorFlow models (from local storage: Android_Compatible_models or SavedModel files)
• Runs forward pass to produce predictions.
d. Local Model Storage
• Directory of .tflite and other model artifacts.
e. Result Renderer
• Streamlit components to show class label + confidence, confusion matrices (via Matplotlib).
f. (Optional) Offline Analytics
• Jupyter notebooks reading Dataset_Sample for data visualization and model comparison.
Interaction Flow:
User → Streamlit UI → Preprocessing Module → Model Inference Engine → Result Renderer → User
Architectural Patterns & Principles
• Monolithic ML-app pattern: single container (configured by .devcontainer) runs UI + inference.
• Separation of concerns: UI vs. preprocessing vs. inference vs. rendering.
• Extensibility: adding a new model means dropping its artifact into Android_Compatible_models and updating app.py.