The core model is a dual-head EfficientNet-B0 that jointly performs: Binary classification — Anemic vs. Non-Anemic Regression — estimated hemoglobin (Hb) level in g/dL Also, it actually integated with Generative...
Model source
Source description
The core model is a dual-head EfficientNet-B0 that jointly performs:
from a single image of the palpebral conjunctiva, captured via a smartphone camera. The model is part of the Conjify self-screening ecosystem (), developed for the Statistics Essay Competition (SEC) Satria Data 2026.
Sources
1 sourceVerified Sep 9
Model artifacts
1 artifactSource excerpts
2 excerptsDropout → Linear(1280→1) → Sigmoid1280 → 512 → 128 → 1 (predicts Hb, z-score normalized during training, denormalized at inference)L = 0.6 · L_cls + 0.4 · L_reg (BCE with class weighting + MSE)conv_head layer; coverage, intensity, and mean activation statistics are extracted from the activation map and passed downstream as structured context for an LLM interpretation layer (Llama 3.3 70B in the full Conjify pipeline).CP-AnemiC (Appiahene et al., 2023) — a public conjunctival pallor dataset collected from pediatric subjects in Ghana, with laboratory-confirmed Hb values as ground truth.
| Anemic | Non-Anemic | Total | |
|---|---|---|---|
| Samples | 424 (59.7%) | 286 (40.3%) | 710 |
| Mean Hb (g/dL) | 8.94 | 12.41 | 10.36 |
| Std Hb (g/dL) | 1.87 | 1.12 | 2.26 |
Split: 568 train (80%) / 142 validation (20%), stratified to preserve class balance.
Evaluated on the 142-sample validation split, using the checkpoint with the lowest validation loss.
Classification
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| Non-Anemic | 0.74 | 0.93 | 0.82 | 57 |
| Anemic | 0.94 | 0.78 | 0.85 | 85 |
| Accuracy | 0.84 | 142 | ||
| Weighted avg | 0.86 | 0.85 | 0.84 | 142 |
Regression (Hb estimation)
These regression errors are precise enough to separate severe anemia (Hb < 8 g/dL) from mild–moderate cases for screening purposes, though not yet precise enough for clinical diagnosis.
This model is intended as a non-invasive, self-screening aid for anemia risk, to be used alongside an LLM interpretation layer that translates raw predictions and Grad-CAM statistics into actionable, plain-language health guidance.
It is not a diagnostic device. It does not replace laboratory hemoglobin testing or clinical evaluation. See the Limitations below.
Example assumes a PyTorch implementation with a custom dual-head wrapper around
efficientnet_b0. Adjust to match your actual checkpoint format/framework.
import torch
from PIL import Image
from torchvision import transforms
model = torch.load("conjify_dual_head_effnetb0.pt", map_location="cpu")
model.eval()
preprocess = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]),
])
img = Image.open("conjunctiva.jpg").convert("RGB")
x = preprocess(img).unsqueeze(0)
with torch.no_grad():
cls_logit, hb_pred = model(x)
prob_anemic = torch.sigmoid(cls_logit).item()
print(f"Anemic probability: {prob_anemic:.3f}")
print(f"Estimated Hb: {hb_pred.item():.2f} g/dL")
If you use this model, please cite both the original dataset and the conference paper:
Dataset:
@article{appiahene2023cpanemic,
title = {CP-AnemiC: A conjunctival pallor dataset and benchmark for anemia detection in children},
author = {Appiahene, P. and Chaturvedi, K. and Asare, J. W. and Donkoh, E. T. and Prasad, M.},
journal = {Medicine in Novel Technology and Devices},
volume = {18},
pages = {100244},
year = {2023},
doi = {10.1016/J.MEDNTD.2023.100244}
}
Conference paper (if published in proceedings): Please refer to the National Conference 2026 proceedings for the full citation when available.
This model is a research prototype developed for a conference paper (National Conference STIS 2026). It is not a certified medical device and should not be used as a substitute for professional medical advice, diagnosis, or treatment. The model is intended for educational and screening research purposes only, pending clinical validation and potential publication in peer-reviewed proceedings.
--- license: mit tags: - image-classification - regression - computer-vision - medical-imaging - anemia-detection - efficientnet - healthcare - multi-task-learning pipeline_tag: image-classification --- # Explainable Dual-Head EfficientNet-B0 for Anemia Detection The core model is a **dual-head EfficientNet-B0** that jointly performs: 1. **Binary classification** — Anemic vs. Non-Anemic 2. **Regression** — estimated hemoglobin (Hb) level in g/dL 3. Also, it actually integated with Generative models (soon to be) from a single image of the palpebral conjunctiva, captured via a smartphone camera. The model is part of the Conjify self-screening ecosystem ([conjify.netlify.app](https://conjify.netlify.app)), developed for the Statistics Essay Competition (SEC) Satria Data 2026. ## Model Description - **Backbone:** EfficientNet-B0, pretrained on ImageNet - **Parameters:** 5.3M - **Model size:** 21 MB - **Shared representation:** 1,280-dim feature vector from the final global average pooling layer - **Classification head:** `Dropout → Linear(1280→1) → Sigmoid` - **Regression head:** MLP `1280 → 512 → 128 → 1` (predicts Hb, z-score normalized during training, denormalized at inference) - **Combined loss:** `L = 0.6 · L_cls + 0.4 · L_reg` (BCE with class weighting + MSE) - **Interpretability:** Grad-CAM applied on the `conv_head` layer; coverage, intensity, and mean activation statistics are extracted from the activation map and passed downstream as structured context for an LLM interpretation layer (Llama 3.3 70B in the full Conjify pipeline). ## Training Procedure - **Optimizer:** AdamW with Cosine Annealing learning rate schedule - **Strategy:** Progressive unfreezing in two phases - Phase 1: backbone frozen, only the two heads trained (stable initialization) - Phase 2: full fine-tuning of backbone + heads - **Input:** RGB images resized to 224×224, normalized with ImageNet statistics - **Augmentation:** applied on the training split to improve robustness to lighting/orientation variation typical of in-field conjunctiva photos - **Target normalization:** Hb values z-score normalized before regression to keep both loss terms on comparable scales ## Training Data [**CP-AnemiC**](https://doi.org/10.1016/J.MEDNTD.2023.100244) (Appiahene et al., 2023) — a public conjunctival pallor dataset collected from pediatric subjects in Ghana, with laborator...
Source context: 15 downloads · 0 likes · Pipeline image-classification · Repo galihkjaya/anemia-palor-detection