[mirtoolbox] Re: MIR classify

  • From: Olivier Lartillot <olartillot@xxxxxxxxx>
  • To: mirtoolbox@xxxxxxxxxxxxx
  • Date: Tue, 23 Nov 2010 16:37:55 +0200

As a courtesy to all the other members of the list, maybe we could try to follow these guidelines:


- Please try to formulate your questions into one single email, written as clearly as possible. Informality, I would guess, is tolerated up to a certain degree.

- If your previous question has not been answered yet, please be patient, and wait before sending other mails to the list.

Thanks for your kind attention,

Olivier

Ersin Karcı kirjoitti 23.11.2010 kello 15.36:

Hi again Oliver,

I would like to explain my previous question in a more clear way. I would be more than aprreciated if you can show me a way to use my additional features (not mir features) just like the mir features used in classifcation demo.

Lets call my additional features as "ersin". I want to make them mirersin so that I can use them in classification instead of mirmfcc:


cd test_set

a= miraudio('Folder','Label',1);

cd ..

mirersin = miraudio(ersin) %getting my extra feautres extracted from the audip on the folder "test_set" in to MIR toolbox.

% ersin is 3x25 matrice where 3 features are calculated for each data in "test_set"

%% The step that I need help to convert mirersin usable for classifying the audio files in "test_set".

mirclassify(a,mirersin,b,mirersin2) % Lets say b is the training data and mirersin2 is the features for the training data.

Best Regards

Ersin


On Tue, Nov 23, 2010 at 3:10 PM, Ersin Karcı <ersin.kar@xxxxxxxxx> wrote:
Hi Oliver,

I have another question:

When MIR toolbox reads audiofiles from a folder (as in demo about the classification) it calculates features related to that mirobject (for example mfcc) and makes classification with those objects.

In this process the mfcc's are contained in one object each has mirlength 13 for each audio files contained in the audio object.

If I want to add some extra features (each has 3 dimension) from outside the mirtoolbox, I calculate those features for each audio in the audiofolder (given in classification demo), than I use miraudio function to get create audio object from those features.

Now, I want to add the additional features to the mirmfcc's calculated previously and make each feature las lengths of 16 (13mfcc + 3externally calculated features). So the feature vector for each audio file used in mirclassify will have lengths of 16.

How can I do this?

Thanks and Best regards

Ersin


On Fri, Nov 19, 2010 at 1:48 AM, Ersin Karcı <ersin.kar@xxxxxxxxx> wrote:
Hi Oliver,

Thank you for the explanations and your patients. I will try to get the summaries of my features and use as input to mirclassify. Do I have to use mirmean or mirstd? Or can I also do those operations via matlab's functions and than convert those in to mir-objects with miraudio. Because as I have mentioned I have additional features which are not included in mirtoolbox.

Just to learn more, Is it the general way of using features statistical information of features (mean,std..vs) in the audio classification applications or is there some other algorithms to use the frame decomposed features in the classification processes?

Regards

Ersin


On Thu, Nov 18, 2010 at 1:10 PM, Olivier Lartillot <olartillot@xxxxxxxxx > wrote:
Hi Ersin,

Sorry, mirclassify works only using analytic features that are *not* frame-decomposed. The purpose of that operator is to classify whole songs into categories. There is no frame classification available in mirclassify.

So if your features are decomposed into frames, you should first get a summary of them, by taking for instance their mean or standard- deviation. One simple way to get mean and std is to use mirmean and mirstd.

So write something like:
>> mirclassify (test, mirmean(mfcc_test), train, mirmean(mfcc_train))

I am updating the toolbox and user's manual with those remarks. (And also add some explanation about mirmean and mirstd).

Regards,

Olivier

Ersin Karcı kirjoitti 18.11.2010 kello 8.51:

Dear Martin,

So is there a way to use frame decompostioned version of mfcc coefficients ("a" in your previous email) in mirclassify function? I that will solve my problem.

Regards

Ersin

On Tue, Nov 16, 2010 at 11:27 PM, Martín Hartmann <martinarielhartmann@xxxxxxxx m> wrote:
Dear Ersin,

if I am correct, the default frame parameters are used for extraction
and the result gives the averaged values for each of the 13
coefficients. But let us get a frame decomposition with the
'Frame' option:

a = mirmfcc ('Amaj3', 'Frame');
mirgetdata (a)

Best,

Martin Hartmann

