Mercurial > hg > plosone_underreview
comparison scripts/load_features.py @ 23:56cbf155680a branch-tests
on melodia
author | mpanteli <m.x.panteli@gmail.com> |
---|---|
date | Wed, 13 Sep 2017 13:52:26 +0100 |
parents | a35bd818d8e9 |
children | 8dea2b8349c5 |
comparison
equal
deleted
inserted
replaced
22:4aa0ce25fabd | 23:56cbf155680a |
---|---|
115 # no music segments -> skip this file | 115 # no music segments -> skip this file |
116 continue | 116 continue |
117 try: | 117 try: |
118 op, mfcc = self.get_op_mfcc_for_file(df['Melspec'].iloc[i]) | 118 op, mfcc = self.get_op_mfcc_for_file(df['Melspec'].iloc[i]) |
119 ch = self.get_chroma_for_file(df['Chroma'].iloc[i]) | 119 ch = self.get_chroma_for_file(df['Chroma'].iloc[i]) |
120 #pb = self.get_pb_from_melodia(df['Melodia'].iloc[i]) | 120 pb = self.get_pb_from_melodia(df['Melodia'].iloc[i]) |
121 pb = self.load_precomputed_pb_from_melodia(df['Melodia'].iloc[i]) | 121 #pb = self.load_precomputed_pb_from_melodia(df['Melodia'].iloc[i]) |
122 #pb = self.get_contour_feat_from_melodia(df['Melodia'].iloc[i]) | 122 #pb = self.get_contour_feat_from_melodia(df['Melodia'].iloc[i]) |
123 except: | 123 except: |
124 continue | 124 continue |
125 min_n_frames = np.min([len(op), len(mfcc), len(ch), len(pb)]) # ideally, features should have the same number of frames | 125 min_n_frames = np.min([len(op), len(mfcc), len(ch), len(pb)]) # ideally, features should have the same number of frames |
126 if min_n_frames==0: | 126 if min_n_frames==0: |