How tirth27/skin-cancer-classification-using-deep-learning works
Main system components
• Data Layer: This comprises the directories for both raw and processed data. Include components for “Raw CSV’s” (with subdirectories for 2018, 2019, and 2020), “Processed CSV’s” (the combined training/validation CSV files), “Augmented Sample Images,” and “Sample Images.” This layer represents your data ingestion and cleaning sources.
• Pre-processing & Data Augmentation Pipeline: Use the Notebooks (Data Preprocessing and Data Augmentation) and parts of the Src folder for data cleaning, cropping/resizing images, and applying augmentation transformations. Indicate components that deal with CSV updates for patient-level details and image cropping (e.g., 768x768 → 512x512 or similar).
• Model Training Pipeline: Represent the “Src/Model Training” folder which holds scripts like main_run.py, pre_train.py, and supporting modules (model_param.py, utils.py). This section should capture:
– Data loading from disk (reading images and CSVs).
– On-the-fly augmentation applied on the CPU.
– Forward pass through the CNN models (EfficientNet B4, B5, B7) on the GPU.
– Training loop with validation checkpoints and early stopping (as described in Figure 6 of the README).
– Logging and storing diagnostic/model logs.
– The ensemble mechanism where predictions are averaged.
• Model Optimization & Deployment: Include the conversion of raw models to the ONNX format for optimized serving. Show that the workflow first “trains model weights” then “converts to ONNX” (reducing weight size by 36%) before deployment.
• Inference and Web UI: Illustrate the web UI architecture as described in Figure 7 and subsequent figures. This component describes:
– Client-side: A GUI that includes patient detail form input (demographics) and image upload. Mention client-side validation (using JQuery) and the PDF report generation functionality.
– Server-side: The stateless inference service which receives validated data, loads the ONNX model, performs inference, and returns a JSON response with probability values for the nine target classes.
– The integration point between the user input and the deep learning model serving.
Inter-component relationships
• Data flows (CSV files, image files, logs) and model flows (training weights, ONNX conversion).
Important architectural patterns and design principles
• Separation of concerns: Distinction between data handling, model training, and the user interface.
• Hybrid compute usage: Explain that data augmentation is executed on the CPU, and the heavy CNN computation is performed on GPUs.
• Extensibility: Notate that additional configurations – as seen in Table 4 – could be added to the ensemble, indicating scalability.
• Interoperability: Emphasize the conversion to ONNX to support cross-hardware deployment in the production CAD system.
Relevant technologies and frameworks
• EfficientNet variants are the backbone of the CNN models.
• Onnx for model serving.
• Python notebooks (for EDA, preprocessing, augmentation).
• GitHub actions and issue templates as evidenced by the .github folder.
• Azure Compute/AKS for deployment (as mentioned for compute instance creation).