VGGish | An implementation of vggish in keras with tf backend | Machine Learning library
kandi X-RAY | VGGish Summary
kandi X-RAY | VGGish Summary
An implementation of vggish in keras with tf backend
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Preprocess a sound
- Convert a spectrogram to a mel matrix
- Calculate the log - likelihood spectrum
- Generate a frame of data
- Compute the STFT magnitude
- Calculate periodic Hann
- Convert frequency to mel coefficient
VGGish Key Features
VGGish Examples and Code Snippets
Community Discussions
Trending Discussions on VGGish
QUESTION
I want to train Googles VGGish network (Hershey et al 2017) from scratch to predict classes specific to my own audio files.
For this I am using the vggish_train_demo.py script available on their github repo which uses tensorflow. I've been able to modify the script to extract melspec features from my own audio by changing the _get_examples_batch()
function, and, then train the model on the output of this function. This runs to completetion and prints the loss at each epoch.
However, I've been unable to figure out how to get this trained model to generate predictions from new data. Can this be done with changes to the vggish_train_demo.py script?
...ANSWER
Answered 2022-Mar-10 at 12:05For anyone who stumbles across this in the future, I wrote this script which does the job. You must save logmel specs for train and test data in the arrays: X_train, y_train, X_test, y_test. The X_train/test are arrays of the (n, 96,64) features and the y_train/test are arrays of shape (n, _NUM_CLASSES) for two classes, where n = the number of 0.96s audio segments and _NUM_CLASSES = the number of classes used.
See the function definition statement for more info and the vggish github in my original post:
QUESTION
I am training a model that adds a couple of layers to the predifined VGGish network (see github repo), so that it can predict the class of input logmel spectrograms extracted from audio files (full code at bottom).
I generate X_train, X_test, y_train, y_test
sets from a previous function first and then run the main()
codeblock. This predicts the classes of the X_test
at line 78 and prints these:
ANSWER
Answered 2022-Feb-10 at 17:26You are outputing the linear-layer before the sigmoid. Change the code as following:
QUESTION
I'm trying to follow along with what the code is doing for VGGish and I came across a piece that I don't really understand. In vggish_input.py there is this:
...ANSWER
Answered 2021-Mar-23 at 12:1632768 is 2^15. int16 has a range of -32768 to +32767. If you have int16 as input and divide it by 2^15, you get a number between -1 and +1.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install VGGish
You can use VGGish like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page