How souhib-khalbous/breast-cancer_-computer-vision works
• A BI-RADS classification pipeline to classify breast images based on the BI-RADS type.
• An object detection and segmentation pipeline aimed at identifying key features such as calcifications and masses, likely using U-Net–based models.
Main Components
a. BI-RADS Classification Pipeline:
• Training Module ("BI-RADS Type Classification Task/Train-classification"): Contains multiple Jupyter notebooks that describe different models (e.g., variants of Combined-Model with ConvNext and Swin) used for training.
• Inference Module ("BI-RADS Type Classification Task/Inference"): Includes notebooks for different inference tasks, such as preprocessing (PreprocessInference.ipynb), image conversion (pngConverter.ipynb), and the main inference procedure (Inference.ipynb). Also, there are JSON configuration or pixel mapping files.
b. Object Detection Pipeline:
• Preprocessing Stage ("Object Detection/Stage.1_First"): Preprocessing notebooks that likely prepare the data.
• Middle Stage (“Object Detection/Stage.2_Middle”): Loads models and performs key segmentation steps using U-Net models for both calcification and mass detection.
• Final Stage (“Object Detection/Stage.3_Final”): Updates JSON outputs or integrates the results (Json_Updator_code.ipynb).
• U-Net Model Components (“Object Detection/U-Net Models files”): Notebooks that explain the U-Net architecture for both calcification and mass.
• Model Weights (h5 Files): Stores the trained model parameters in organized folders to separate “Best h5” from custom training results.
c. Shared or Supporting Elements:
• Common configuration and readme files that help outline project metadata.
• Potential utility scripts (e.g., Pixelers.json file and additional outputs.json) which might serve as connectors or configuration mechanisms between different steps.
Relationships and Data Flow
a. For the Classification Pipeline:
• An entry point for input images that flow into a preprocessing step.
• Branch the process into two paths: one for training and one for inference.
• For inference, illustrate how input images (or batches) are preprocessed and then run through the trained models to output BI-RADS classification results.
b. For the Object Detection Pipeline:
• Out the three clear processing stages (Stage 1: Preprocessing, Stage 2: Model Loading/Processing, Stage 3: Output Integration).
• Within Stage 2, explicitly differentiate between the calcification and mass detection submodules – each loading their respective U-Net models.
• Detections to a final module that updates or consolidates findings (using JSON updation).
Architectural Patterns and Design Principles
a. Separation of concerns: The project separates training from inference. Similarly, the object detection pipeline is divided into distinct stages (preprocessing, processing, and post-processing).
b. Modular design: Components like U-Net model definitions and the multiple notebooks for training different models indicate a design that supports experimentation and extensibility.
c. Pipeline architecture: Each task (classification and detection) follows a pipeline or staged approach that allows one stage’s output to be the next stage’s input.
Technologies, Frameworks, and File Artifacts
a. Clearly mention that the system relies on Jupyter notebooks for high-level orchestration of tasks.
b. That the deep learning models use modern architectures such as ConvNext, Swin Transformer, and U-Net.
c. That model weights are stored in .h5 files, indicating the use of frameworks like Keras or TensorFlow.
Elements
– Data input → Preprocessing → Model Training/Inference → Output generation.
d. Annotations or comments to each component as needed to denote:
– The file type (Jupyter notebooks, h5 files, JSON configuration),
– The role of the component in the overall workflow.