Official method implementation for “TUE-Detector: A Tool-Using Expert MLLM-Based Detector for AI-Generated Videos”. The project provides the two-stage Qwen-class training pipeline, the forensic tool interfaces, and the three-round tool-use protocol used by the detector.
The implementation contains the 12 initial forensic analyzers described in the paper and a 41-entry model-facing runtime library. Heavy vision backends are exposed through stable adapters, so their weights can be downloaded and configured separately.
git clone git@github.com:Louis-YW/TUE.git
cd TUE
python3 -m pip install -e .Install the optional training or GPU dependencies when needed:
python3 -m pip install -e '.[training,gpu]'Backend installation notes are available in
docs/HEAVY_BACKENDS.md.
python3 scripts/train_sft.py \
--model MODEL \
--data trajectories.jsonl \
--output runs/sft
python3 scripts/train_rl.py \
--model MODEL \
--data prompts.jsonl \
--output runs/rlExample configuration files are provided in configs/. The SFT
collator masks tool-result spans from the language-model loss, while the RL
stage supplies the GRPO loop and the result, format, and tool-use reward
contracts.
from tue_detector.initial_forensics import build_initial_forensic_registry
from tue_detector.runtime import build_public_runtime_registry
initial_tools = build_initial_forensic_registry()
runtime_tools = build_public_runtime_registry()
print(len(initial_tools)) # 12
print(len(runtime_tools)) # 41
print(runtime_tools.get("fit_parabola")([[0, 0], [1, 1], [2, 4]]).raw_output)The runtime library map is documented in
docs/RUNTIME_LIBRARY.md. The toolbox_guide and
evidence_review protocol slots are implemented in
src/tue_detector/runtime/protocol.py.
The merged post-SFT, pre-RL checkpoint is hosted at Louis-YW/TUE-Detector-SFT-ep4p5.
The source code is released under the MIT License. Third-party models, datasets, and tool backends retain their respective licenses and terms.