RicherMans / SAT

Streaming Audiotransformers for online Audio tagging
GNU General Public License v3.0
39 stars 4 forks source link

psl_labels #3

Open fuguanyu opened 10 months ago

fuguanyu commented 10 months ago

Hello thank you for the great job, In your job the .parquet file is downloaded directly.I want to know how to get the .parquet file of the category I want. Do I need to fine-tune the mae model and then perform inference?To get the pseudo label of my teacher model.

RicherMans commented 10 months ago

Hey there @fuguanyu , so I am a bit unsure what you mean by "get the .parquet file of the category I want.", but you can just read the parquet files with pandas as:

import pandas as pd
dataframe = pd.read_parquet('input_file_parquet')
print(dataframe)

I usually store the labels according to the "official" mappings: http://storage.googleapis.com/us_audioset/youtube_corpus/v1/csv/class_labels_indices.csv.

Do I need to fine-tune the mae model and then perform inference?To get the pseudo label of my teacher model.

Yes exactly that's how it was done. The trick is to simply use a finer scale at say 1-4 seconds, instead of just predicting tags on the "clip" scale.