fix for missing frames in plotting

This commit is contained in:
Zen 2020-07-30 12:32:40 +03:00
parent 47c73a3688
commit ba694e5a20

View file

@ -20,7 +20,7 @@ def read_vmaf_json(file, percentile):
""" """
with open(file, 'r') as f: with open(file, 'r') as f:
file = json.load(f) file = json.load(f)
vmafs = list({x['metrics']['vmaf'] for x in file['frames']}) vmafs = [x['metrics']['vmaf'] for x in file['frames']]
vmafs = [float(x) for x in vmafs if isinstance(x, float)] vmafs = [float(x) for x in vmafs if isinstance(x, float)]
calc = [x for x in vmafs if isinstance(x, float) and not isnan(x)] calc = [x for x in vmafs if isinstance(x, float) and not isnan(x)]