Gradient Biotech
U

Menu

Sample data

Sample images support manual testing, demos, and automated regression checks.

Synthetic region image

The pathology test suite generates a synthetic H&E-style region image programmatically:

from PIL import Image, ImageDraw

img = Image.new("RGB", (640, 480), "white")
draw = ImageDraw.Draw(img)
draw.rectangle((80, 80, 560, 400), fill=(220, 160, 190))
for i in range(10):
    for j in range(6):
        x, y = 100 + i * 40, 120 + j * 40
        draw.ellipse((x, y, x + 12, y + 12), fill=(70, 40, 120))
img.save("/tmp/synthetic_pathology.png")

Upload /tmp/synthetic_pathology.png as a region image with H&E stain.

Expected results (from backend-analysis/tests/pathology/test_phase2_pipelines.py):

  • Tissue fraction ~45–58%
  • Cell count ~45–70 detected nuclei with baseline threshold model

Public WSI datasets

For WSI testing, public repositories such as OpenSlide test data provide small SVS and NDPI fixtures. Keep large scanner exports gitignored under data/pathology/.

Test fixtures

Automated tests live under:

backend-analysis/tests/pathology/

Tests create temporary synthetic images in pytest tmp_path — no committed binary fixtures required.

Suggested demo workflow

  1. Create pathology study
  2. Upload synthetic PNG (or small TIFF)
  3. Generate tiles → open slide viewer
  4. Run tissue detection → review tissue fraction
  5. Run segmentation → review cell table
  6. Run spatial quantification → export CSV metrics

Full product details: products/pathology/product.md and products/pathology/plan.md.