Mercurial > hg > segmentation
comparison SegEval.py @ 14:6dae41887406
added funcs for ssm enhancement in segutil scipt
author | mitian |
---|---|
date | Fri, 12 Jun 2015 17:44:39 +0100 |
parents | 6d1c6639f5db |
children | b4bf37f94e92 |
comparison
equal
deleted
inserted
replaced
13:cc8ceb270e79 | 14:6dae41887406 |
---|---|
20 import matplotlib.pyplot as plt | 20 import matplotlib.pyplot as plt |
21 import matplotlib.gridspec as gridspec | 21 import matplotlib.gridspec as gridspec |
22 import numpy as np | 22 import numpy as np |
23 import scipy as sp | 23 import scipy as sp |
24 from scipy.signal import correlate2d, convolve2d, filtfilt, resample | 24 from scipy.signal import correlate2d, convolve2d, filtfilt, resample |
25 from scipy.ndimage.filters import * | |
26 from sklearn.decomposition import PCA | 25 from sklearn.decomposition import PCA |
27 from sklearn.mixture import GMM | 26 from sklearn.mixture import GMM |
28 from sklearn.cluster import KMeans | 27 from sklearn.cluster import KMeans |
29 from sklearn.preprocessing import normalize | 28 from sklearn.preprocessing import normalize |
30 from sklearn.metrics.pairwise import pairwise_distances | 29 from sklearn.metrics.pairwise import pairwise_distances |
47 import novelty as novelty_S | 46 import novelty as novelty_S |
48 | 47 |
49 # Algorithm params | 48 # Algorithm params |
50 h = 8 # Size of median filter for features in C-NMF | 49 h = 8 # Size of median filter for features in C-NMF |
51 R = 15 # Size of the median filter for the activation matrix C-NMF | 50 R = 15 # Size of the median filter for the activation matrix C-NMF |
52 rank = 4 # Rank of decomposition for the boundaries | 51 rank = 3 # Rank of decomposition for the boundaries |
53 rank_labels = 6 # Rank of decomposition for the labels | 52 rank_labels = 16 # Rank of decomposition for the labels |
54 R_labels = 6 # Size of the median filter for the labels | 53 R_labels = 4 # Size of the median filter for the labels |
55 # Foote | 54 # Foote |
56 M = 2 # Median filter for the audio features (in beats) | 55 M = 2 # Median filter for the audio features (in beats) |
57 Mg = 32 # Gaussian kernel size | 56 Mg = 32 # Gaussian kernel size |
58 L = 16 # Size of the median filter for the adaptive threshold | 57 L = 16 # Size of the median filter for the adaptive threshold |
59 # 2D-FMC | 58 # 2D-FMC |