msaf/algorithms/scluster/segmenter.py
def process(self):
        """Main process.
        Returns
        -------
        est_idxs : np.array(N) or list
            Estimated times for the segment boundaries in frame indeces.
            List if hierarchical segmentation.
        est_labels : np.array(N-1) or list
            Estimated labels for the segments.
            List if hierarchical segmentation.
        """
        # This algorithm only accepts one specific kind of features:
        # Combination of PCP + MFCC. Let's get them:
        pcp_obj = Features.select_features(
            "pcp", self.file_struct, self.annot_beats, self.framesync)
        mfcc_obj = Features.select_features(
            "mfcc", self.file_struct, self.annot_beats, self.framesync)

        # Get frame times and make sure they're the same in both features
        frame_times = pcp_obj.frame_times
        assert np.array_equal(frame_times, mfcc_obj.frame_times)

        # Brian wants PCP and MFCC
        # (tranpsosed, because he's that kind of person)
        # TODO: self.in_bound_idxs
        est_idxs, est_labels, F = main2.do_segmentation(
            pcp_obj.features.T, mfcc_obj.features.T, self.config,
            self.in_bound_idxs)

        return est_idxs, est_labels, F
def process(self):
        """Main process.
        Returns
        -------
        est_idxs : np.array(N) or list
            Estimated times for the segment boundaries in frame indeces.
            List if hierarchical segmentation.
        est_labels : np.array(N-1) or list
            Estimated labels for the segments.
            List if hierarchical segmentation.
        """
        # This algorithm only accepts one specific kind of features:
        # Combination of PCP + MFCC. Let's get them:
        pcp_obj = Features.select_features(
            "pcp", self.file_struct, self.annot_beats, self.framesync)
        mfcc_obj = Features.select_features(
            "mfcc", self.file_struct, self.annot_beats, self.framesync)

        # Get frame times and make sure they're the same in both features
        frame_times = pcp_obj.frame_times
        assert np.array_equal(frame_times, mfcc_obj.frame_times)

        # Brian wants PCP and MFCC
        # (tranpsosed, because he's that kind of person)
        # TODO: self.in_bound_idxs
        est_idxs, est_labels, F = main2.do_segmentation(
            pcp_obj.features.T, mfcc_obj.features.T, self.config,
            self.in_bound_idxs)

        return est_idxs, est_labels, F
def process ( self ) : # This algorithm only accepts one specific kind of features: # Combination of PCP + MFCC. Let's get them: pcp_obj = Features . select_features ( "pcp" , self . file_struct , self . annot_beats , self . framesync ) mfcc_obj = Features . select_features ( "mfcc" , self . file_struct , self . annot_beats , self . framesync ) # Get frame times and make sure they're the same in both features frame_times = pcp_obj . frame_times assert np . array_equal ( frame_times , mfcc_obj . frame_times ) # Brian wants PCP and MFCC # (tranpsosed, because he's that kind of person) # TODO: self.in_bound_idxs est_idxs , est_labels , F = main2 . do_segmentation ( pcp_obj . features . T , mfcc_obj . features . T , self . config , self . in_bound_idxs ) return est_idxs , est_labels , F
Main process.
        Returns
        -------
        est_idxs : np.array(N) or list
            Estimated times for the segment boundaries in frame indeces.
            List if hierarchical segmentation.
        est_labels : np.array(N-1) or list
            Estimated labels for the segments.
            List if hierarchical segmentation.
Main process . Returns ------- est_idxs : np . array ( N ) or list Estimated times for the segment boundaries in frame indeces . List if hierarchical segmentation . est_labels : np . array ( N - 1 ) or list Estimated labels for the segments . List if hierarchical segmentation .