-
Create train file:
$py create_train_file.py <dir> <features> <max_files> <output filename>
<dir> is the directory containing all multimedia files divided by two folders "fake" and "real"
<features> is the number of features we want to extract from each file
<max_files> stands for the number of the files that will be selected from each folder, meaning the minimum between the fake files and real files
<output_filename> is the desired train file name. -
Create test file:
$py create_test_file.py <dir> <features> <max_files> <output filename>
<dir> is the directory containing all files target of classification
<features> is the number of features we want to extract from each file (the same number of features of train file)
<max_files> stands for the number of the files that will be selected from each folder, meaning the minimum between the fake files and real files
<output_filename> is the desired train file name. -
Run classification model:
$py svm_model.py <train file> <test file> <k-fold option>
<train file> is the train file to train the SVM model
<test file> is the file containing the files that we want to classify
<k-fold option> explains how we want to run the model.
There are 4 options for <k-fold option> :- -1 gives a classification for each object in test_file.
- 0 split the train file in 2 parts: 67% for training and 33% for testing and gives an evaluation of the model.
- 5 5-fold cross validation
- 10 10-fold cross validation
$py cnn_model.py <training folder> <testing folder> <run mode>
<Training folder> receives the folder containing files to train the CNN model. This folder must have two sub-directories: "fake" and "real".
<Testing folder> receives the folder containing the files to be classified. This folder needs to have one sub-directory called "predict".
<run_mode> explains how we want to test the model.
There are 2 options for <mode> :- 0 uses 10% of the training folder in order to test.
- 1 uses the testing folder in order to test.
-
Convert pkl file to txt:
py pkl_to_txt.py <pkl filename> <output filename>
-
Convert pkl file to csv:
py pkl_to_csv.py <pkl filename> <output filename>
*this script generates two .csv files. One for the features and one for the labels.
Scripts
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||