MKLab-ITI/ndvr-dml

Error when evaluating

Closed this issue · 0 comments

First, thank you for your amazing work.
When running the evaluation part:
python evaluation.py --evaluation_set /data/p01/NDVR/CC_WEB_triplet/cc_web_video_features.npy --model_path /data/p01/NDVR/model/, I met error below:

Evaluation Results
==================
evaluation.py:43: RuntimeWarning: invalid value encountered in divide
sim = np.round(1 - dist[i] / dist.max(), decimals=6)
Traceback (most recent call last):
File "evaluation.py", line 78, in
positive_labels=args['positive_labels'], all_videos=False)
File "/home/p01/projects/NDVR/ndvr-dml-master/utils.py", line 157, in evaluate
precision, recall, thresholds = precision_recall_curve(y_target, y_score)
File "/home/p01/.conda/envs/pc2/lib/python2.7/site-packages/sklearn/metrics/ranking.py", line 522, in precision_recall_curve
sample_weight=sample_weight)
File "/home/p01/.conda/envs/pc2/lib/python2.7/site-packages/sklearn/metrics/ranking.py", line 416, in _binary_clf_curve
raise ValueError("Data is not binary and pos_label is not specified")
ValueError: Data is not binary and pos_label is not specified

I check the README.md and found that the order should be python evaluation.py --evaluation_set output_data/cc_vgg_features.npy --model_path model/ , so I think maybe I misunderstand the cc_vgg_features.npy, can you give me a instruction about how to build this npy file or there is something wrong at other part?