Exemplo n.º 1
0
    def test_get_log_file_path(self):

        asset = Asset(dataset="test", content_id=0, asset_id=1,
                      ref_path="dir/refvideo.yuv", dis_path="dir/disvideo.yuv",
                      asset_dict={'width':720, 'height':480,
                                  'start_frame':2, 'end_frame':2},
                      workdir_root="my_workdir_root")

        fextractor = VmafFeatureExtractor([asset], None)
        log_file_path = fextractor._get_log_file_path(asset)
        self.assertTrue(re.match(r"^my_workdir_root/[a-zA-Z0-9-]+/VMAF_feature_V0.2.1_test_0_1_refvideo_720x480_2to2_vs_disvideo_720x480_2to2_q_720x480$", log_file_path))
Exemplo n.º 2
0
    def test_run_vmaf_fextractor_not_unique(self):
        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=0,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=0,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324
                               })

        with self.assertRaises(AssertionError):
            self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                                   None,
                                                   fifo_mode=True)
Exemplo n.º 3
0
    def test_get_log_file_path(self):
        import hashlib

        asset = Asset(
            dataset="test",
            content_id=0,
            asset_id=1,
            ref_path="dir/refvideo.yuv",
            dis_path="dir/disvideo.yuv",
            asset_dict={"width": 720, "height": 480, "start_frame": 2, "end_frame": 2},
            workdir_root="my_workdir_root",
        )

        fextractor = VmafFeatureExtractor([asset], None)
        log_file_path = fextractor._get_log_file_path(asset)
        h = hashlib.sha1("test_0_1_refvideo_720x480_2to2_vs_disvideo_720x480_2to2_q_720x480").hexdigest()
        self.assertTrue(re.match(r"^my_workdir_root/[a-zA-Z0-9-]+/VMAF_feature_V0.2.2b_{}$".format(h), log_file_path))
Exemplo n.º 4
0
 def test_executor_id(self):
     asset = Asset(dataset="test",
                   content_id=0,
                   asset_id=1,
                   ref_path="dir/refvideo.yuv",
                   dis_path="dir/disvideo.yuv",
                   asset_dict={})
     fextractor = VmafFeatureExtractor([asset], None)
     self.assertEquals(fextractor.executor_id, "VMAF_feature_V0.2.1")
Exemplo n.º 5
0
    def test_run_vamf_fextractor(self):
        print 'test on running VMAF feature extractor...'
        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test", content_id=0, asset_id=0,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={'width':576, 'height':324})

        asset_original = Asset(dataset="test", content_id=0, asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=ref_path,
                      asset_dict={'width':576, 'height':324})

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

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'], 0.44455808333333313, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'], 3.5916076041666667, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'], 0.9254334398006141, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'], 22.533456770833329, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_num_score'], 644527.3311971038, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_den_score'], 1449635.3812459996, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_num_score'], 6899.815530270836, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_den_score'], 7535.801140312499, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_anpsnr_score'], 34.15266368750002, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale0_score'], 0.3655846219305399, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale1_score'], 0.7722301581694561, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale2_score'], 0.8681486658208089, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale3_score'], 0.9207121810522212, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'], 3.5916076041666667, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'], 30.030914145833322, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_num_score'], 1449635.3522745417, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_den_score'], 1449635.3812459996, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_num_score'], 7535.801140312499, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_den_score'], 7535.801140312499, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_anpsnr_score'], 41.65012097916668, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale0_score'], 1.0000000132944864, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale1_score'], 0.9999998271651448, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale2_score'], 0.9999998649680067, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale3_score'], 0.9999998102499, places=4)
Exemplo n.º 6
0
    def _run_on_asset(self, asset):
        # Override Executor._run_on_asset(self, asset)
        vmaf_fassembler = self._get_vmaf_feature_assembler_instance(asset)
        vmaf_fassembler.run()
        feature_result = vmaf_fassembler.results[0]
        result_dict = {
            self.get_scores_key(): feature_result[VmafFeatureExtractor.get_scores_key(self.FEATURE_NAME)]
        }

        return Result(asset, self.executor_id, result_dict)
