@@ -306,10 +306,10 @@ def prepare_maisi_controlnet_json_dataloader(
306306 LoadImaged (keys = ["image" , "label" ], image_only = True , ensure_channel_first = True ),
307307 Orientationd (keys = ["label" ], axcodes = "RAS" ),
308308 EnsureTyped (keys = ["label" ], dtype = torch .uint8 , track_meta = True ),
309- Lambdad (keys = "top_region_index" , func = lambda x : torch .FloatTensor (x )),
310- Lambdad (keys = "bottom_region_index" , func = lambda x : torch .FloatTensor (x )),
309+ Lambdad (keys = "top_region_index" , func = lambda x : torch .FloatTensor (x ), allow_missing_keys = True ),
310+ Lambdad (keys = "bottom_region_index" , func = lambda x : torch .FloatTensor (x ), allow_missing_keys = True ),
311311 Lambdad (keys = "spacing" , func = lambda x : torch .FloatTensor (x )),
312- Lambdad (keys = ["top_region_index" , "bottom_region_index" , "spacing" ], func = lambda x : x * 1e2 ),
312+ Lambdad (keys = ["top_region_index" , "bottom_region_index" , "spacing" ], func = lambda x : x * 1e2 , allow_missing_keys = True ),
313313 ]
314314 train_transforms , val_transforms = Compose (common_transform ), Compose (common_transform )
315315
0 commit comments