Update api_v2

This commit is contained in:
mbsantiago 2026-03-17 22:25:41 +00:00
parent feee2bdfa3
commit 3b47c688dd

View File

@ -88,7 +88,9 @@ class BatDetect2API:
train_annotations=train_annotations, train_annotations=train_annotations,
val_annotations=val_annotations, val_annotations=val_annotations,
targets=self.targets, targets=self.targets,
config=self.config, model_config=self.config.model,
train_config=self.config.train,
audio_config=self.config.audio,
audio_loader=self.audio_loader, audio_loader=self.audio_loader,
preprocessor=self.preprocessor, preprocessor=self.preprocessor,
train_workers=train_workers, train_workers=train_workers,
@ -298,9 +300,8 @@ class BatDetect2API:
evaluator = build_evaluator(config=config.evaluation, targets=targets) evaluator = build_evaluator(config=config.evaluation, targets=targets)
# NOTE: Better to have a separate instance of # NOTE: Better to have a separate instance of preprocessor and
# preprocessor and postprocessor as these may be moved # postprocessor as these may be moved to another device.
# to another device.
model = build_model(config=config.model) model = build_model(config=config.model)
formatter = build_output_formatter(targets, config=config.output) formatter = build_output_formatter(targets, config=config.output)