harritaylor / torchvggish

Pytorch port of Google Research's VGGish model used for extracting audio features.
Apache License 2.0
374 stars 66 forks source link

The url link of the weights of VGGish model has been out of work. #1

Closed HeterCol closed 5 years ago

HeterCol commented 5 years ago

I am using VGGish model as a part of my model to extract the features of input audio. However, I can not open the url link you have post on the Github. So could you please update the url link or tell me how to import the weights of the pretrained VGGish model?

Thanks a lot.

HeterCol commented 5 years ago

I have download the file 'vggish_model.ckpt', I want to know if it is the weight of the VGGish model. When I use the following code to import the weight in Pytorch, I get some error message.

        model.load_state_dict(torch.load('vggish_model.ckpt'))

The error message is "_pickle.UnpicklingError: invalid load key, '\x00'." , and I do not know how to solve this problem or how to import the weight of pretrained VGGish model correctly.

harritaylor commented 5 years ago

Hi, Thank you for taking an interest in this work. Apologies for the confusion, this repo is very much a work in progress and I haven't been keeping it clean. I have moved all the resources for development to the dev branch, and only the essential stuff is on master now. I have updated the readme and have corrected the url for downloading the weights.

However, at the time of writing I have only managed to get the convolutional layers weights working in pytorch, so it will not currently create the 128-d embeddings described by google. This is something I'm hoping to fix over the next week. If you need to get results soon, I would recommend using the tensor flow implementation of VGGish.

Regardless, if you make a fresh clone of the repo and run python3 vggish.py, it should download the required weights automatically and you can start using the model.