# pratikmane-2005/blood-cell-cancer-detection1 architecture

> Architecture diagram of the GitHub repository pratikmane-2005/blood-cell-cancer-detection1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pratikmane-2005/blood-cell-cancer-detection1
- Repository: https://github.com/pratikmane-2005/blood-cell-cancer-detection1

## Overview

#### Purpose and Scope
This is a notebook-centric deep-learning experiment for classifying blood-cell images with a CNN. Despite its “blood cancer detection” name, the documented dataset contains 17,092 images of normal blood cells; the stated model output is a predicted cell type. The entire implementation and execution surface is the Jupyter notebook: `blood-cell-cancer-detection.ipynb`.

#### Entry Point and Runtime
Run `blood-cell-cancer-detection.ipynb` in a Python 3 Jupyter environment. The notebook is expected to use TensorFlow/Keras for model construction and training, NumPy for array handling, and Matplotlib for visualization. There is no packaged application, API, command-line entry point, deployment artifact, or persistent service visible in the repository.

#### External Data Boundary
Training data is not versioned in the repo. It is obtained externally from the Kaggle dataset identified in `README.md` and must be made available to the notebook runtime before data loading and training can occur. Dataset location, class-folder structure, preprocessing, and train/validation split behavior are notebook-owned concerns: `blood-cell-cancer-detection.ipynb`.

#### Data Preparation Stage
The notebook is the boundary where raw blood-cell image files are converted into model-ready tensors and labels. This stage likely encompasses image decoding, resizing/normalization, label derivation from dataset classes, and partitioning into training and validation data. Its outputs feed both model fitting and validation evaluation: `blood-cell-cancer-detection.ipynb`.

#### CNN Model Stage
The central computational component is a Keras/TensorFlow convolutional neural network. The documented architecture follows the conventional image-classification pipeline: convolutional feature-extraction layers followed by fully connected classification layers. Model topology, optimizer/loss selection, and output-class mapping are defined in `blood-cell-cancer-detection.ipynb`.

#### Training and Evaluation Flow
Primary control flow is: acquire Kaggle images → prepare labeled train/validation inputs → construct CNN → optimize parameters against training loss → evaluate validation accuracy → inspect predictions/visualizations. The README reports validation accuracy above 99%, but no separate saved weights, metrics store, or reproducibility pipeline is present. Training and evaluation remain coupled in `blood-cell-cancer-detection.ipynb`.

#### Inference and Output Boundary
Inference is described as supplying a blood-cell image and receiving a cell-type prediction. In practice, this capability exists only insofar as the trained in-memory notebook model and preprocessing steps are available. No standalone model serialization, serving endpoint, batch inference program, or clinical integration is represented by `blood-cell-cancer-detection.ipynb` or `README.md`.

