Ejemplo n.º 1
0
 def _run_on_asset(self, asset):
     vmaf_fassembler = self._get_feature_assembler_instance(asset)
     vmaf_fassembler.run()
     feature_result = vmaf_fassembler.results[0]
     result_dict = {}
     result_dict.update(feature_result.result_dict.copy()) # add feature result
     result_dict[self.get_scores_key()] = feature_result.result_dict[
         StrredOptFeatureExtractor.get_scores_key('strred')] # add strred score
     del result_dict[StrredOptFeatureExtractor.get_scores_key('strred')] # delete redundant
     return Result(asset, self.executor_id, result_dict)
Ejemplo n.º 2
0
    def test_run_strredOpt_fextractor(self):

        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing(
        )

        self.fextractor = StrredOptFeatureExtractor([asset, asset_original],
                                                    None,
                                                    fifo_mode=True,
                                                    result_store=None)
        self.fextractor.run(parallelize=False)

        results = self.fextractor.results

        # notice that these numbers are the same with ST-RRED, since the opt version should always produce identical results
        self.assertAlmostEqual(results[0]['STRREDOpt_feature_srred_score'],
                               3.0166328541666663,
                               places=4)
        self.assertAlmostEqual(results[0]['STRREDOpt_feature_trred_score'],
                               7.338665770833333,
                               places=4)
        self.assertAlmostEqual(results[0]['STRREDOpt_feature_strred_score'],
                               22.336452104611016,
                               places=4)
        self.assertAlmostEqual(results[1]['STRREDOpt_feature_srred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRREDOpt_feature_trred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRREDOpt_feature_strred_score'],
                               0.0,
                               places=4)