Skip to content

refactor: Harmonize detectors output and interfaces

Gaspard Defréville requested to merge 26-harmonize-detectors-output into main

In this MR:

  • add the abstractmethod process_raw_output to Detector
    • in this method: the "raw" csv (output of patched submodule) is processed to a standardised csv format (img_path | model_name | raw_output | fake_probability)
    • calculations on the raw_output (score outputted by the detectors) to get a common "fake_probability" of a given image
  • to standardize interfaces:
    • inferences are splitted by models for DMDeepfakeDetectionDetector
    • model_name is set for each instance of DeepfakeBenchDetector, DMDeepfakeDetectionDetector and SIDBenchDetector
  • tests:
    • assertions for testing detectors are grouped in a common check_output_run_detection_on_dir function

hotfix:

  • in code_aimagelab.patch : wrong path (folder path was duplicated) when saving as csv (-> add test to ensure that img_path exists)

Closes #26 (closed)

Edited by Gaspard Defréville

Merge request reports

Loading