kPsarakis/Image-Forgery-Detection-CNN

Didn't get step 3 in Five step pipeline?

Closed this issue · 2 comments

@kPsarakis @achilleasvlogiaris @arkajitb @psoilis

"Extract SVM patches: same as step 1 but with different arguments."

Hi @prashant334

this was a mistake on our part, let me clear out the confusion. The "new" steps are the following (we will also change them in the README):

  1. Extract CNN training patches: as shown in extract_patches.py

  2. Train CNN: open the train_net.py and change DATA_DIR to point to the patches path extracted from the previous step. Run the script, it will save the trained network as shown in

    torch.save(cnn.state_dict(), 'Cnn.pt')

  3. Compute image features: as shown in feature_extraction.py. Here you will need to provide the trained CNN as input from the previous step. Change the path in the following line

    model.load_state_dict(torch.load('../data/output/pre_trained_cnn/CASIA2_WithRot_LR001_b128_nodrop.pt',

  4. Run SVM cross-validation: change the features path in svm_classification.py at line 5 to point to the latest feature extraction. Run the script.

the different steps are also described in the report. Section 3.3 refers to the first two steps, section 3.4 to the rest. The hyperparameters that we used and the experiment pipeline are described in section 4.

apologies again for the confusion, we hope it is more clear now.