InsegTrainer#

class InsegTrainer(cfg)[source]#

Bases: Trainer

Trainer for instance segmentation with instance-aware collation.

Identical to Trainer except the train and val loaders use inseg_collate_fn (which preserves variable per-sample instance/query targets and applies mix_prob only at train time) over a stateful, resume-able sampler/loader. Use with the instance-segmentation losses (e.g. FastInstanceSegmentationLoss). Registered as InsegTrainer – select via train = dict(type="InsegTrainer").

build_train_loader()[source]#

Build the stateful instance-segmentation training loader.

build_val_loader()[source]#

Build the optional instance-segmentation validation loader.