| --- |
| pretty_name: MMPD-Bench |
| license: cc-by-nc-4.0 |
| tags: |
| - polarimetry |
| - mueller-matrix |
| - biomedical-imaging |
| - healthy-bone-cell |
| - scientific-computing |
| - parquet |
| task_categories: |
| - image-to-image |
| configs: |
| - config_name: healthy_bone_cell |
| default: true |
| data_files: |
| - split: train |
| path: data/train-*.parquet |
| - split: validation |
| path: data/validation-*.parquet |
| - split: test |
| path: data/test-*.parquet |
| - config_name: external_waveplate |
| data_files: |
| - split: external_waveplate |
| path: data/external_waveplate-*.parquet |
| - config_name: external_spectral |
| data_files: |
| - split: external_spectral_610 |
| path: data/external_spectral_610-*.parquet |
| - split: external_spectral_650 |
| path: data/external_spectral_650-*.parquet |
| - split: external_spectral_690 |
| path: data/external_spectral_690-*.parquet |
| --- |
| |
| # MMPD-Bench |
|
|
| ## Dataset Summary |
|
|
| MMPD-Bench is a polarimetric imaging benchmark for learning mappings from |
| Mueller matrix observations to polarimetric decomposition modalities. Each |
| sample contains a channel-first Mueller matrix tensor and a channel-first target |
| tensor with six Lu-Chipman reference modalities. |
|
|
| Current Hugging Face release status: |
|
|
| - Uploaded: external waveplate test data at 633 nm. |
| - Uploaded: external spectral test data at 610, 650, and 690 nm. |
| - Uploaded: healthy bone cell `train`, `validation`, and `test` splits. |
|
|
| Because the waveplate tensors are 200 x 200 while the healthy bone cell and |
| spectral tensors are 256 x 256, the data is published as separate configs: |
|
|
| - `healthy_bone_cell` |
| - `external_waveplate` |
| - `external_spectral` |
|
|
| ## Task Definition |
|
|
| The task is modality fission from a Mueller matrix tensor to six polarimetric |
| target modalities. It is not a segmentation or classification dataset. |
|
|
| - Input: Mueller matrix tensor, shape `[16, H, W]`, channel-first. |
| - Output: target modality tensor, shape `[6, H, W]`, channel-first. |
| - Target channel order: `D`, `Delta`, `eta`, `theta`, `psi`, `R`. |
|
|
| ## Data Sources |
|
|
| This release contains healthy bone cell data from `polarization_v2` and external |
| test data from `polarization_v3`: |
|
|
| - Healthy bone cell data: source-provided patch splits from 53 sample folders. |
| - Waveplate data: `hwp633` and `qwp633`, measured at 633 nm. |
| - Multi-wavelength spectral data: selected wavelengths from `mwl_530_690`, |
| currently 610, 650, and 690 nm. |
|
|
| ## File Structure |
|
|
| ```text |
| MMPD-Bench/ |
| ├── README.md |
| ├── data/ |
| │ ├── external_waveplate-00000-of-00001.parquet |
| │ ├── external_spectral_610-00000-of-00001.parquet |
| │ ├── external_spectral_650-00000-of-00001.parquet |
| │ ├── external_spectral_690-00000-of-00001.parquet |
| │ ├── train-00000-of-00094.parquet |
| │ ├── validation-00000-of-00012.parquet |
| │ └── test-00000-of-00011.parquet |
| └── metadata/ |
| ├── acquisition_info.json |
| ├── channel_order.json |
| ├── healthy_bone_cell_manifest.jsonl |
| ├── healthy_bone_cell_manifest_summary.json |
| ├── parameter_ranges.json |
| ├── schema.json |
| └── split_summary.json |
| ``` |
|
|
| ## Tensor Schema |
|
|
| Common columns: |
|
|
| ```python |
| { |
| "sample_id": str, |
| "source_id": str, |
| "split": str, |
| "subset": str, # healthy_bone_cell, waveplate, or spectral |
| "specimen_type": str, # healthy_bone_cell, waveplate, or spectral |
| "wavelength_nm": int | None, |
| "source_path": str, |
| "mueller_shape": list[int], |
| "target_shape": list[int], |
| "mueller": array, # float32, channel-first |
| "target": array, # float32, channel-first |
| } |
| ``` |
|
|
| Waveplate-specific columns: |
|
|
| ```python |
| { |
| "plate_type": str, # hwp or qwp |
| "angle_label": str, # e.g. 0deg, n22, p45 |
| "angle_deg": float, |
| } |
| ``` |
|
|
| Patch-based columns for healthy bone cell and spectral rows: |
|
|
| ```python |
| { |
| "patch_id": str, |
| "target_encoding": str, # png_uint8_normalized_to_float32_0_1 |
| } |
| ``` |
|
|
| Current tensor shapes: |
|
|
| - `healthy_bone_cell`: `mueller = [16, 256, 256]`, |
| `target = [6, 256, 256]`. |
| - `external_waveplate`: `mueller = [16, 200, 200]`, `target = [6, 200, 200]`. |
| - `external_spectral_*`: `mueller = [16, 256, 256]`, |
| `target = [6, 256, 256]`. |
|
|
| ## Channel Conventions |
|
|
| Mueller channel order: |
|
|
| ```text |
| M11, M12, M13, M14, |
| M21, M22, M23, M24, |
| M31, M32, M33, M34, |
| M41, M42, M43, M44 |
| ``` |
|
|
| Target channel order: |
|
|
| ```text |
| D, Delta, eta, theta, psi, R |
| ``` |
|
|
| Local source files may use names such as `Ita`, `ita`, or `Eta`; the public |
| channel name is normalized to `eta`. |
|
|
| ## Physical Parameter Definitions |
|
|
| Mueller matrix elements are generally expected to lie within `[-1, 1]` after |
| normalization. In measured data, small deviations outside this range may occur |
| because of acquisition noise, calibration differences, numerical processing, or |
| normalization error. Users should inspect the value distribution for their split |
| and apply task-appropriate preprocessing before training, such as clipping, |
| standardization, or normalization based on the training set. |
|
|
| The target tensor follows this channel order and nominal parameter range: |
|
|
| ```text |
| D, Delta: [0, 1] |
| eta, R: [0, pi) |
| theta, psi: [-pi/2, pi/2) |
| ``` |
|
|
| Important encoding note: |
|
|
| - Waveplate target arrays are stored from the source `.npy` files as float32. |
| - Healthy bone cell and spectral target arrays were converted from grayscale PNG |
| files to float32 values normalized to `[0, 1]`; see `target_encoding`. |
| - Mueller matrix tensors are stored as measured/processed values, not forcibly |
| clipped to `[-1, 1]`. |
|
|
| ### Optional Mapping From Grayscale Targets to Physical Ranges |
|
|
| For rows whose `target_encoding` is |
| `png_uint8_normalized_to_float32_0_1`, the stored target tensor is a normalized |
| grayscale representation in `[0, 1]`. To map these values back to the nominal |
| physical parameter ranges used in the paper, apply: |
|
|
| ```python |
| import numpy as np |
| |
| TARGET_CHANNELS = ["D", "Delta", "eta", "theta", "psi", "R"] |
| |
| |
| def normalized_modalities_to_physical(target, channel_axis=0, clip=False): |
| """Map normalized grayscale modalities to nominal physical ranges. |
| |
| Use this only for targets encoded as |
| ``png_uint8_normalized_to_float32_0_1``. If a split already stores physical |
| Lu-Chipman values, do not apply this conversion again. |
| """ |
| target = np.asarray(target, dtype=np.float32) |
| values = np.moveaxis(target, channel_axis, 0) |
| if values.shape[0] != 6: |
| raise ValueError(f"Expected 6 target channels, got shape {target.shape}") |
| |
| g = np.clip(values, 0.0, 1.0) if clip else values |
| physical = np.empty_like(g, dtype=np.float32) |
| physical[0] = g[0] # D: [0, 1] |
| physical[1] = g[1] # Delta: [0, 1] |
| physical[2] = np.pi * g[2] # eta: [0, pi) |
| physical[3] = np.pi * (g[3] - 0.5) # theta: [-pi/2, pi/2) |
| physical[4] = np.pi * (g[4] - 0.5) # psi: [-pi/2, pi/2) |
| physical[5] = np.pi * g[5] # R: [0, pi) |
| return np.moveaxis(physical, 0, channel_axis) |
| ``` |
|
|
| The inverse mapping is: |
|
|
| ```text |
| D_gray = D |
| Delta_gray = Delta |
| eta_gray = eta / pi |
| theta_gray = theta / pi + 0.5 |
| psi_gray = psi / pi + 0.5 |
| R_gray = R / pi |
| ``` |
|
|
| Visualization note: after applying this optional physical-range mapping, use the |
| nominal physical ranges for color scales when comparing samples or models: |
| `D/Delta` in `[0, 1]`, `eta/R` in `[0, pi]`, and `theta/psi` in |
| `[-pi/2, pi/2]`. Per-sample min/max color scales are useful for inspection, but |
| they can make cross-sample or cross-modality comparisons visually misleading. |
| The helper script `scripts/test2.py` demonstrates both normalized targets and |
| physical targets with fixed physical colorbar ranges. |
|
|
| ## Reference Label Generation |
|
|
| The target modalities are generated using Lu-Chipman decomposition from measured |
| Mueller matrices. They should be interpreted as physics-solver reference labels |
| for benchmarking surrogate models and physics consistency, not as direct human |
| annotations or absolute biological ground truth. |
|
|
| ## Splits |
|
|
| | Split | Config | Subset | Samples | Shape | Notes | |
| |---|---|---:|---:|---|---| |
| | train | healthy_bone_cell | healthy_bone_cell | 6006 | `[16, 256, 256] -> [6, 256, 256]` | 94 shards | |
| | validation | healthy_bone_cell | healthy_bone_cell | 713 | `[16, 256, 256] -> [6, 256, 256]` | 12 shards | |
| | test | healthy_bone_cell | healthy_bone_cell | 643 | `[16, 256, 256] -> [6, 256, 256]` | 11 shards | |
| | external_waveplate | external_waveplate | waveplate | 18 | `[16, 200, 200] -> [6, 200, 200]` | 633 nm HWP/QWP | |
| | external_spectral_610 | external_spectral | spectral | 165 | `[16, 256, 256] -> [6, 256, 256]` | 610 nm | |
| | external_spectral_650 | external_spectral | spectral | 165 | `[16, 256, 256] -> [6, 256, 256]` | 650 nm | |
| | external_spectral_690 | external_spectral | spectral | 165 | `[16, 256, 256] -> [6, 256, 256]` | 690 nm | |
| |
| ## Benchmark Protocols |
| |
| Evaluation configs: |
| |
| 1. Healthy bone cell benchmark: use config `healthy_bone_cell`, splits `train`, |
| `validation`, and `test`. |
| 2. External waveplate evaluation: use config `external_waveplate`, split |
| `external_waveplate`. |
| 3. External spectral evaluation: use config `external_spectral`, then evaluate |
| `external_spectral_610`, `external_spectral_650`, and |
| `external_spectral_690`. |
|
|
| ## Loading Instructions |
|
|
| Install the Hugging Face datasets package: |
|
|
| ```bash |
| pip install datasets |
| ``` |
|
|
| Load one external spectral split: |
|
|
| ```python |
| from datasets import load_dataset |
| import numpy as np |
| |
| ds = load_dataset( |
| "parquet", |
| data_files={ |
| "external_spectral_610": ( |
| "hf://datasets/HY2333/MMPD_Bench/" |
| "data/external_spectral_610-*.parquet" |
| ) |
| }, |
| split="external_spectral_610", |
| ) |
| |
| row = ds[0] |
| mueller = np.array(row["mueller"], dtype=np.float32) |
| target = np.array(row["target"], dtype=np.float32) |
| |
| print(row["sample_id"]) |
| print(mueller.shape) |
| print(target.shape) |
| ``` |
|
|
| Load via dataset config: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| healthy = load_dataset("HY2333/MMPD_Bench", "healthy_bone_cell") |
| spectral = load_dataset("HY2333/MMPD_Bench", "external_spectral") |
| waveplate = load_dataset("HY2333/MMPD_Bench", "external_waveplate") |
| ``` |
|
|
| Note: in some environments, streaming reads of large nested Parquet tensors can |
| trigger a PyArrow shutdown issue after successful iteration. For a stable smoke |
| test, use non-streaming loading on a single split as shown above. |
|
|
| ## Ethics and Limitations |
|
|
| The current public release focuses on healthy bone cell and external |
| physical/spectral evaluation data. Diseased biological samples are not included |
| in this release. |
|
|
| The targets are Lu-Chipman reference outputs. Evaluation should be interpreted |
| as agreement with a physics-solver reference and related physics consistency, |
| not as proof of absolute biological ground truth. |
|
|
| Measured Mueller matrix entries may be slightly outside the nominal `[-1, 1]` |
| range. This is expected for real acquisition pipelines; users should decide |
| whether to clip, standardize, or otherwise normalize values according to their |
| training protocol. |
|
|
| ## License |
|
|
| This dataset is released under CC BY-NC 4.0. |
|
|
| ## Citation |
|
|
| TODO: Add the MMPD-Bench paper citation and BibTeX entry. |
|
|
| ## Contact |
|
|
| TODO: Add maintainer contact details. |
|
|