msaf/algorithms/vmo/segmenter.py
def processFlat(self):
        """Main process.
        Returns
        -------
        est_idxs : np.array(N)
            Estimated indeces the segment boundaries in frame indeces.
        est_labels : np.array(N-1)
            Estimated labels for the segments.
        """
        # Preprocess to obtain features (array(n_frames, n_features))

        F = self._preprocess()
        F = librosa.util.normalize(F, axis=0)
        F = librosa.feature.stack_memory(F.T).T

        self.config["hier"] = False
        my_bounds, my_labels, _ = main.scluster_segment(F, self.config, self.in_bound_idxs)

        # Post process estimations
        est_idxs, est_labels = self._postprocess(my_bounds, my_labels)

        assert est_idxs[0] == 0 and est_idxs[-1] == F.shape[0] - 1
        # We're done!
        return est_idxs, est_labels
def processFlat(self):
        """Main process.
        Returns
        -------
        est_idxs : np.array(N)
            Estimated indeces the segment boundaries in frame indeces.
        est_labels : np.array(N-1)
            Estimated labels for the segments.
        """
        # Preprocess to obtain features (array(n_frames, n_features))

        F = self._preprocess()
        F = librosa.util.normalize(F, axis=0)
        F = librosa.feature.stack_memory(F.T).T

        self.config["hier"] = False
        my_bounds, my_labels, _ = main.scluster_segment(F, self.config, self.in_bound_idxs)

        # Post process estimations
        est_idxs, est_labels = self._postprocess(my_bounds, my_labels)

        assert est_idxs[0] == 0 and est_idxs[-1] == F.shape[0] - 1
        # We're done!
        return est_idxs, est_labels
def processFlat ( self ) : # Preprocess to obtain features (array(n_frames, n_features)) F = self . _preprocess ( ) F = librosa . util . normalize ( F , axis = 0 ) F = librosa . feature . stack_memory ( F . T ) . T self . config [ "hier" ] = False my_bounds , my_labels , _ = main . scluster_segment ( F , self . config , self . in_bound_idxs ) # Post process estimations est_idxs , est_labels = self . _postprocess ( my_bounds , my_labels ) assert est_idxs [ 0 ] == 0 and est_idxs [ - 1 ] == F . shape [ 0 ] - 1 # We're done! return est_idxs , est_labels
Main process.
        Returns
        -------
        est_idxs : np.array(N)
            Estimated indeces the segment boundaries in frame indeces.
        est_labels : np.array(N-1)
            Estimated labels for the segments.
Main process . Returns ------- est_idxs : np . array ( N ) Estimated indeces the segment boundaries in frame indeces . est_labels : np . array ( N - 1 ) Estimated labels for the segments .