refactor: Harmonize detectors output and interfaces
In this MR:
- add the abstractmethod
process_raw_output
toDetector
- 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
- in this method: the "raw" csv (output of patched submodule) is processed to a standardised csv format (
- to standardize interfaces:
- inferences are splitted by models for
DMDeepfakeDetectionDetector
-
model_name
is set for each instance ofDeepfakeBenchDetector
,DMDeepfakeDetectionDetector
andSIDBenchDetector
- inferences are splitted by models for
- tests:
- assertions for testing detectors are grouped in a common
check_output_run_detection_on_dir
function
- assertions for testing detectors are grouped in a common
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