{"success":true,"data":{"author":"Mohamed Amgad et al. (PanopTILs); curated by SPORA","bucketAccessType":"public","bucketName":"csmp-hub/panoptils_refined","bucketPrefix":"","category":"Health & Biomedical","cloudProvider":"huggingface","createdAt":"2026-11-17T19:29:32.904Z","description":"PanopTILs Refined is a selected subset of PanopTILs, the crowdsourced panoptic segmentation of tumor-infiltrating lymphocytes (TILs) in breast cancer built on the BCSS and NuCLS annotations of TCGA whole-slide images. It contains 1,349 H&E regions of interest from 150 TCGA breast cancer patients, each 1024x1024 pixels at 0.25 micrometers per pixel, with instance and class masks for individual nuclei (six nucleus classes, model-assisted labels) and hand-drawn tissue region masks (six tissue classes). Patient-level splits keep all images from one patient together: train.parquet (1,068 ROIs, 120 patients), val.parquet (130, 15) and test.parquet (151, 15), with patient lists in manifest.json; these splits differ from the original PanopTILs folds. About 5.7 GB (measured 2026-11-17). Images and masks are stored as PNG or TIFF bytes inside Parquet; read them with polars or pandas plus Pillow, or with Hugging Face datasets. Use for panoptic segmentation, nucleus classification and TIL scoring. Curated and packaged on Hugging Face by the SPORA project (csmp-hub), which keeps the original license and citation files. The original PanopTILs site states the dataset is licensed CC0 1.0; cite Amgad et al., medRxiv 2022.01.08.22268814, and the BCSS and NuCLS papers.","displayTitle":"PanopTILs Refined: breast cancer H&E regions with nucleus and tissue masks from 150 TCGA patients","huggingFaceUrl":"https://huggingface.co/datasets/csmp-hub/panoptils_refined","id":"088803d3-48ef-563b-8bee-3d80625989c6","license":"CC0-1.0","licenseEvidenceUrl":"https://sites.google.com/view/panoptils/","objectCountEstimate":10,"probeStatus":"ok","referenceUrl":"https://doi.org/10.1101/2022.01.08.22268814","region":"us","schemaCard":{"accessHints":[{"language":"python-datasets","snippet":"from datasets import load_dataset\nds = load_dataset(\"csmp-hub/panoptils_refined\")"},{"language":"python-hub","snippet":"from huggingface_hub import snapshot_download\nsnapshot_download(repo_id=\"csmp-hub/panoptils_refined\", repo_type=\"dataset\")"}],"caveats":["HuggingFace metadata: author=csmp-hub, license:cc0-1.0, size_categories:1K<n<10K, format:parquet, downloads=249"],"format":"mixed","generatedAt":"2026-11-17T19:40:07.376Z","layout":{"example":"panoptils_refined.parquet","pattern":"{repoId}/{filename}"},"mountPath":"/mnt/archive","sampleHeaders":[{"bytes":"50415231150415f02e15da0f4c15ac021500120000b8174c10000000544347412d41312d4130534b2d4458313a1400005036140010322d4130344e140000514a2800005446140004434d4614000444304a1400003246140000534a500004535846280000544a500000544a5000045945463c00005946a00008314736422800083358534a140046a000083358554a280046b4000833585936280010372d4130433aa0000114044441422800083236464a140000474a14000049421400083453444a140046780008355a564228000436564e140000574a28003adc0014382d413037433628000514004f46140004385246140000393a400110432d4132423abc020114045148363c000514004a4214000436493ab40010432d4137563aa000144e2d4130414c363c0005143aa00005143a0802011400473a940201143e1c02144f2d413033553664000114004a3abc02051400344a28003aa802104f2d41313246280008313238423c00083132394a14003a58020150004b3af000005181103a540114512d4135344e36500010522d4130543a340305143af0000114045531463c0000553ac80010522d4131413ad00205143a880405143ab40005143a940210522d4132353a40010114004c3a440205144650000435513678000442484130362003051404423332dc000914367c01091436c0030914368002091436bc02051400","encoding":"hex","key":"panoptils_refined.parquet","truncatedAt":512}],"sampleObjects":["examples.png","masks.png","panoptils_example.png","panoptils_refined.parquet","test.parquet"],"sidecars":[{"bytes":"---\nlicense: cc0-1.0\ntask_categories:\n  - image-segmentation\ntags:\n  - histology\n  - nuclei\n  - panoptic\nconfigs:\n  - config_name: default\n    data_files:\n      - split: train\n        path: train.parquet\n      - split: val\n        path: val.parquet\n      - split: test\n        path: test.parquet\n---\n\n# PanopTILs Refined\n\n## Overview\n\nPanopTILs Refined contains **1,349 breast cancer tissue images from 150 TCGA patients**, with masks for individual nuclei and surrounding tissue regions. Each H&E image is 1024 × 1024 pixels at 0.25 µm per pixel. There are six nucleus classes and six tissue classes.\n\nThis selected subset uses model-assisted nucleus labels and hand-drawn tissue labels. It builds on PanopTILs, BCSS and NuCLS, and can support studies of tumour cells and nearby immune cells.\n\n**License:** [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).\n\n## Files and splits\n\n| Split | File | ROIs | Patients |\n| --- | --- | --- | --- |\n| `train` | `train.parquet` | 1,068 | 120 |\n| `val` | `val.parquet` | 130 | 15 |\n| `test` | `test.parquet` | 151 | 15 |\n\nEach patient belongs to only one split, so all images from that patient stay together. The 150 patients were randomly divided 80/10/10 using seed 42. These splits were made for this refined subset and differ from the original PanopTILs folds. Classes and hospitals were not balanced between splits. Full patient lists are in `manifest.json`.\n\nThe older `panoptils_refined.parquet` file contains the whole collection. Use the three files above for training and evaluation; combining them with the older file would repeat images and mix test patients into training.\n\n## Fields\n\nEach row contains one image and its masks, stored as PNG bytes. Images are 1024 × 1024 pixels with three colour channels; masks are 1024 × 1024 arrays.\n\n| Field | Contents |\n| --- | --- |\n| `id`, `sample` | The same original image name, kept in both fields |\n| `patient` | TCGA patient ID used to keep that patient's images in one split |\n| `slide_name` | Original TCGA slide name |\n| `hospital` | Original TCGA tissue-source-site code |\n| `image` | RGB colour image; uint8 values from 0 to 255 |\n| `inst` | Numbered nucleus mask; uint16, with 0 for background |\n| `type` | Nucleus class mask; uint8, using the numbers below |\n| `sem` | Tissue class mask; uint8, using the numbers below |\n\nOriginal nucleus numbers are kept within each image. Keep `inst` as uint16: converting it to uint8 would lose numbers above 255. Nucleus numbers do not identify the same object across images. Tissue masks label the surrounding regions separately from the nuclei.\n\n## Labels\n\n### Nucleus classes (`type`)\n\n| Value | Class |\n| --- | --- |\n| 0 | background |\n| 1 | neoplastic |\n| 2 | stromal |\n| 3 | inflammatory |\n| 4 | epithelial |\n| 5 | other |\n| 6 | unknown |\n\n### Tissue classes (`sem`)\n\n| Value | Class |\n| --- | --- |\n| 0 | background |\n| 1 | tumor |\n| 2 | stroma |\n| 3 | epithelium |\n| 4 | junk/debris |\n| 5 | blood |\n| 6 | other |\n\nThese are the refined dataset's original class mappings. Nucleus `unknown` (6) is distinct from background (0).\n\n## Download and read a sample\n\n```python\nfrom io import BytesIO\n\nimport numpy as np\nimport polars as pl\nfrom huggingface_hub import hf_hub_download\nfrom PIL import Image\n\n\ndef read_png(data: bytes) -> np.ndarray:\n    \"\"\"Decode RGB pixels or integer labels without reducing mask bit depth.\"\"\"\n    with Image.open(BytesIO(data)) as image:\n        return np.array(image)\n\n\npath = hf_hub_download(\n    repo_id=\"csmp-hub/panoptils_refined\",\n    repo_type=\"dataset\",\n    filename=\"train.parquet\",\n)\nrow = pl.read_parquet(path, n_rows=1).row(0, named=True)\nimage = read_png(row[\"image\"])\ninstances = read_png(row[\"inst\"])\ncell_types = read_png(row[\"type\"])\ntissue_types = read_png(row[\"sem\"])\n```\n\nUse the filenames above to load a different split.\n\n## Plot examples\n\nContinue from the loading example.\n\n```python\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import Patch\nfrom skimage.segmentation import find_boundaries\n\nsample_ids = [\n    \"TCGA-A1-A0SK-DX1_xmin45749_ymin25055_MPP-0.2","encoding":"utf8","key":"README.md","name":"README.md","size":10356,"truncated":true},{"bytes":"{\n  \"source\": {\n    \"repo\": \"histolytics-hub/panoptils_refined\",\n    \"revision\": \"d40293bc1ac0d0da8f271959fdb990aeea2d884f\",\n    \"file\": \"panoptils_refined.parquet\",\n    \"sha256\": \"1ab3f0c2299e0c44f996e34c233846592a934aa3dcfc8e80cc983db85c771d18\"\n  },\n  \"license\": \"cc0-1.0\",\n  \"samples\": 1349,\n  \"patients\": 150,\n  \"split_protocol\": {\n    \"seed\": 42,\n    \"unit\": \"TCGA patient (first three hyphen-separated slide-name components)\",\n    \"method\": \"Sort distinct patient IDs, shuffle with Python random.Random(42), assign first floor(0.8*N) to train, next floor(0.1*N) to val, remainder to test. Preserve source row order within each split.\",\n    \"stratification\": null,\n    \"source_folds\": \"Not recovered; these are new CSMP partitions.\"\n  },\n  \"conversion\": \"id equals the unchanged original sample; retain sample/slide_name/hospital and add patient. Promote uint8 instance PNGs losslessly to uint16; preserve existing uint16 PNGs. Copy image/type/sem PNG bytes unchanged. Never renumber instances or classes.\",\n  \"nuclei_classes\": {\n    \"0\": \"background\",\n    \"1\": \"neoplastic\",\n    \"2\": \"stromal\",\n    \"3\": \"inflammatory\",\n    \"4\": \"epithelial\",\n    \"5\": \"other\",\n    \"6\": \"unknown\"\n  },\n  \"tissue_classes\": {\n    \"0\": \"background\",\n    \"1\": \"tumor\",\n    \"2\": \"stroma\",\n    \"3\": \"epithelium\",\n    \"4\": \"junk/debris\",\n    \"5\": \"blood\",\n    \"6\": \"other\"\n  },\n  \"splits\": {\n    \"train\": {\n      \"file\": \"train.parquet\",\n      \"samples\": 1068,\n      \"patients\": [\n        \"TCGA-A1-A0SK\",\n        \"TCGA-A2-A04P\",\n        \"TCGA-A2-A04Q\",\n        \"TCGA-A2-A04T\",\n        \"TCGA-A2-A0CM\",\n        \"TCGA-A2-A0SX\",\n        \"TCGA-A2-A0T0\",\n        \"TCGA-A2-A0T2\",\n        \"TCGA-A2-A0YE\",\n        \"TCGA-A2-A0YM\",\n        \"TCGA-A2-A1G6\",\n        \"TCGA-A2-A3XS\",\n        \"TCGA-A2-A3XT\",\n        \"TCGA-A2-A3XU\",\n        \"TCGA-A2-A3XX\",\n        \"TCGA-A2-A3XY\",\n        \"TCGA-A7-A0DA\",\n        \"TCGA-A7-A26I\",\n        \"TCGA-A7-A4SD\",\n        \"TCGA-A7-A5ZV\",\n        \"TCGA-A7-A6VW\",\n        \"TCGA-A7-A6VY\",\n        \"TCGA-A8-A07C\",\n        \"TCGA-A8-A07O\",\n        \"TCGA-A8-A08R\",\n        \"TCGA-A8-A09X\",\n        \"TCGA-AC-A2QH\",\n        \"TCGA-AC-A2QJ\",\n        \"TCGA-AC-A6IW\",\n        \"TCGA-AC-A7VC\",\n        \"TCGA-AN-A0AL\",\n        \"TCGA-AN-A0AR\",\n        \"TCGA-AN-A0AT\",\n        \"TCGA-AN-A0XU\",\n        \"TCGA-AO-A03U\",\n        \"TCGA-AO-A0J2\",\n        \"TCGA-AO-A0J4\",\n        \"TCGA-AO-A0J6\",\n        \"TCGA-AO-A124\",\n        \"TCGA-AO-A129\",\n        \"TCGA-AO-A12F\",\n        \"TCGA-AO-A1KR\",\n        \"TCGA-AR-A0U1\",\n        \"TCGA-AR-A1AI\",\n        \"TCGA-AR-A1AQ\",\n        \"TCGA-AR-A1AY\",\n        \"TCGA-AR-A256\",\n        \"TCGA-AR-A2LH\",\n        \"TCGA-AR-A2LR\",\n        \"TCGA-AR-A5QQ\",\n        \"TCGA-BH-A0AV\",\n        \"TCGA-BH-A0B3\",\n        \"TCGA-BH-A0BL\",\n        \"TCGA-BH-A0BW\",\n        \"TCGA-BH-A0E0\",\n        \"TCGA-BH-A0E6\",\n        \"TCGA-BH-A0RX\",\n        \"TCGA-BH-A0WA\",\n        \"TCGA-BH-A18G\",\n        \"TCGA-BH-A18V\",\n        \"TCGA-BH-A1EW\",\n        \"TCGA-BH-A1F6\",\n        \"TCGA-BH-A1FC\",\n        \"TCGA-BH-A42U\",\n        \"TCGA-C8-A12V\",\n        \"TCGA-C8-A131\",\n        \"TCGA-C8-A1HJ\",\n        \"TCGA-C8-A26X\",\n        \"TCGA-C8-A26Y\",\n        \"TCGA-C8-A3M7\",\n        \"TCGA-D8-A13Z\",\n        \"TCGA-D8-A142\",\n        \"TCGA-D8-A143\",\n        \"TCGA-D8-A147\",\n        \"TCGA-D8-A1JF\",\n        \"TCGA-D8-A1JG\",\n        \"TCGA-D8-A1XK\",\n        \"TCGA-D8-A1XQ\",\n        \"TCGA-D8-A27F\",\n        \"TCGA-D8-A27H\",\n        \"TCGA-D8-A27M\",\n        \"TCGA-E2-A14R\",\n        \"TCGA-E2-A14X\",\n        \"TCGA-E2-A150\",\n        \"TCGA-E2-A1AZ\",\n        \"TCGA-E2-A1B6\",\n        \"TCGA-E2-A1L7\",\n        \"TCGA-E2-A1LH\",\n        \"TCGA-E2-A1LI\",\n        \"TCGA-E2-A1LL\",\n        \"TCGA-E2-A1LS\",\n        \"TCGA-E2-A573\",\n        \"TCGA-E2-A574\",\n        \"TCGA-E9-A5FL\",\n        \"TCGA-EW-A1OV\",\n        \"TCGA-EW-A1OW\",\n        \"TCGA-EW-A1P1\",\n        \"TCGA-EW-A1P4\",\n        \"TCGA-EW-A1P7\",\n        \"TCGA-EW-A1P8\",\n        \"TCGA-EW-A1PB\",\n        \"TCGA-EW-A1PH\",\n        \"TCGA-EW-A3U0\",\n        \"TCGA-GM-A2DB\",\n        \"TCGA-GM-A2DD\",\n        \"TCGA-GM-A2DF\",\n        \"TCGA-GM-A2DH\",\n        \"TCGA-GM-A2DI\",\n        \"TCGA-GM-A3XL\",\n        \"TCGA-HN-","encoding":"utf8","key":"manifest.json","name":"manifest.json","size":1014143,"truncated":true}],"sourceObjectKey":"panoptils_refined.parquet","starterCell":"from datasets import load_dataset\nds = load_dataset(\"csmp-hub/panoptils_refined\")\nprint(ds)","starterSamplePath":"examples.png","totalObjects":10},"summary":"PanopTILs Refined is a selected subset of PanopTILs, the crowdsourced panoptic segmentation of tumor-infiltrating lymphocytes (TILs) in breast cancer built on the BCSS and NuCLS…","title":"PanopTILs Refined: breast cancer H&E regions with nucleus and tissue masks from 150 TCGA patients","updatedAt":"2026-11-17T23:39:04.279Z","visibility":"public","websiteUrl":"https://huggingface.co/datasets/csmp-hub/panoptils_refined"}}