cellmap_flow.dashboard.routes.finetune.yaml_crops
Endpoint for bulk-loading externally annotated crops via a YAML manifest.
Design
A YAML manifest is conceptually a different way to seed an annotation
volume, alongside “New Volume” (empty) and “Resume Existing Volume”
(copy a prior session). Importing crops writes them straight into the
session’s annotation_volume.zarr at their correct physical offsets, so
the result is identical in shape to a painted volume — one editable layer
in neuroglancer, served via MinIO, picked up by the existing periodic-sync
machinery, and consumed by training via VirtualPatchDataset.
Painted scribbles + imported GT crops therefore share one source of truth (the volume zarr). The user can paint over imports to fix GT errors or to add corrections in regions the GT doesn’t cover. The trainer sees the union by construction.
Routes: POST /api/finetune/load-crops (the import), GET
/api/finetune/load-crops-progress (how far an import has got) and GET
/api/finetune/read-yaml (a YAML file’s text, for the editor).
Attributes
Functions
Import crops from a YAML manifest into the session's annotation_volume. |
|
Return current progress for an in-flight |
|
Return the contents of a YAML file so the dashboard can preview/edit it. |
Module Contents
- cellmap_flow.dashboard.routes.finetune.yaml_crops.logger
- cellmap_flow.dashboard.routes.finetune.yaml_crops.load_crops_from_yaml()
Import crops from a YAML manifest into the session’s annotation_volume.
Request JSON: see requests.LoadCrops.
- cellmap_flow.dashboard.routes.finetune.yaml_crops.get_load_crops_progress()
Return current progress for an in-flight
/api/finetune/load-cropscall.
- cellmap_flow.dashboard.routes.finetune.yaml_crops.read_yaml()
Return the contents of a YAML file so the dashboard can preview/edit it.
read_yaml_file()decides which files may be read: the dashboard listens on every interface, and this used to return any file the user could read.