Exemplo n.º 1
0
    def test_run_speed_matlab_runner(self):
        print 'test on running SPEED Matlab runner...'
        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing(
        )

        self.runner = SpEEDMatlabQualityRunner([asset, asset_original],
                                               None,
                                               fifo_mode=True,
                                               delete_workdir=True,
                                               result_store=None)
        self.runner.run(parallelize=True)

        results = self.runner.results
        self.assertAlmostEqual(
            results[0]['SpEED_Matlab_feature_sspeed_4_score'],
            5.155523354166667,
            places=4)
        self.assertAlmostEqual(
            results[0]['SpEED_Matlab_feature_tspeed_4_score'],
            15.091642416666668,
            places=4)
        self.assertAlmostEqual(results[0]['SpEED_Matlab_score'],
                               78.4927784076698,
                               places=4)
        self.assertAlmostEqual(
            results[1]['SpEED_Matlab_feature_sspeed_4_score'], 0.0, places=4)
        self.assertAlmostEqual(
            results[1]['SpEED_Matlab_feature_tspeed_4_score'], 0.0, places=4)
        self.assertAlmostEqual(results[1]['SpEED_Matlab_score'], 0.0, places=4)
Exemplo n.º 2
0
class ParallelMatlabQualityRunnerTest(unittest.TestCase):

    def tearDown(self):
        if hasattr(self, 'runner'):
            self.runner.remove_results()
            pass

    def setUp(self):
        self.result_store = FileSystemResultStore()

    def test_run_strrred_runner(self):

        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing()

        self.runner = StrredQualityRunner(
            [asset, asset_original],
            None, fifo_mode=True,
            delete_workdir=True,
            result_store=None
        )
        self.runner.run(parallelize=True)

        results = self.runner.results

        self.assertEqual(self.runner.VERSION, "F1.3-1.1")
        self.assertAlmostEqual(results[0]['STRRED_feature_srred_score'], 3.0166328541666663, places=4)
        self.assertAlmostEqual(results[0]['STRRED_feature_trred_score'], 7.338665770833333, places=4)
        self.assertAlmostEqual(results[0]['STRRED_score'], 22.336452104611016, places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_srred_score'], 0.0, places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_trred_score'], 0.0, places=4)
        self.assertAlmostEqual(results[1]['STRRED_score'], 0.0, places=4)

    def test_run_speed_matlab_runner(self):

        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing()

        self.runner = SpEEDMatlabQualityRunner(
            [asset, asset_original],
            None, fifo_mode=True,
            delete_workdir=True,
            result_store=None
        )
        self.runner.run(parallelize=True)

        results = self.runner.results
        self.assertAlmostEqual(results[0]['SpEED_Matlab_feature_sspeed_4_score'], 5.155523354166667, places=4)
        self.assertAlmostEqual(results[0]['SpEED_Matlab_feature_tspeed_4_score'], 15.091642416666668, places=4)
        self.assertAlmostEqual(results[0]['SpEED_Matlab_score'], 78.4927784076698, places=4)
        self.assertAlmostEqual(results[1]['SpEED_Matlab_feature_sspeed_4_score'], 0.0, places=4)
        self.assertAlmostEqual(results[1]['SpEED_Matlab_feature_tspeed_4_score'], 0.0, places=4)
        self.assertAlmostEqual(results[1]['SpEED_Matlab_score'], 0.0, places=4)
Exemplo n.º 3
0
    def test_run_strrred_runner(self):
        print 'test on running STRRED runner...'
        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing(
        )

        self.runner = StrredQualityRunner([asset, asset_original],
                                          None,
                                          fifo_mode=True,
                                          delete_workdir=True,
                                          result_store=None)
        self.runner.run(parallelize=True)

        results = self.runner.results

        self.assertEqual(self.runner.VERSION, "F1.2-1.1")
        self.assertAlmostEqual(results[0]['STRRED_feature_srred_score'],
                               3.0114681041666671,
                               places=4)
        self.assertAlmostEqual(results[0]['STRRED_feature_trred_score'],
                               7.3039486249999994,
                               places=4)
        self.assertAlmostEqual(results[0]['STRRED_score'],
                               21.995608318659482,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_srred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_trred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_score'], 0.0, places=4)
Exemplo n.º 4
0
    def test_run_strrred_runner(self):

        ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing(
        )

        self.runner = StrredQualityRunner([asset, asset_original],
                                          None,
                                          fifo_mode=True,
                                          delete_workdir=True,
                                          result_store=None)
        self.runner.run(parallelize=True)

        results = self.runner.results

        self.assertEqual(self.runner.VERSION, "F1.3-1.1")
        self.assertAlmostEqual(results[0]['STRRED_feature_srred_score'],
                               3.0166328541666663,
                               places=4)
        self.assertAlmostEqual(results[0]['STRRED_feature_trred_score'],
                               7.338665770833333,
                               places=4)
        self.assertAlmostEqual(results[0]['STRRED_score'],
                               22.336452104611016,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_srred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_feature_trred_score'],
                               0.0,
                               places=4)
        self.assertAlmostEqual(results[1]['STRRED_score'], 0.0, places=4)