Main entry points: [`blood-cell-cancer-detection.ipynb`](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb) (Experiment Notebook), [`README.md`](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/README.md) (Kaggle Blood-Cell Images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_notebook["Jupyter Notebook"]
  node_runtime{{"Python 3 Jupyter<br/>runtime"}}
  node_notebook_file["Experiment Notebook"]
  node_tensorflow["TensorFlow / Keras<br/>ML framework"]
  node_numpy["NumPy<br/>array library"]
  node_matplotlib["Matplotlib<br/>visualization library"]
end

subgraph group_ml["ML Workflow"]
  node_raw_images["Raw Image Files<br/>dataset input"]
  node_preparation["Image Preparation<br/>data pipeline"]
  node_train_data["Training Tensors<br/>prepared data"]
  node_validation_data["Validation Tensors<br/>prepared data"]
  node_cnn["CNN Classifier<br/>Keras model"]
  node_training["Model Training<br/>optimization loop"]
  node_trained_model["In-Memory Trained Model<br/>runtime model"]
  node_evaluation["Validation Evaluation"]
  node_visualization["Prediction Visualizations<br/>notebook output"]
  node_cell_prediction["Cell-Type Prediction<br/>inference output"]
end

node_kaggle_dataset[("Kaggle Blood-Cell Images<br/>external dataset<br/>[README.md]")]

node_runtime -->|"runs"| node_notebook_file
node_notebook_file -.->|"uses"| node_tensorflow
node_notebook_file -.->|"uses"| node_numpy
node_notebook_file -.->|"uses"| node_matplotlib
node_kaggle_dataset -->|"acquired and mounted"| node_raw_images
node_notebook_file -->|"orchestrates"| node_preparation
node_raw_images -->|"loads"| node_preparation
node_preparation -->|"creates"| node_train_data
node_preparation -->|"creates"| node_validation_data
node_notebook_file -->|"defines"| node_cnn
node_tensorflow -->|"implements"| node_cnn
node_train_data -->|"fits"| node_training
node_cnn -->|"optimizes"| node_training
node_training -->|"produces"| node_trained_model
node_trained_model -->|"evaluates"| node_evaluation
node_validation_data -->|"validates"| node_evaluation
node_evaluation -->|"plots results"| node_visualization
node_trained_model -->|"predicts"| node_cell_prediction
node_preparation -.->|"preprocesses input"| node_cell_prediction
node_matplotlib -->|"renders"| node_visualization

click node_notebook_file "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_kaggle_dataset "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/README.md"
click node_raw_images "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_preparation "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_train_data "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_validation_data "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_cnn "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_training "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_trained_model "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_evaluation "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_visualization "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"
click node_cell_prediction "https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runtime,node_notebook_file,node_tensorflow,node_numpy,node_matplotlib toneBlue
class node_raw_images,node_preparation,node_train_data,node_validation_data,node_cnn,node_training,node_trained_model,node_evaluation,node_visualization,node_cell_prediction toneAmber
class node_kaggle_dataset toneNeutral
```

## Components

### Jupyter Notebook

All implementation and execution remain in one notebook.

- **Python 3 Jupyter**: runtime
- [Experiment Notebook](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): notebook · Single entry point for data, training, evaluation, and inference. · `blood-cell-cancer-detection.ipynb`
- **TensorFlow / Keras**: ML framework
- **NumPy**: array library
- **Matplotlib**: visualization library

### ML Workflow

- [Raw Image Files](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): dataset input · Dataset class folders made available to the notebook runtime. · `blood-cell-cancer-detection.ipynb`
- [Image Preparation](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): data pipeline · Decodes, resizes, normalizes, labels, and partitions images. · `blood-cell-cancer-detection.ipynb`
- [Training Tensors](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): prepared data · `blood-cell-cancer-detection.ipynb`
- [Validation Tensors](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): prepared data · `blood-cell-cancer-detection.ipynb`
- [CNN Classifier](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): Keras model · Convolutional feature extraction followed by dense cell-type classification. · `blood-cell-cancer-detection.ipynb`
- [Model Training](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): optimization loop · Optimizes CNN parameters against training loss. · `blood-cell-cancer-detection.ipynb`
- [In-Memory Trained Model](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): runtime model · No separate saved model artifact is represented. · `blood-cell-cancer-detection.ipynb`
- [Validation Evaluation](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): evaluation · Computes validation accuracy and predictions. · `blood-cell-cancer-detection.ipynb`
- [Prediction Visualizations](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): notebook output · Notebook plots for inspecting predictions and results. · `blood-cell-cancer-detection.ipynb`
- [Cell-Type Prediction](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/blood-cell-cancer-detection.ipynb): inference output · Available only while notebook preprocessing and trained model are in memory. · `blood-cell-cancer-detection.ipynb`

### Other components

- [Kaggle Blood-Cell Images](https://github.com/pratikmane-2005/blood-cell-cancer-detection1/blob/main/README.md): external dataset · 17,092 normal blood-cell images acquired outside the repository. · `README.md`

## Connections

- Python 3 Jupyter → Experiment Notebook: runs
- Experiment Notebook → TensorFlow / Keras: uses
- Experiment Notebook → NumPy: uses
- Experiment Notebook → Matplotlib: uses
- Kaggle Blood-Cell Images → Raw Image Files: acquired and mounted
- Experiment Notebook → Image Preparation: orchestrates
- Raw Image Files → Image Preparation: loads
- Image Preparation → Training Tensors: creates
- Image Preparation → Validation Tensors: creates
- Experiment Notebook → CNN Classifier: defines
- TensorFlow / Keras → CNN Classifier: implements
- Training Tensors → Model Training: fits
- CNN Classifier → Model Training: optimizes
- Model Training → In-Memory Trained Model: produces
- In-Memory Trained Model → Validation Evaluation: evaluates
- Validation Tensors → Validation Evaluation: validates
- Validation Evaluation → Prediction Visualizations: plots results
- In-Memory Trained Model → Cell-Type Prediction: predicts
- Image Preparation → Cell-Type Prediction: preprocesses input
- Matplotlib → Prediction Visualizations: renders
