ljj898 / CMDFD-Dataset-and-Deepfake-Detection

7 stars 0 forks source link

test.py error #5

Open crankyz opened 1 month ago

crankyz commented 1 month ago

Dosent matter on what dataset but got this error test.py W2L ---------loading data------- <_io.TextIOWrapper name='./csvfile\\W2L.csv' mode='r' encoding='utf-8'> ASR & VSR frozen 08-15 10:25:53 Model para number = 15.01 best.model model loading down Traceback (most recent call last): File "C:\Projects\CMDFD-Dataset-and-Deepfake-Detection\test.py", line 81, in main() File "C:\Projects\CMDFD-Dataset-and-Deepfake-Detection\test.py", line 67, in main result=s.evaluate_network(epoch = epoch, loader = valLoader, *vars(args)) File "C:\Projects\CMDFD-Dataset-and-Deepfake-Detection\MTL_DDF.py", line 144, in evaluate_network bacc, roc_auc = evaluate_auc(all_labels, all_preds, all_pos_scores) File "C:\Projects\CMDFD-Dataset-and-Deepfake-Detection\utils\metrics.py", line 39, in evaluate_auc roc_auc = get_roc_auc(y_true, y_pos_score) File "C:\Projects\CMDFD-Dataset-and-Deepfake-Detection\utils\metrics.py", line 15, in get_roc_auc return metrics.roc_auc_score(y_true, y_pos_score) File "C:\Users\mje68pf.conda\envs\ExpCorre\lib\site-packages\sklearn\utils_param_validation.py", line 214, in wrapper return func(args, **kwargs) File "C:\Users\mje68pf.conda\envs\ExpCorre\lib\site-packages\sklearn\metrics_ranking.py", line 627, in roc_auc_score return _average_binary_score( File "C:\Users\mje68pf.conda\envs\ExpCorre\lib\site-packages\sklearn\metrics_base.py", line 75, in _average_binary_score return binary_metric(y_true, y_score, sample_weight=sample_weight) File "C:\Users\mje68pf.conda\envs\ExpCorre\lib\site-packages\sklearn\metrics_ranking.py", line 382, in _binary_roc_auc_score raise ValueError( ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.

ljj898 commented 3 weeks ago

Thank you for your interest in our project. Could you please double-check the issue after downloading the updated teacher model weights from our Google Drive link? If you need further assistance, please let us know. Thank you!

crankyz commented 3 weeks ago

thank you for answer, but still same error.

ljj898 commented 3 weeks ago

The issue arises from the ground truth data provided. Please ensure that your CSV file includes both original(real) and W2L(fake) video items. Check and, if necessary, update the load paths in the load_audio_features and load_visual_features functions within dataLoader.py. we have removed unnecessary path modifications in the current repository version. Also please make sure to use the Entirel_Label in your code for accurate processing.