DetectiveSAM
DetectiveSAM is an inference-only image forgery localization bundle built around SAM2. This release includes bundled checkpoints and a small set of ready-to-run examples for demos.
Model source
- Kind
- Other
- File size
- 284–309 MB
- Version
- vRevision a90e147
- Updated
- Sep 16, 2026
- Downloads
- 0
- Source
- Hugging Face
Source excerpt
DetectiveSAM is an inference-only image forgery localization bundle built around SAM2. This release includes bundled checkpoints and a small set of ready-to-run examples for demos.
Sources
1 source
Sources
1 sourceVerified Sep 1
Download files
Model artifacts
3 artifacts
Model artifacts
3 artifactscheckpoints/detective_sam_sota.pth
pth · 284 MB · SHA-256 0c7c33c4c4dd…e1cf · Hugging Face
Download filecheckpoints/model_epoch22_batch999_score1.1114.pth
pth · 284 MB · SHA-256 898e64f831f6…f421 · Hugging Face
Download filesam2configs/sam2.1_hiera_base_plus.pt
pt · 309 MB · SHA-256 a2345aede871…04c5 · Hugging Face
Download fileSource excerpts
2 excerpts
Source excerpts
2 excerpts--- license: other library_name: pytorch pipeline_tag: image-segmentation tags: - image-forensics - image-manipulation-detection - image-segmentation - sam2 - pytorch --- # DetectiveSAM DetectiveSAM is an inference-only image forgery localization bundle built around SAM2. This release includes bundled checkpoints and a small set of ready-to-run examples for demos. ## What is bundled - Inference checkpoints under `checkpoints/` - SAM2 config and weights under `sam2configs/` - Poster demo pairs under `demo/cocoglide/`, `demo/flux_test/`, and `demo/qwen_test/` - A drop-in single-image slot at `demo/user_image/demo_input.png` Built-in checkpoint aliases: - `detective_sam` - `detective_sam_sota` ## Setup ```bash python -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Hugging Face Usage ```bash git lfs install git clone https://huggingface.co/Gertlek/DetectiveSAM cd DetectiveSAM python -m venv .venv source .venv/bin/activate pip install -r requirements.txt python -m detectivesam_inference.predict \ --checkpoint detective_sam \ --output-dir outputs/poster_baseline ``` ## Poster Demo Flows ### 1. Live single-image demo Place your image at `demo/user_image/demo_input.png`, then run: ```bash python -m detectivesam_inference.predict \ --checkpoint detective_sam \ --output-dir outputs/poster_user_image ``` In this mode the CLI reuses the target image as its own source reference so the demo stays runnable with a single image. ### 2. Bundled baseline example If `demo/user_image/demo_input.png` is absent, the default `predict` command falls back to the bundled CocoGlide sample `banana_28809`. ```bash python -m detectivesam_inference.predict \ --checkpoint detective_sam \ --output-dir outputs/poster_baseline ``` ### 3. Bundled SOTA examples Flux example: ```bash python -m detectivesam_inference.predict \ --checkpoint detective_sam_sota \ --source demo/flux_test/source/548.png \ --target demo/flux_test/target/548.png \ --mask demo/flux_test/mask/548.png \ --output-dir outputs/poster_flux ``` Qwen example: ```bash python -m detectivesam_inference.predict \ --checkpoint detective_sam_sota \ --source demo/qwen_test/source/166.png \ --target demo/qwen_test/target/166.png \ --mask demo/qwen_test/mask/166.png \ --output-dir outputs/poster_qwen ``` ### 4. Bundled CocoGlide subset sweep Use this to evalua...
Source context: 0 downloads · 3 likes · Pipeline image-segmentation · Library pytorch · Repo Gertlek/DetectiveSAM
