mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-01-10 17:19:34 +01:00
Create separate preprocessor for the train/val datasets
This commit is contained in:
parent
cca1d82d63
commit
2f4edeffff
@ -16,6 +16,7 @@ from batdetect2.evaluate.metrics import (
|
|||||||
)
|
)
|
||||||
from batdetect2.models import Model, build_model
|
from batdetect2.models import Model, build_model
|
||||||
from batdetect2.plotting.clips import AudioLoader, build_audio_loader
|
from batdetect2.plotting.clips import AudioLoader, build_audio_loader
|
||||||
|
from batdetect2.preprocess import build_preprocessor
|
||||||
from batdetect2.train.augmentations import (
|
from batdetect2.train.augmentations import (
|
||||||
RandomAudioSource,
|
RandomAudioSource,
|
||||||
build_augmentations,
|
build_augmentations,
|
||||||
@ -75,7 +76,7 @@ def train(
|
|||||||
train_annotations,
|
train_annotations,
|
||||||
audio_loader=audio_loader,
|
audio_loader=audio_loader,
|
||||||
labeller=labeller,
|
labeller=labeller,
|
||||||
preprocessor=model.preprocessor,
|
preprocessor=build_preprocessor(config.preprocess),
|
||||||
config=config.train,
|
config=config.train,
|
||||||
num_workers=train_workers,
|
num_workers=train_workers,
|
||||||
)
|
)
|
||||||
@ -85,7 +86,7 @@ def train(
|
|||||||
val_annotations,
|
val_annotations,
|
||||||
audio_loader=audio_loader,
|
audio_loader=audio_loader,
|
||||||
labeller=labeller,
|
labeller=labeller,
|
||||||
preprocessor=model.preprocessor,
|
preprocessor=build_preprocessor(config.preprocess),
|
||||||
config=config.train,
|
config=config.train,
|
||||||
num_workers=val_workers,
|
num_workers=val_workers,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user