Spaces:
Sleeping
Sleeping
Fixed imports
Browse files- README.md +5 -5
- cleaning.py +1 -1
README.md
CHANGED
|
@@ -48,7 +48,7 @@ Project layout:
|
|
| 48 |
|
| 49 |
- `main.py` β primary image-cleaning script
|
| 50 |
- `cleaning.py` β reusable cleaning operations
|
| 51 |
-
- `
|
| 52 |
- `ihc_qc.py` β reusable segmentation, debris, and DAB QC drawing
|
| 53 |
- `app.py` β optional Gradio interface
|
| 54 |
- `data/` β source and example images
|
|
@@ -57,13 +57,13 @@ Project layout:
|
|
| 57 |
|
| 58 |
## DAB quantification
|
| 59 |
|
| 60 |
-
`
|
| 61 |
debris mask, separates H-DAB stains from the original image values, and writes
|
| 62 |
one CSV row per spheroid. Image metadata such as treatment, image number, and
|
| 63 |
an optional image note is extracted from the filename.
|
| 64 |
|
| 65 |
```bash
|
| 66 |
-
uv run python
|
| 67 |
```
|
| 68 |
|
| 69 |
The input can be one TIFF image or a directory. Directories are searched
|
|
@@ -78,7 +78,7 @@ every image so its colors can be compared directly across the dataset.
|
|
| 78 |
Use `--output` to choose another CSV location:
|
| 79 |
|
| 80 |
```bash
|
| 81 |
-
uv run python
|
| 82 |
--output out/my_results.csv
|
| 83 |
```
|
| 84 |
|
|
@@ -89,7 +89,7 @@ Experiment-sensitive boundary and watershed settings can be changed without
|
|
| 89 |
editing the script:
|
| 90 |
|
| 91 |
```bash
|
| 92 |
-
uv run python
|
| 93 |
--max-boundary-contact-ratio 0.3 \
|
| 94 |
--watershed-marker-core-fraction 0.55 \
|
| 95 |
--watershed-minimum-relative-region-area 0.3
|
|
|
|
| 48 |
|
| 49 |
- `main.py` β primary image-cleaning script
|
| 50 |
- `cleaning.py` β reusable cleaning operations
|
| 51 |
+
- `ihc_quantification.py` β per-spheroid DAB quantification
|
| 52 |
- `ihc_qc.py` β reusable segmentation, debris, and DAB QC drawing
|
| 53 |
- `app.py` β optional Gradio interface
|
| 54 |
- `data/` β source and example images
|
|
|
|
| 57 |
|
| 58 |
## DAB quantification
|
| 59 |
|
| 60 |
+
`ihc_quantification.py` segments individual spheroids, excludes the
|
| 61 |
debris mask, separates H-DAB stains from the original image values, and writes
|
| 62 |
one CSV row per spheroid. Image metadata such as treatment, image number, and
|
| 63 |
an optional image note is extracted from the filename.
|
| 64 |
|
| 65 |
```bash
|
| 66 |
+
uv run python ihc_quantification.py data/dab_quantification_test
|
| 67 |
```
|
| 68 |
|
| 69 |
The input can be one TIFF image or a directory. Directories are searched
|
|
|
|
| 78 |
Use `--output` to choose another CSV location:
|
| 79 |
|
| 80 |
```bash
|
| 81 |
+
uv run python ihc_quantification.py data/treatment_images \
|
| 82 |
--output out/my_results.csv
|
| 83 |
```
|
| 84 |
|
|
|
|
| 89 |
editing the script:
|
| 90 |
|
| 91 |
```bash
|
| 92 |
+
uv run python ihc_quantification.py data/treatment_images \
|
| 93 |
--max-boundary-contact-ratio 0.3 \
|
| 94 |
--watershed-marker-core-fraction 0.55 \
|
| 95 |
--watershed-minimum-relative-region-area 0.3
|
cleaning.py
CHANGED
|
@@ -312,7 +312,7 @@ def create_tissue_mask(
|
|
| 312 |
"""Return the established spheroid segmentation as a filled binary mask."""
|
| 313 |
# Imported here to avoid a module-import cycle: the quantification module
|
| 314 |
# reuses cleaning helpers before defining its segmentation function.
|
| 315 |
-
from
|
| 316 |
|
| 317 |
image = _as_display_rgb_uint8(image)
|
| 318 |
segmentation_image = image
|
|
|
|
| 312 |
"""Return the established spheroid segmentation as a filled binary mask."""
|
| 313 |
# Imported here to avoid a module-import cycle: the quantification module
|
| 314 |
# reuses cleaning helpers before defining its segmentation function.
|
| 315 |
+
from ihc_quantification import segment_spheroids
|
| 316 |
|
| 317 |
image = _as_display_rgb_uint8(image)
|
| 318 |
segmentation_image = image
|