Spaces:
Running
Running
| from app.ai.frequency_detector import frequency_score | |
| from app.ai.cnn_detector import cnn_artifact_score | |
| from app.ai.ela_detector import generate_ela_score | |
| def extract_features(filepath: str) -> dict: | |
| freq = frequency_score(filepath) | |
| cnn = cnn_artifact_score(filepath) | |
| ela = generate_ela_score(filepath) | |
| combined_synthetic_score = (cnn * 0.4) + (ela * 0.6) | |
| return { | |
| "frequency_score": freq, | |
| "cnn_score": combined_synthetic_score, | |
| "edge_variance": 0.0, | |
| "noise_entropy": 0.0 | |
| } |