# shubh-bhateja/jaundice_major architecture

> Architecture diagram of the GitHub repository shubh-bhateja/jaundice_major, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shubh-bhateja/jaundice_major
- Repository: https://github.com/shubh-bhateja/jaundice_major

## Overview

This repository is a research project for neonatal jaundice screening, centered on a multimodal model that combines skin-image signals with clinical features to predict bilirubin and risk category. The documented workflow runs from patient data and image preprocessing through model training to dual predictions; separate scripts explore alternative image-classification approaches. The README describes the main notebook pipeline, while sampled source confirms the standalone visual-branch training components. Not all notebook or experiment wiring was inspected, so uncertain connections are omitted.

Main entry points: [`Jaundice_All_files/NeoJaundice/chd_jaundice_published_2.csv`](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/NeoJaundice/chd_jaundice_published_2.csv) (Clinical Records), [`Jaundice_All_files/visual_branch/model_integration.py`](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/model_integration.py) (Multimodal Fusion), [`Jaundice_All_files/visual_branch/data_loader.py`](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/data_loader.py) (Data Matching), [`Jaundice_All_files/development/preprocess_v2.py`](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/development/preprocess_v2.py) (Image Preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Patient Inputs"]
  node_patient["Clinical Records"]
  node_photos(("Skin Photos"))
end

subgraph group_multimodal["Multimodal Pipeline"]
  node_prep["Image Preprocessing<br/>[preprocess_v2.py]"]
  node_sequence["RGB+HSV Sequences<br/>[preprocess_v2.py]"]
  node_fusion["Multimodal Fusion"]
  node_visual_model["1D-CNN Visual Branch<br/>[model_1dcnn.py]"]
  node_predictions["TSB and Risk"]
end

subgraph group_experiments["Alternative Models"]
  node_resnet["ResNet Classifier"]
  node_sota["2D SOTA Experiments"]
  node_jdc_prep["JDC Dataset Prep"]
  node_jdc_model["JDC 2D CNN"]
end

subgraph group_clinical["Clinical Workflow"]
  node_loader["Data Matching<br/>[data_loader.py]"]
  node_generator["Batch Generator<br/>[data_generator.py]"]
  node_trainer["Model Training<br/>[train.py]"]
end

node_photos -->|"preprocesses"| node_prep
node_prep -->|"extracts features"| node_sequence
node_patient -->|"loads records"| node_loader
node_sequence -.->|"matches images"| node_loader
node_loader -->|"builds samples"| node_generator
node_generator -->|"supplies batches"| node_trainer
node_trainer -->|"builds model"| node_fusion
node_fusion -.->|"includes branch"| node_visual_model
node_fusion -->|"predicts outputs"| node_predictions
node_patient -->|"labels images"| node_resnet
node_photos -->|"classifies images"| node_resnet
node_patient -->|"loads metadata"| node_sota
node_photos -->|"builds image cache"| node_sota
node_patient -.->|"prepares dataset"| node_jdc_prep
node_jdc_prep -.->|"feeds experiments"| node_jdc_model

click node_patient "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/NeoJaundice/chd_jaundice_published_2.csv"
click node_prep "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/development/preprocess_v2.py"
click node_sequence "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/development/preprocess_v2.py"
click node_loader "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/data_loader.py"
click node_generator "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/data_generator.py"
click node_trainer "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/train.py"
click node_fusion "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/model_integration.py"
click node_visual_model "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/model_1dcnn.py"
click node_resnet "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/resnet50_classification.py"
click node_sota "https://github.com/shubh-bhateja/jaundice_major/blob/main/hpc_files/sota_2d_neojaundice.py"
click node_jdc_prep "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/JDC_Pipeline/prepare_jdc_dataset.py"
click node_jdc_model "https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/JDC_Pipeline/neojaundice_2dcnn_jdc.py"

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_patient,node_photos toneBlue
class node_prep,node_sequence,node_fusion,node_visual_model,node_predictions toneAmber
class node_resnet,node_sota,node_jdc_prep,node_jdc_model toneMint
class node_loader,node_generator,node_trainer toneRose
```

## Components

### Patient Inputs

- [Clinical Records](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/NeoJaundice/chd_jaundice_published_2.csv): `Jaundice_All_files/NeoJaundice/chd_jaundice_published_2.csv`
- **Skin Photos**

### Multimodal Pipeline

- [Image Preprocessing](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/development/preprocess_v2.py): `Jaundice_All_files/development/preprocess_v2.py`
- [RGB+HSV Sequences](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/development/preprocess_v2.py): `Jaundice_All_files/development/preprocess_v2.py`
- [Multimodal Fusion](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/model_integration.py): `Jaundice_All_files/visual_branch/model_integration.py`
- [1D-CNN Visual Branch](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/model_1dcnn.py): `Jaundice_All_files/visual_branch/model_1dcnn.py`
- **TSB and Risk**

### Alternative Models

- [ResNet Classifier](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/resnet50_classification.py): `Jaundice_All_files/resnet50_classification.py`
- [2D SOTA Experiments](https://github.com/shubh-bhateja/jaundice_major/blob/main/hpc_files/sota_2d_neojaundice.py): `hpc_files/sota_2d_neojaundice.py`
- [JDC Dataset Prep](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/JDC_Pipeline/prepare_jdc_dataset.py): `Jaundice_All_files/JDC_Pipeline/prepare_jdc_dataset.py`
- [JDC 2D CNN](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/JDC_Pipeline/neojaundice_2dcnn_jdc.py): `Jaundice_All_files/JDC_Pipeline/neojaundice_2dcnn_jdc.py`

### Clinical Workflow

- [Data Matching](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/data_loader.py): `Jaundice_All_files/visual_branch/data_loader.py`
- [Batch Generator](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/data_generator.py): `Jaundice_All_files/visual_branch/data_generator.py`
- [Model Training](https://github.com/shubh-bhateja/jaundice_major/blob/main/Jaundice_All_files/visual_branch/train.py): `Jaundice_All_files/visual_branch/train.py`

## Connections

- Skin Photos → Image Preprocessing: preprocesses (evidence: `README.md`)
- Image Preprocessing → RGB+HSV Sequences: extracts features (evidence: `Jaundice_All_files/development/preprocess_v2.py`)
- Clinical Records → Data Matching: loads records (evidence: `Jaundice_All_files/visual_branch/data_loader.py`)
- RGB+HSV Sequences → Data Matching: matches images
- Data Matching → Batch Generator: builds samples (evidence: `Jaundice_All_files/visual_branch/train.py`)
- Batch Generator → Model Training: supplies batches (evidence: `Jaundice_All_files/visual_branch/train.py`)
- Model Training → Multimodal Fusion: builds model (evidence: `Jaundice_All_files/visual_branch/train.py`)
- Multimodal Fusion → 1D-CNN Visual Branch: includes branch
- Multimodal Fusion → TSB and Risk: predicts outputs (evidence: `Jaundice_All_files/visual_branch/model_integration.py`)
- Clinical Records → ResNet Classifier: labels images (evidence: `Jaundice_All_files/resnet50_classification.py`)
- Skin Photos → ResNet Classifier: classifies images (evidence: `Jaundice_All_files/resnet50_classification.py`)
- Clinical Records → 2D SOTA Experiments: loads metadata (evidence: `hpc_files/sota_2d_neojaundice.py`)
- Skin Photos → 2D SOTA Experiments: builds image cache (evidence: `hpc_files/sota_2d_neojaundice.py`)
- Clinical Records → JDC Dataset Prep: prepares dataset
- JDC Dataset Prep → JDC 2D CNN: feeds experiments
