RiSE / README.md
Jason37437's picture nielsr's picture
nielsr HF Staff
Add pipeline tag and link to paper (#1)
bc4ca58
|
Raw History Blame Contribute Delete
2.69 kB
metadata
base_model: facebook/dinov3-vitl16-pretrain-lvd1689m
datasets:
  - Jason37437/Doc-Protocol-Data
language:
  - en
library_name: pytorch
license: mit
metrics:
  - f1
pipeline_tag: image-segmentation
tags:
  - image-forgery-localization
  - document-forensics
  - computer-vision

RiSE

Checkpoints for RiSE: Residual Subspace Expert for Generalizable Text-Centric Image Forgery Localization.

Paper: RiSE: Residual Subspace Expert for Generalizable Text-Centric Image Forgery Localization

Code and usage: https://github.com/KahimWong/RiSE

Model Checkpoint Configuration
RiSE-1 RiSE-1.pth RiSE-1.json
RiSE-3 RiSE-3.pth RiSE-3.json
RiSE-9 RiSE-9.pth RiSE-9.json
RiSE-9-DCT RiSE-9-DCT.pth RiSE-9-DCT.json

The original checkpoint bytes are preserved; only public filenames are simplified. SHA-256 hashes and sizes are in checksums.json. Load these trusted PyTorch checkpoints using the strict loader in the code repository.

All models use DINOv3 ViT-L/16. RiSE-9-DCT uses the 1024-channel DCT projector and fusion at zero-based block index 10. No legacy DCT checkpoints are included. Inference accepts 512x512 images; DCT inference requires JPEG input. Pretrained-backbone terms apply separately.

Single-Image Inference

Install the RiSE code and download a checkpoint with its matching config:

git clone https://github.com/KahimWong/RiSE.git
cd RiSE
pip install torch==2.4.0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt

hf download Jason37437/RiSE RiSE-9.pth RiSE-9.json --local-dir checkpoints
python infer.py \
  --checkpoint checkpoints/RiSE-9.pth --config checkpoints/RiSE-9.json \
  --image /path/to/image.jpg --output outputs/demo --gh-order 5

Doc Protocol Benchmark

Train on DocTamper and evaluate on seven test sets. In-domain FCD/SCD/Test images are compressed exactly once using the official final quality-factor record (record[-1]). Cross-domain T-SROIE/OSTF/TPIC-13/RTM images are original RGB JPEG patches without additional resizing or compression.

Table 2: Doc Protocol F1 benchmark

Seven-Set Evaluation

After preparing configs/data.json as described in the code README, run:

python evaluate.py \
  --checkpoint checkpoints/RiSE-9.pth --config checkpoints/RiSE-9.json \
  --data configs/data.json --output outputs/rise9_eval --gh-order 5