forked from JoshuaEbenezer/ChipQA
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtesting.py
More file actions
23 lines (16 loc) · 759 Bytes
/
testing.py
File metadata and controls
23 lines (16 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
from joblib import dump, load
from sklearn import preprocessing
import argparse
random_seed = 21
parser = argparse.ArgumentParser(description='Test on a video with an SVR that has been trained on the LIVE-APV dataset with a feature dictionary generated by chipqa.py')
parser.add_argument('input_feature_file',help='File containing input features generated by chipqa.py (extension: .z)')
args = parser.parse_args()
sts_kurt_feats = load(args.input_feature_file)
sts_kurt_features = np.reshape(sts_kurt_feats['features'],(1,-1))
grid_svr = load("LIVE_Livestream_trained_svr.z")
scaler =load("LIVE_Livestream_fitted_scaler.z")
X_train = scaler.transform(sts_kurt_features)
print(X_train)
score = grid_svr.predict(X_train)
print(score)