Exemplo n.º 7
0
    def test_run_vamf_fextractor_with_result_store(self):
        print 'test on running VMAF feature extractor with result store...'
        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=0,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=1,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324
                               })

        result_store = FileSystemResultStore(logger=None)

        self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                               None,
                                               fifo_mode=True,
                                               result_store=result_store)

        print '    running for the first time with fresh calculation...'
        self.fextractor.run()
        result0, result1 = self.fextractor.results

        self.assertTrue(
            os.path.exists(result_store._get_result_file_path(result0)))
        self.assertTrue(
            os.path.exists(result_store._get_result_file_path(result1)))

        print '    running for the second time with stored results...'
        self.fextractor.run()
        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'],
                               0.44455808333333313)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'],
                               3.5916076041666667)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'],
                               0.9254334398006141)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'],
                               22.533456770833329)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_num_score'],
                               644527.3311971038)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_den_score'],
                               1449635.3812459996)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_num_score'],
                               6899.815530270836)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_den_score'],
                               7535.801140312499)
        self.assertAlmostEqual(results[0]['VMAF_feature_anpsnr_score'],
                               34.15266368750002)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale0_score'],
                               0.3655846219305399)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale1_score'],
                               0.7722301581694561)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale2_score'],
                               0.8681486658208089)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale3_score'],
                               0.9207121810522212)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'], 1.0)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'],
                               3.5916076041666667)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'], 1.0)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'],
                               30.030914145833322)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_num_score'],
                               1449635.3522745417)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_den_score'],
                               1449635.3812459996)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_num_score'],
                               7535.801140312499)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_den_score'],
                               7535.801140312499)
        self.assertAlmostEqual(results[1]['VMAF_feature_anpsnr_score'],
                               41.65012097916668)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale0_score'],
                               1.0000000132944864)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale1_score'],
                               0.9999998271651448)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale2_score'],
                               0.9999998649680067)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale3_score'],
                               0.9999998102499)
Exemplo n.º 8
0
    def test_run_vamf_fextractor(self):
        print 'test on running VMAF feature extractor...'
        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test", content_id=0, asset_id=0,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={'width':576, 'height':324})

        asset_original = Asset(dataset="test", content_id=0, asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=ref_path,
                      asset_dict={'width':576, 'height':324})

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

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'], 0.4460930625, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'], 4.04982535417, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'],0.925421075027, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'], 23.5095715208, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_num_score'], 712650.023478, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_den_score'], 1597314.95249, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_num_score'], 6899.24648475, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_den_score'], 7535.29963308, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_anpsnr_score'], 34.164776875, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale0_score'], 0.363420489439, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale1_score'], 0.766647542135, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale2_score'], 0.862854666902, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_vif_scale3_score'], 0.915971778036, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_adm_scale0_score'], 0.86711114907261122, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_scale1_score'], 0.87407085185224942, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_scale2_score'], 0.92448300466700284, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_scale3_score'], 0.96367203202196239, places=4)

        self.assertAlmostEqual(results[0]['VMAF_feature_vif2_score'], 0.72722361912801026, places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm3_score'], 0.90733425940345658, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'], 4.04982535417, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'], 31.2714392708, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_num_score'], 1597314.86733, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_den_score'], 1597314.95249, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_num_score'], 7535.29963308, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_den_score'], 7535.29963308, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_anpsnr_score'], 41.9266444375, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale0_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale1_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale2_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_vif_scale3_score'], 1.0, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_adm_scale0_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_scale1_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_scale2_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_scale3_score'], 1.0, places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif2_score'], 1.0, places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm3_score'], 1.0, places=4)
Exemplo n.º 9
0
    def test_run_vmaf_fextractor_with_cropping(self):
        # crop_cmd: 288:162:144:81 - crop to 288x162 with upper-left pixel
        # starting at coordinate (144, 81)

        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324,
                          'crop_cmd': '288:162:144:81',
                          'quality_width': 288,
                          'quality_height': 162,
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=2,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324,
                                   'crop_cmd': '288:162:144:81',
                                   'quality_width': 288,
                                   'quality_height': 162,
                               })

        self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                               None,
                                               fifo_mode=False)

        self.fextractor.run(parallelize=False)

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'],
                               0.45365762500000012,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'],
                               2.8779373333333331,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'],
                               0.91519481795660607,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'],
                               23.942050354166668,
                               places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'],
                               2.8779373333333331,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'],
                               31.71648420833333,
                               places=4)
