pyannote-audio icon indicating copy to clipboard operation
pyannote-audio copied to clipboard

ArcFace embedding task is broken

Open olvb opened this issue 2 years ago • 4 comments

Describe the bug

The SpeakerEmbedding / SupervisedRepresentationLearningWithArcFace cannot be used anymore for training since commit 0fb42ad08cb92539a37702cb7afcc20dad8871d7. It is missing an implementation of the collate_fn method.

Is this known/expected? I see that this task is not tested in pyannote-audio/tests/test_train.py

To Reproduce

import pytorch_lightning as pl

from pyannote.database import get_protocol, FileFinder
from pyannote.audio.models.embedding.debug import SimpleEmbeddingModel
from pyannote.audio.tasks import SpeakerEmbedding

protocol = get_protocol(
    "Debug.SpeakerDiarization.Debug",
    preprocessors={"audio": FileFinder()}
)

emb = SpeakerEmbedding(protocol)
model = SimpleEmbeddingModel(task=emb)
trainer = pl.Trainer(max_epochs=1)
_ = trainer.fit(model)

olvb avatar Jun 30 '22 08:06 olvb

Thanks for reporting this.

This is indeed expected but should definitely be fixed -- but unfortunately not at the top of my priority list (as I have been using speechbrain speaker embedding instead).

Would you like to contribute a fix? Or at least a test?

hbredin avatar Jun 30 '22 12:06 hbredin

Sure, I can give it a try! I suppose restoring the previous behavior relying on default_collate should be enough?

Also, do you fine tune the speechbrain ecapa embeddings or do you directly use the ones pretrained on VoxCeleb?

olvb avatar Jun 30 '22 14:06 olvb

Sure, I can give it a try! I suppose restoring the previous behavior relying on default_collate should be enough?

"Enough", I am not 100% sure. But it definitely is "needed".

Also, do you fine tune the speechbrain ecapa embeddings or do you directly use the ones pretrained on VoxCeleb?

I use them directly for the time being...

hbredin avatar Jun 30 '22 14:06 hbredin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 30 '22 23:08 stale[bot]

@olvb should be fixed in develop branch.

hbredin avatar Jan 26 '23 08:01 hbredin

Thanks! Will give it a try

olvb avatar Feb 28 '23 04:02 olvb