On Tue, Nov 16, 2010 at 11:29 PM, Ersin Karcı <ersin.kar@xxxxxxxxx> wrote:
> Dear Martin,
>
> In this example for each audio samples there are only one (13x1) mfcc > set, which actually I can not understand how it is meaningful. As far
> as I know mfcc's are calculated frame by frame and frame sizes are
> about 10-100 mseconds ( varies according to the problem). The audio
> samples should contain
> more than 1 frame so, more than 1 mfcc sets.
>
> Am I thinking wrong or am I missing some point?
>
> Sorry for too much questions and thanks for your help.
>
> Best Regards
>
> Ersin
>
>
> On Tuesday, November 16, 2010, Martín Hartmann
> <martinarielhartmann@xxxxxxxxx> wrote:
>> Dear Ersin, there is no need to use mirframe unless we wish to change
>> its default values.
>>
>> Maybe this working example using the sets in the MIRToolboxDemos
>> folder can clarify this issue.
>>
>> Martin Hartmann
>>
>> cd /Applications/Matlab/toolbox/MIRtoolbox1.3.1/MIRToolboxDemos/ test_set
>> test = miraudio ('Folder', 'Label', [1 2]);
>> cd ..
>> cd train_set
>> train = miraudio ('Folder', 'Label', [1 2]);
>> mfcc_test = mirmfcc (test);
>> mfcc_train = mirmfcc (train);
>> mirclassify (test, mfcc_test, train, mfcc_train)
>>
>>
>>
>>
>>
>> On Tue, Nov 16, 2010 at 12:50 AM, Ersin Karcı <ersin.kar@xxxxxxxxx> wrote:
>>> Dear Martin,
>>> Thank your for your reply.
>>> Unfortunatelly I couldn't get the exact solution to my problem, let me
>>> explain myself again.
>>> For example, I have an audio sample of 10 seconds.
>>>
>>> If I use the the miraudio and mirmfcc functions in order, I obtain a 13x1 >>> mfcc vector. I guess this vector is obtained by using all the audio sample. >>> But as far as I know mfcc is calculated for every each frame of the audio >>> sample. ( Lets say the frame size is 50mseconds) In this case I obtain a >>> 13x20 mfcc vector. And by using this in mirclassify I get the error in my
>>> previous email.
>>> At this step I couldn't get where I am mistaken. Does using mirframe before >>> calculating be helpful and also useful for my problem or do you prefer any
>>> other solution?
>>> Thank you and sorry for not understanding qucikly.
>>> Regards
>>> Ersin
>>>
>>> On Mon, Nov 15, 2010 at 7:35 PM, Martín Hartmann
>>> <martinarielhartmann@xxxxxxxxx> wrote:
>>>>
>>>> Dear Ersin,
>>>>
>>>> You can extract multiple analytic features from the train and test >>>> sets at the same time with mirclassify. Simply create an object for >>>> each feature (e.g., spectral centroid) or feature set (e.g., MFCCs)
>>>> you wish to use. For example: mirclassify(test, {mfcc(test),
>>>> centroid(test)}, train, {mfcc(train), centroid(train)})
>>>>
>>>> I strongly recommend you to read the page 163 of the MIRtoolbox Users'
>>>>
>>>> Guide: 
https://www.jyu.fi/hum/laitokset/musiikki/en/research/coe/materials/mirtoolbox/MIRtoolbox%20Users%20Guide%201.3
>>>>
>>>> Best,
>>>>
>>>> Martin Hartmann
>>>>
>>>> On Sun, Nov 14, 2010 at 11:49 PM, Ersin Karcı <ersin.kar@xxxxxxxx m> wrote:
>>>> >
>>>> > Dear All,
>>>> > I am trying to use mirclassify, with my additional features. As far as I >>>> > understood the there are only one set of features per one audio sample used >>>> > as an input (mirclassify(test,mfcctest,train,mfcctrain) where mfcc test is
>>>> > 13x1 feature vector).
>>>> > In my problem I am calculating those features per frames. If we assume >>>> > that the audio sample is 10 seconds length, with 50msec frames I obtain >>>> > 13x20 mfcc coefficients per audio sample. While using this as the input I
>>>> > obtain the following error:
>>>> > ??? Subscripted assignment dimension mismatch.
>>>> > Error in ==> mirclassify.mirclassify>integrate at 176
>>>> >     vtl(:,l) = vl;
>>>> > Error in ==> mirclassify.mirclassify at 39
>>>> >     vt = integrate(vt,get(dt{i},'Data'),lvt,norml);
>>>> >
>>>> > The same issue is the same for other features.
>>>> > Can you help me with this issue?
>>>> > Regards
>>>> > Ersin KARCI
>>>>
>>>>
>>>> --
>>>> Martin Ariel Hartmann
>>>> Lic. in Psychology | Music, Mind and Technology MA Candidate
>>>> +358 (0) 4 6581 2384 | martinarielhartmann@xxxxxxxxx
>>>>
>>>
>>>
>>
>>
>>
>> --
>> Martin Ariel Hartmann
>> Lic. in Psychology | Music, Mind and Technology MA Candidate
>> +358 (0) 4 6581 2384 | martinarielhartmann@xxxxxxxxx
>>
>>
>
>



--
Martin Ariel Hartmann
Lic. in Psychology | Music, Mind and Technology MA Candidate
+358 (0) 4 6581 2384 | martinarielhartmann@xxxxxxxxx







Other related posts: