How gamal1osama/teeth_diseases_classification_cnn works
Project Type and Purpose
• This is a deep‐learning‐powered image classification system specifically designed for classifying teeth diseases.
• It consists of two logical layers:
• An offline “model development” pipeline (data preprocessing, model training, evaluation)
• An online “serving” layer (a Streamlit web app for real-time inference)
File Structure Analysis
• Top-level directories:
• Building The Classifiers From Scratch/ → Jupyter notebook + configs + best‐model artifacts for a custom CNN.
• VGG16/ → Jupyter notebook + history pickle for fine-tuned VGG16.
• Xception/ → Jupyter notebook + model file + history for fine-tuned Xception.
• Deployment/ → Streamlit app (app.py) and static assets used at inference time.
• Paper About The Problem/ → research PDFs and summaries (context, not part of runtime).
• Configuration/build files:
• requirements.txt → Python dependencies
• .devcontainer/ → VSCode dev container configuration
• Patterns:
• Separation of concerns: each modeling experiment in its own directory
• Clear divide between “development” notebooks and “deployment” code
README Insights
• Highlights three CNN architectures: custom, VGG16, Xception
• Emphasizes data preprocessing, model training & evaluation metrics (F1-score)
• Mentions a Streamlit web application for real-time inference
a. Main Components
1. Data Store (raw tooth images; assumed stored on disk or cloud)
2. Preprocessing & Training Module
• Custom CNN notebook
• VGG16 notebook
• Xception notebook
3. Model Artifacts Storage
• .pkl and .keras files located in each model folder
4. Inference / Serving Layer
• Streamlit app (Deployment/app.py)
5. Dev Container (optional)
• Docker/VSCode devcontainer.json for local consistency
b. Relationships & Data Flow
1. Raw Images → Preprocessing pipelines (notebooks)
2. Preprocessed Data → Training (custom CNN, VGG16, Xception)
3. Training → Model Artifacts (saved to disk)
4. Streamlit App loads Model Artifacts → User-uploaded Image → Prediction → UI
5. (Optional) Devcontainer provides a reproducible dev environment for both training and serving
c. Architectural Patterns & Principles
• Modular experimentation: isolating each architecture in its own folder
• Batch training offline vs. online inference separation
• Use of transfer learning for VGG16 and Xception
• Configuration-driven pipeline (pickle config files for preprocessing, augmentations)
d. Key Technologies & Frameworks
• Python, Jupyter Notebooks
• TensorFlow / Keras
• Streamlit for web UI
• Pickle for config/model serialization
• Docker/Devcontainer for environment consistency
Diagramming Recommendations
• Raw Data → Preprocessing → Training → Artifacts → Inference → User
• Blue = Offline components (notebooks, training pipeline)
• Green = Online components (Streamlit app, UI)
• Gray = Supporting infra (Devcontainer, requirements.txt)
• Compute (training jobs, notebooks)
• Storage (model files, pickles)
• User interface (web UI)