You need to agree to share your contact information to access this dataset
The information you provide will be collected and stored securely by SEWA Rural to maintain a registry of dataset users. It will not be shared with third parties. Contact: sewarural@ymail.com
Data Access Agreement — SEWA Rural Anemia Dataset
This dataset contains clinical images, video frames, and health data collected from patients at SEWA Rural healthcare facilities in Gujarat, India. All participants provided informed consent. Data has been de-identified using UUID-based pseudonymisation.
By submitting this form and clicking Submit below, you agree to the following terms:
Non-commercial use only. This dataset may only be used for non-commercial scientific research, academic study, or educational purposes. Use in commercial products or services requires explicit written permission from SEWA Rural.
No re-identification. You will not attempt to re-identify any participant from images, metadata, or any combination thereof.
No redistribution. You will not re-host, re-distribute, or publicly share the raw data files without written permission from SEWA Rural.
Attribution required. Any publication, model, or derivative work using this dataset must credit SEWA Rural and cite this dataset as specified in the README.
Data security. You will store and process this data in accordance with applicable data protection regulations including India's DPDP Act 2023 and GDPR where applicable.
Reporting. You will notify SEWA Rural immediately at sewarural@ymail.com if you discover any potential re-identification risk, data quality issue, or privacy concern.
Research only. This dataset is not a clinical diagnostic tool and must not be used as the sole basis for any medical decision.
Your information will be stored securely and used only to maintain a record of dataset users for accountability purposes.
Log in or Sign Up to review the conditions and access this dataset content.
Anemia Detection — Multi-Modal Clinical SEWA Rural Dataset
Organisation: SEWA Rural — Society for Education, Welfare and Action (Rural), Jhagadia, Gujarat, India
Dataset: sewa-rural-care/anemia-survey-dataset
Contact: sewarural@ymail.com
Version: 1.0 — July 2026
Dataset Summary
This dataset supports research into non-invasive, smartphone-based anemia screening applicable to low-resource and rural healthcare settings. It was collected by SEWA Rural — a non-profit primary healthcare organisation serving rural and tribal communities in Gujarat, India since 1968.
Related publication: "Screening for anemia using multi-modal machine learning models on smartphones: protocol for a comparative accuracy study in rural India" — the study protocol underlying this dataset, describing the full data collection design, participant recruitment, and analysis plan. medRxiv preprint, April 2025. medrxiv.org/content/10.1101/2025.04.10.25325591v1
Each participant record contains five imaging modalities:
| Modality | Type | Description |
|---|---|---|
Anemia_Fingernails_Open |
Single image + Camera2 snapshot | Fingernails photographed with fingers spread open |
Anemia_Fingernails_Closed |
Single image + Camera2 snapshot | Fingernails photographed with fingers curled/closed |
Anemia_Conjunctiva |
Single image + Camera2 snapshot | Lower eyelid conjunctiva (primary pallor assessment site) |
Anemia_Tongue |
Single image + Camera2 snapshot | Tongue surface (colour and pallor assessment) |
PPG_Signals |
Multi-frame video sequence + per-frame Camera2 log | Photoplethysmography — fingertip placed over rear camera flash; |
Combined with:
- Complete Blood Count (CBC) laboratory values as haemoglobin ground truth
- HemoCue point-of-care haemoglobin readings (venous and capillary)
- Detailed patient survey data — demographics, symptoms, vitals, comorbidities, physical examination findings, and collection environment
Clinical context: Anaemia affects over 1.6 billion people globally, with disproportionate prevalence in South Asia among women and children in rural settings. Pallor of the conjunctiva, nailbeds, and tongue are well-established clinical signs. This dataset enables AI-driven screening tools deployable at primary healthcare level without laboratory infrastructure.
Supported Tasks
| Task | Relevant Column(s) | Type |
|---|---|---|
| Haemoglobin severity classification | hemoglobin_category |
normal / mild_anemia / moderate_anemia / severe_anemia |
| Haemoglobin value regression | survey_haemoglobin, cbc_hgb_g_dl |
Continuous (g/dL) |
| Clinical sign detection | survey_nail_examination, survey_eye_examination, survey_tongue_examination |
Multi-label |
| PPG-based haemoglobin estimation | ppg_frames + hemoglobin_category / haemoglobin value |
Regression |
| Multimodal fusion (image + PPG + tabular) | All columns | — |
| Device-aware / calibration-aware modelling | camera_meta_*, ppg_frame_metadata |
Camera2 parameters, JSON |
Dataset Structure — Storage Format on Hugging Face
The dataset is stored as ~734 Parquet shard files, each containing 8 participants (one row per participant), rather than one file per participant. This is a deliberate engineering choice, not a simplification: at ~5,872 participants × ~905 media files each, one-file-per-participant would produce several million individual files and tens of thousands of upload commits — both of which exceed Hugging Face Hub limits. Sharding keeps every image, video frame, and piece of metadata for a participant embedded in the same Parquet row, with no loss of information versus the original per-participant folder layout.
sewa-rural-care/anemia-survey-dataset/
│
├── README.md
├── LICENSE.txt
├── DATA_USE_POLICY.md
└── data/
├── shard_00001.parquet ← 8 participants
├── shard_00002.parquet ← 8 participants
├── ...
└── shard_00734.parquet ← final shard (remainder)
You do not need to know which shard a participant is in to use the dataset —
load_dataset() (see Loading the Dataset below)
transparently concatenates all shards into one table, and you query by
patient_uuid like any other column.
metadata Schema — Column Reference
Each row is one participant. survey_* and cbc_* column names are the
original CSV headers, lowercased/underscored (e.g. HGB (g/dL) →
cbc_hgb_g_dl). All survey_*/cbc_* values are stored as strings, even
ones that look numeric — this guarantees one uniform schema across every
shard regardless of occasional placeholder/junk values in the source data
(e.g. "----" for a missing reading). Null-alias values (N/A, empty, -,
--, ----, etc.) are standardised to actual nulls; every other value is
preserved exactly as it appeared in the original CSV. Cast to numeric
yourself where needed, e.g. pd.to_numeric(df["cbc_hgb_g_dl"], errors="coerce").
| Column group | Count | Example | Type |
|---|---|---|---|
patient_uuid |
1 | 00047e5d-... |
string |
survey_* |
62 | survey_haemoglobin, survey_age, survey_gender |
string |
cbc_* |
9 | cbc_hgb_g_dl, cbc_wbc_counts_10_3_ul |
string |
hemoglobin_category |
1 | mild_anemia |
string |
image_conjunctiva / image_fingernails_open / image_fingernails_closed / image_tongue |
4 | embedded JPEG | {bytes, path} (HF Image) |
camera_meta_conjunctiva / _fingernails_open / _fingernails_closed / _tongue |
4 | Camera2 capture settings | JSON string (see below) |
ppg_frames |
1 | ~900 embedded JPEG frames | list[{bytes, path}] (HF Sequence(Image)) |
ppg_frame_metadata |
1 | per-frame sensor readings | JSON string (list of ~900 records) |
ppg_frame_count |
1 | typically 900 | int |
hemoglobin_category thresholds
Derived from survey_haemoglobin, falling back to cbc_hgb_g_dl if the
survey value is missing. These are fixed adult thresholds, not
gender/pregnancy-differentiated:
| Category | Haemoglobin (g/dL) |
|---|---|
normal |
≥ 12.0 |
mild_anemia |
11.0 – 11.9 |
moderate_anemia |
8.0 – 10.9 |
severe_anemia |
< 8.0 |
survey_gender and survey_pregnancy_status are available as separate
columns if you want to apply gender/pregnancy-specific WHO thresholds
yourself.
camera_meta_* JSON structure (single-capture modalities)
Captures Android Camera2 API parameters for the one captured image. A JSON
object keyed by Camera2 parameter name, each value a {result, request}
pair — 131 parameters per image, including frameNumber:
{
"frameNumber": {"result": "146", "request": null},
"android.sensor.sensitivity": {"result": "34", "request": "0"},
"android.lens.aperture": {"result": "1.8", "request": "1.8"},
"android.colorCorrection.gains_red": {"result": "0.5", "request": null},
...
}
ppg_frame_metadata JSON structure
A JSON list, one record per PPG frame (~900 records), 27 fields per record:
[
{
"frameNumber": "36",
"android.sensor.timestamp": "501936371313069",
"android.sensor.exposureTime": "19990000",
"android.sensor.sensitivity": "227",
"android.colorCorrection.gains_red": "0.5",
...
},
...
]
The ppg_frames list is index-aligned with ppg_frame_metadata:
ppg_frames[i] corresponds to ppg_frame_metadata[i], both sorted by frame
number. Each frame image's path field also carries its true original
filename (see below).
Reconstructing the Original Folder Layout
If you need the original per-participant folder structure (e.g. to plug into tooling built around the raw SEWA Rural export format) rather than working with the Parquet rows directly:
<participant-uuid>/
├── Survey_Data/
│ ├── Survey_Details.csv
│ └── CBC_Report.csv
└── Media/
├── Anemia_Fingernails_Open/
│ ├── Participant<UUID>_Anemia_Fingernails_Open_0_v2s1.jpeg
│ └── Participant_<UUID>_Anemia_Fingernails_Open_v2s1.tsv
├── Anemia_Fingernails_Closed/
│ ├── Participant<UUID>_Anemia_Fingernails_Closed_0_v2s1.jpeg
│ └── Participant_<UUID>_Anemia_Fingernails_Closed_v2s1.tsv
├── Anemia_Conjunctiva/
│ ├── Participant<UUID>_Anemia_Conjunctiva_0_v2s1.jpeg
│ └── Participant_<UUID>_Anemia_Conjunctiva_v2s1.tsv
├── Anemia_Tongue/
│ ├── Participant<UUID>_Anemia_Tongue_0_v2s1.jpeg
│ └── Participant_<UUID>_Anemia_Tongue_v2s1.tsv
└── PPG_Signals/
├── Participant<UUID>_PPG_Signals_<frame#>_v2s1.jpeg ← ~900 files, true frame numbers
├── ...
└── Participant_<UUID>_PPG_Signals_v2s1.tsv
Image filenames are exact — the true original filename (including the
real per-frame number for every PPG frame) is preserved in each image's
path field. TSV filenames are reconstructed from the
Participant_<uuid>_<folder>_v2s1.tsv pattern (the original TSV filename
itself isn't stored in the Parquet) — the TSV contents are always exactly
correct either way; only the filename could theoretically differ if a
participant used a different session suffix than _v2s1.
Before you start — get access (one-time setup)
This is a gated dataset: a valid Hugging Face login alone isn't enough — you also need to be individually approved for this specific dataset. Do this once, before running anything below:
Create a Hugging Face account if you don't have one: huggingface.co/join
Request access to the dataset: visit huggingface.co/datasets/sewa-rural-care/anemia-survey-dataset, fill in the access form, and click Submit. Depending on how SEWA Rural has configured approvals, you may get access immediately or need to wait for manual review.
Create an access token: go to huggingface.co/settings/tokens and create a new token (Read access is enough).
Authenticate your terminal with that token — either:
# Option A: log in once, persists across sessions pip install -U huggingface_hub hf auth login # (older huggingface_hub versions: huggingface-cli login) # paste your token when promptedor
# Option B: set it for just this session — simplest if you're not sure # which CLI version you have, works identically either way export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxVerify it worked:
hf auth whoami # (older versions: huggingface-cli whoami)Should print your username, not an error.
If you skip this and run the commands below anyway, you'll get a
401 Unauthorized / GatedRepoError — that means either you haven't been
approved for the dataset yet (step 2), or your terminal isn't authenticated
(steps 3–5), not that anything below is broken.
Quick start — download everything and convert it, in one command
You don't need to know any participant UUIDs in advance. This downloads the dataset one shard at a time by default (8 participants, ~1.1 GB — the same unit of work used throughout this pipeline's own scripts) and converts each shard to the original folder structure as it's downloaded, deleting the shard file immediately after — so disk usage never exceeds a single shard's worth of space at any point.
pip install pandas pyarrow huggingface_hub
mkdir -p restore_tool && cd restore_tool
python3 -c "
from huggingface_hub import hf_hub_download
for fname in ['common.py', 'parquet_to_folders.py', 'download_and_restore.py']:
hf_hub_download(
repo_id='sewa-rural-care/anemia-survey-dataset', repo_type='dataset',
filename=fname, local_dir='.',
)
"
cd ..
python3 restore_tool/download_and_restore.py --out ./restored
That's it — ./restored/ will fill up with one folder per participant, in
the exact original layout, as each shard downloads and converts. Progress
prints as it goes, e.g.:
Found 734 shard files (~5872 participants)
Batch 1/734: downloading + converting 1 shard(s) ...
Batch 1/734 done — 8 participants restored (running total: 8)
Batch 2/734: downloading + converting 1 shard(s) ...
...
Useful options:
| Flag | What it does |
|---|---|
--out ./restored |
Where restored participant folders are written (required) |
--batch-size 1 |
Shards downloaded/converted at a time — default 1 (~8 participants, ~1.1 GB), matching the pipeline's own per-shard unit of work. Raise it (e.g. --batch-size 25) for fewer, larger downloads if you have disk/bandwidth to spare — less per-shard overhead. |
--max-batches 2 |
Stop after N batches — try it on a small sample before committing to the full ~836 GB download |
--keep-shards |
Don't delete the downloaded .parquet shard files after converting them (by default each is deleted right after conversion to keep disk usage minimal) |
Just want to try it on a handful of participants first?
python3 restore_tool/download_and_restore.py --out ./restored_sample --max-batches 1
Downloads and converts a single shard (~8 participants, ~1.1 GB) and stops — a quick way to confirm everything works before committing to the full run.
Verify the restored structure
Each participant should produce exactly this hierarchy:
| Level | Path | Expected contents |
|---|---|---|
| 1 | restored/<uuid>/ |
Exactly 2 subfolders: Survey_Data/, Media/ |
| 2a | restored/<uuid>/Survey_Data/ |
Exactly 2 files: Survey_Details.csv, CBC_Report.csv |
| 2b | restored/<uuid>/Media/ |
Exactly 5 subfolders: 4 single-capture modalities + PPG_Signals/ |
| 3 | restored/<uuid>/Media/Anemia_<Modality>/ |
Exactly 2 files: 1 .jpeg, 1 .tsv |
| 3 | restored/<uuid>/Media/PPG_Signals/ |
~900 .jpeg files (one per frame) + 1 .tsv |
Quick check across every restored participant:
for d in restored/*/; do
uuid=$(basename "$d")
n_survey=$(find "$d/Survey_Data" -type f 2>/dev/null | wc -l)
n_modality_dirs=$(find "$d/Media" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l)
n_ppg_jpeg=$(find "$d/Media/PPG_Signals" -name "*.jpeg" 2>/dev/null | wc -l)
echo "$uuid: survey_files=$n_survey (want 2) modality_dirs=$n_modality_dirs (want 5) ppg_frames=$n_ppg_jpeg (want ~900)"
done
A healthy participant folder prints something like:
00047e5d-eacd-4b17-8575-39e4181ca498: survey_files=2 (want 2) modality_dirs=5 (want 5) ppg_frames=900 (want ~900)
If survey_files or modality_dirs don't match, that participant's
original source data was likely incomplete at collection time (a small
number of records have partial data — see
Known Limitations), not a conversion error.
Advanced: restore just one specific participant, or a specific shard
If you already know a patient_uuid (e.g. from your own analysis of the
loaded dataset — see Loading the Dataset below) and
only want that one participant's raw files:
# Download one specific shard (find its filename from the Storage Format
# section above, or just download everything and filter — see below)
python3 -c "
from huggingface_hub import hf_hub_download
hf_hub_download(
repo_id='sewa-rural-care/anemia-survey-dataset', repo_type='dataset',
filename='data/shard_00001.parquet', local_dir='./shards',
)
"
# Restore only the matching participant from it
python3 restore_tool/parquet_to_folders.py "./shards/data/*.parquet" --out ./restored --uuid <participant-UUID>
parquet_to_folders.py also accepts multiple shard files or a glob
("./shards/data/*.parquet") and will scan all of them for a --uuid
match, so this also works if you're not sure which shard a participant is
in — just point it at everything you've downloaded.
Loading the Dataset
This is a gated dataset — if you haven't already, see Before you start — get access above first, or
load_dataset()below will fail with a401/GatedRepoError.
Load the full dataset
from datasets import load_dataset
ds = load_dataset("sewa-rural-care/anemia-survey-dataset", split="train")
print(ds)
print(ds[0]["patient_uuid"], ds[0]["hemoglobin_category"])
Filter to one participant
uuid = "<participant-UUID>"
row = ds.filter(lambda x: x["patient_uuid"] == uuid)[0]
View a clinical image
row["image_conjunctiva"]["bytes"].show() # PIL Image, via datasets' Image feature
Work with PPG frames and per-frame metadata
import json
ppg_meta = json.loads(row["ppg_frame_metadata"])
print(f"Frames: {row['ppg_frame_count']} | fields per frame: {len(ppg_meta[0])}")
# ppg_frames[i] and ppg_frame_metadata[i] refer to the same frame
first_frame_img = row["ppg_frames"][0]["bytes"]
first_frame_meta = ppg_meta[0]
print(f"Frame {first_frame_meta['frameNumber']}: "
f"ISO {first_frame_meta['android.sensor.sensitivity']}, "
f"exposure {first_frame_meta['android.sensor.exposureTime']} ns")
Streaming (avoid downloading the full dataset)
ds = load_dataset("sewa-rural-care/anemia-survey-dataset", split="train", streaming=True)
for row in ds:
if row["patient_uuid"] == uuid:
break
Data Collection Protocol
- Organisation: SEWA Rural, Jhagadia, Bharuch District, Gujarat, India
- Setting: Outpatient clinics, inpatient wards, community health camps
- Device: Samsung smartphones — Samsung A14, Samsung A05, and Samsung S24
(three models used across the study, selected to span a range of cost and
image quality; the
survey_device_modalcolumn records which was used for each participant — "modal" is a typo in the original source data, not ours) - Clinical image protocol: Single image per site, flash enabled, standardised distance and angle; indoor and outdoor settings
- PPG protocol: Participant places fingertip firmly over rear camera lens; ~30 seconds recorded at 30 fps with flash enabled; all Camera2 parameters logged per frame, all frames saved as JPEG
- Ground truth: Venous blood draw analysed by certified haematology laboratory
- Seasons: Monsoon, Summer, Winter
Known Limitations
- All data collected in Gujarat, India — generalisation to other populations requires validation
- Data collected using three Samsung smartphone models (A14, A05, S24) —
camera metadata and the
survey_device_modalcolumn support cross-device normalisation and analysis hemoglobin_categoryuses fixed adult WHO thresholds, not gender/pregnancy-specific ones — apply your own thresholds usingsurvey_gender/survey_pregnancy_statusif that distinction matters for your use case- Paediatric-specific severity thresholds not yet applied
- Skin tone distribution reflects rural Gujarat population
- A small number of participant records were excluded during processing due to corrupted or incomplete source files
- Not validated for clinical deployment — independent validation required before diagnostic use
Ethics & Privacy
- All participants provided written informed consent before data collection
- Informed consent was obtained from all participants to allow publishing the deidentified dataset in the public domain
- Ethics committee approval obtained — reference: [SR/IEC/2023/03/01]
- Participant identities replaced with UUID v4 — no names, dates of birth, addresses, or geographic coordinates stored
- Images show only fingernails, inner eyelid, and tongue — no full-face photographs
- PPG frames show only fingertip placed over camera lens
- Compliant with ICMR Ethical Guidelines (2017), India DPDP Act 2023, and GDPR principles
Citation
@dataset{sewa_rural_anemia_2026,
author = {{SEWA Rural}},
title = {Anemia Detection — Multi-Modal Clinical SEWA Rural Dataset},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/sewa-rural-care/anemia-survey-dataset},
license = {CC BY-NC 4.0},
note = {Collected at SEWA Rural, Jhagadia, Gujarat, India}
}
License
Released under CC BY-NC 4.0 —
non-commercial research use with attribution. See LICENSE.txt and
DATA_USE_POLICY.md for full terms.
Note on redistribution: the base CC BY-NC 4.0 license permits copying and redistributing this material in any medium or format. However, the
DATA_USE_POLICY.mdyou agree to when requesting access to this dataset imposes a stricter condition: you may not re-host, re-distribute, or publicly share the raw data files outside of the Hugging Face platform without SEWA Rural's written permission, and copies must be stored only on secure systems, not on publicly accessible servers or unprotected cloud storage. The Data Use Policy's restriction governs — treat this dataset as non-redistributable outside Hugging Face regardless of what a literal reading of the base license text might suggest.
Contact
SEWA Rural — Society for Education, Welfare and Action (Rural) Jhagadia, Bharuch District, Gujarat — 393 110, India 📧 sewarural@ymail.com | 🌐 sewarural.org
Acknowledgements
SEWA Rural acknowledges the patients and communities of rural and tribal Gujarat who participated in this study, and the clinical staff, data collection team, and laboratory personnel at SEWA Rural facilities who made this dataset possible.
- Downloads last month
- 686