Exemplo n.º 10
0
    def test_run_vmaf_fextractor_with_cropping_and_padding_to_original_wh(
            self):
        # crop_cmd: 288:162:144:81 - crop to the center 288x162 image
        # pad_cmd: iw+288:ih+162:144:81 - pad back to the original size

        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324,
                          'crop_cmd': '288:162:144:81',
                          'pad_cmd': 'iw+288:ih+162:144:81',
                          'quality_width': 576,
                          'quality_height': 324,
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=2,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324,
                                   'crop_cmd': '288:162:144:81',
                                   'pad_cmd': 'iw+288:ih+162:144:81',
                                   'quality_width': 576,
                                   'quality_height': 324,
                               })

        self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                               None,
                                               fifo_mode=True)

        self.fextractor.run(parallelize=True)

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'],
                               0.64106379166666672,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'],
                               0.7203213958333331,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'],
                               0.93767663859084349,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'],
                               32.78451041666667,
                               places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'],
                               0.7203213958333331,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'],
                               40.280504208333333,
                               places=4)
Exemplo n.º 11
0
    def test_run_vmaf_fextractor_with_resampling(self):
        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324,
                          'quality_width': 160,
                          'quality_height': 90
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=2,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324,
                                   'quality_width': 160,
                                   'quality_height': 90
                               })

        self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                               None,
                                               fifo_mode=False)

        self.fextractor.run(parallelize=False)

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'],
                               0.782546520833,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'],
                               1.3216766875,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm_score'],
                               0.966705166667,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'],
                               28.0085990417,
                               places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'],
                               1.3216766875,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'],
                               31.811350125,
                               places=4)
Exemplo n.º 12
0
    def test_run_vmaf_fextractor_with_padding(self):
        # pad_cmd: iw+100:ih+100:50:50 - pad to (iw+100)x(ih+100), where iw is
        # input width, ih is input height, and starting point is (-50, -50)

        ref_path = config.ROOT + "/resource/yuv/src01_hrc00_576x324.yuv"
        dis_path = config.ROOT + "/resource/yuv/src01_hrc01_576x324.yuv"
        asset = Asset(dataset="test",
                      content_id=0,
                      asset_id=1,
                      workdir_root=config.ROOT + "/workspace/workdir",
                      ref_path=ref_path,
                      dis_path=dis_path,
                      asset_dict={
                          'width': 576,
                          'height': 324,
                          'pad_cmd': 'iw+100:ih+100:50:50',
                          'quality_width': 676,
                          'quality_height': 424,
                      })

        asset_original = Asset(dataset="test",
                               content_id=0,
                               asset_id=2,
                               workdir_root=config.ROOT + "/workspace/workdir",
                               ref_path=ref_path,
                               dis_path=ref_path,
                               asset_dict={
                                   'width': 576,
                                   'height': 324,
                                   'pad_cmd': 'iw+100:ih+100:50:50',
                                   'quality_width': 676,
                                   'quality_height': 424,
                               })

        self.fextractor = VmafFeatureExtractor([asset, asset_original],
                                               None,
                                               fifo_mode=True)

        self.fextractor.run(parallelize=False)

        results = self.fextractor.results

        self.assertAlmostEqual(results[0]['VMAF_feature_vif_score'],
                               0.51023564583333325,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_motion_score'],
                               2.6397702083333332,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_adm2_score'],
                               0.94050402763695473,
                               places=4)
        self.assertAlmostEqual(results[0]['VMAF_feature_ansnr_score'],
                               26.893242291666667,
                               places=4)

        self.assertAlmostEqual(results[1]['VMAF_feature_vif_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_motion_score'],
                               2.6397702083333332,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_adm2_score'],
                               1.0,
                               places=4)
        self.assertAlmostEqual(results[1]['VMAF_feature_ansnr_score'],
                               34.306043416666668,
                               places=4)