Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmaf model fixes #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN \
&& git clone https://github.com/Netflix/vmaf.git . \
&& make \
&& make install \
&& rm -r /tmp/vmaf
&& mv model /usr/local/share \
&& rm -r /tmp/vmaf


RUN \
Expand Down
20 changes: 10 additions & 10 deletions videobench_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,23 +220,23 @@ def set_vmaf_model(ref_obj, input_obj):
if input_obj.vmaf_model == "auto":

if ref_obj.resolution[0] > 1920: ############################################### VMAF Model
input_obj.vmaf_model = '/usr/local/share/model/vmaf_4k_v0.6.1.pkl'
input_obj.vmaf_model = '/usr/local/share/model/vmaf_4k_v0.6.1.json'
else:
input_obj.vmaf_model = '/usr/local/share/model/vmaf_float_v0.6.1.pkl'
input_obj.vmaf_model = '/usr/local/share/model/vmaf_v0.6.1.json'

elif input_obj.vmaf_model == "vmaf_float_v0.6.1.pkl":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_float_v0.6.1.pkl'
elif input_obj.vmaf_model == "vmaf_v0.6.1.json":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_v0.6.1.json'

elif input_obj.vmaf_model == "vmaf_4k_v0.6.1.pkl":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_4k_v0.6.1.pkl'
elif input_obj.vmaf_model == "vmaf_4k_v0.6.1.json":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_4k_v0.6.1.json'

elif input_obj.vmaf_model == "vmaf_float_v0.6.1.pkl:phone_model":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_float_v0.6.1.pkl:phone_model=1'
elif input_obj.vmaf_model == "vmaf_v0.6.1.json:phone_model":
input_obj.vmaf_model = '/usr/local/share/model/vmaf_v0.6.1.json:phone_model=1'


def set_scaling_filter(ref_obj, input_obj):

if input_obj.vmaf_model == "/usr/local/share/model/vmaf_float_v0.6.1.pkl" or input_obj.vmaf_model == "/usr/local/share/model/vmaf_float_v0.6.1.pkl:phone_model=1":
if input_obj.vmaf_model == "/usr/local/share/model/vmaf_v0.6.1.json" or input_obj.vmaf_model == "/usr/local/share/model/vmaf_v0.6.1.json:phone_model=1":

if ref_obj.resolution[0] == 1920 and ref_obj.resolution[1] == 1080 :
ref_obj.scale_filter = "null"
Expand All @@ -249,7 +249,7 @@ def set_scaling_filter(ref_obj, input_obj):
input_obj.scale_filter = 'scale=1920:1080:flags={}'.format(input_obj.scale_filter)


if input_obj.vmaf_model == "/usr/local/share/model/vmaf_4k_v0.6.1.pkl":
if input_obj.vmaf_model == "/usr/local/share/model/vmaf_4k_v0.6.1.json":

if ref_obj.resolution[0] == 3840 and ref_obj.resolution[1] == 2160 :
ref_obj.scale_filter = "null"
Expand Down
6 changes: 3 additions & 3 deletions videobench_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def setting_widget(self):
self.vmaf_model_setting.setAlignment(QtCore.Qt.AlignRight)
self.vmaf_model_combobox = QtWidgets.QComboBox()
self.vmaf_model_combobox.insertItem(0, "auto")
self.vmaf_model_combobox.insertItem(1, "vmaf_float_v0.6.1.pkl")
self.vmaf_model_combobox.insertItem(2, "vmaf_float_v0.6.1.pkl:phone_model")
self.vmaf_model_combobox.insertItem(3, "vmaf_4k_v0.6.1.pkl")
self.vmaf_model_combobox.insertItem(1, "vmaf_v0.6.1.json")
self.vmaf_model_combobox.insertItem(2, "vmaf_v0.6.1.json:phone_model")
self.vmaf_model_combobox.insertItem(3, "vmaf_4k_v0.6.1.json")


self.loglevel_setting = QtWidgets.QLabel()
Expand Down