From b8df2d96d7c8da057fd2702ced19732a08ab6ae4 Mon Sep 17 00:00:00 2001 From: Connectomics Team Date: Wed, 9 Sep 2026 13:30:38 -0700 Subject: [PATCH] Sanity check #volinfo == #bbox spec. PiperOrigin-RevId: 978722143 --- ffn/secgan/train.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ffn/secgan/train.py b/ffn/secgan/train.py index 77804b0..1297827 100644 --- a/ffn/secgan/train.py +++ b/ffn/secgan/train.py @@ -1245,6 +1245,11 @@ def _create_dataset_from_volinfo( """Loads volumetric data patches and normalizes them.""" if bboxes_txt is None: bboxes_txt = [None] * len(volinfo_paths) + if len(volinfo_paths) != len(bboxes_txt): + raise ValueError( + 'volinfo_paths and bboxes_txt must be same length. (Multiple bboxes ' + 'on a single volinfo should be specified as a single textproto with ' + 'multiple box entries.)') paths = {} bounding_boxes = {}