Skip to content

get clustering labels #4

Open
Open

Description

@taalua

Hi, Thank you for your excellent work.

I want to extract labels from the features extracted from mHubert-147 checkpoint_best.pt, using the existing k-means model. I tried to follow the script in https://github.com/utter-project/mHuBERT-147-scripts/blob/main/03_faiss_indices/apply_index_per_file.py

However, I am not sure of the *.len file. Can you explain how to get this file?

Thank you.

Activity

  1. mzboito commented on Oct 24, 2024

    @mzboito
    Contributor

    Hello,

    Many thanks for the interest in our work!

    Please be aware that the available k-means model (https://huggingface.co/utter-project/mHuBERT-147/blob/main/mhubert147_faiss.index) was trained on the 2nd iteration model (available here: https://huggingface.co/utter-project/mHuBERT-147-base-2nd-iter).
    It was NOT trained on the checkpoint_best.pt from the 3rd iteration.

    If you want to generate discrete labels using features from the 3rd iteration model (https://huggingface.co/utter-project/mHuBERT-147/blob/main/checkpoint_best.pt) you will need to train a new k-means model.

    The procedure for doing so is the following:

    1. Create manifest files for your data and extract features using this script: https://github.com/utter-project/mHuBERT-147-scripts/blob/main/02_feature_extraction/hubert_feature_extraction.sh (this will produce .npy and .len features)
    2. Train the model using your extracted features: https://github.com/utter-project/mHuBERT-147-scripts/tree/main/03_faiss_indices
    3. Extract the labels using the script you mentioned (https://github.com/utter-project/mHuBERT-147-scripts/blob/main/03_faiss_indices/apply_index_per_file.py)
  2. taalua commented on Oct 24, 2024

    @taalua
    Author

    Thank you for your prompt response. Just to clarify, If I want to get discrete label from 2nd iteration, I can use this script https://github.com/utter-project/mHuBERT-147-scripts/blob/main/03_faiss_indices/apply_index_per_file.py

    Thank you.

  3. mzboito commented on Oct 25, 2024

    @mzboito
    Contributor

    Yes. You just need to extract the features first!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions