Skip to content

TruFor tool does not actually integrate the TruFor model #13

@Gooichand

Description

@Gooichand

Issue Summary

TruForWidget presents itself as TruFor integration but uses a simple edge-density heuristic

Description

gui/trufor.py docstring and comments state that this file "implements a tool for integrating TruFor into Sherloq" and references the TruFor CVPR 2023 paper and repository.
However, the implementation in TruForWorker.run only checks for PyTorch availability, converts the image to grayscale, computes Canny edges, applies a simple smoothing kernel, and derives a "manipulation probability" from mean edge density.
It does not load or run the actual TruFor model or any learned weights from the referenced project.

Steps to Reproduce

  1. Read the documentation block at the top of gui/trufor.py.
  2. Inspect the TruForWorker.run method to see the actual analysis pipeline.
  3. Compare with the original TruFor model architecture and usage.

Expected Result

The TruFor tool should either integrate the real TruFor model or clearly state that it is a heuristic "TruFor-inspired" analysis, not the official model.

Actual Result

The UI and docstring strongly imply TruFor integration, but the code implements a simple edge-based heuristic unrelated to the published TruFor network.

Affected Files

  • gui/trufor.py

Suggested Fix

Either (a) add real TruFor model support (downloading weights, running inference, etc.), or (b) rename and reword the tool and documentation to avoid implying official TruFor integration (e.g., "AI-inspired heuristic analysis").

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions