← Về thư mục
skills/bioskills/bio-imaging-mass-cytometry-interactive-annotation/scripts/napari_annotation.py
- cluster_label_image · function · L11-L18 — def cluster_label_image(masks, cell_ids, cluster_of_cell): # paint each cell's cluster id onto its mask; view in napari and demand spatial coherence # (nests/zones/sheets). A cluster that scatters along the boundary between two real # clusters is a segmentation/spillover artifact, not biology.
- sample_cells_to_annotate · function · L20-L26 — def sample_cells_to_annotate(cell_ids, cell_types, per_class=300, rng=None): # over-sample rare classes toward a target; tissue is wildly imbalanced, so annotating # random fields leaves rare types unlearnable. Spread the chosen cells across patients.