How zeqinyu/iccv-deepid2025-sunlight works
This repository packages the Cue-Net image-forensics model as an API for image manipulation detection and localization. The principal workflow is image upload, RGB conversion and normalization, model inference, then return of a real-image score, a binary localization mask, or both. Internally, Cue-Net combines a ConvNeXtV2 feature backbone, feature-pyramid decoding, and an edge-aware branch. The README also documents a two-stage training approach; the available source excerpts show inference code, so training relationships below reflect documented stages rather than inspected implementations.
Main entry points: model.py Inference pipeline · main.py Combined endpoint · CueNet.py Cue-Net · readme.md Distillation training
Components 17
API serving
- FastAPI service
CueNet-docker/src/main.py - RGB image
- Image preprocessing
CueNet-docker/src/model.py - Detection endpoint
CueNet-docker/src/main.py - Localization endpoint
CueNet-docker/src/main.py - Combined endpoint
CueNet-docker/src/main.py - Detection score
CueNet-docker/src/model.py - Binary mask
CueNet-docker/src/model.py
Inference model
- Inference pipeline
CueNet-docker/src/model.py - Cue-Net
CueNet-docker/src/Cue_Net/model/CueNet.py - ConvNeXtV2 backbone
CueNet-docker/src/Cue_Net/model/encoder.py - Feature pyramid
CueNet-docker/src/Cue_Net/model/CueNet.py - Edge-aware module
CueNet-docker/src/Cue_Net/model/EAM.py
Training approach
- Distillation training
readme.md - Manipulation teachers
readme.md - ID fine-tuning
readme.md
Other components
- API client
Connections 23
- API client → FastAPI service: uploads image
- FastAPI service → Detection endpoint: dispatches
- FastAPI service → Localization endpoint: dispatches
- FastAPI service → Combined endpoint: dispatches
- Detection endpoint → Image preprocessing: normalizes
- Localization endpoint → Image preprocessing: normalizes
- Combined endpoint → Image preprocessing: normalizes
- Image preprocessing → Inference pipeline: passes tensor
- Detection endpoint → Inference pipeline: calls detect
- Localization endpoint → Inference pipeline: calls localize
- Combined endpoint → Inference pipeline: calls combined inference
- Inference pipeline → Cue-Net: runs model
- Cue-Net → ConvNeXtV2 backbone: extracts features
- Cue-Net → Feature pyramid: decodes features
- Cue-Net → Edge-aware module: computes edge map
- Inference pipeline → Detection score: derives score
- Inference pipeline → Binary mask: derives mask
- Detection endpoint → Detection score: returns JSON
- Localization endpoint → Binary mask: returns PNG
- Combined endpoint → Detection score: returns score header
- Combined endpoint → Binary mask: returns PNG
- Distillation training → Manipulation teachers: trains specialists
- Distillation training → ID fine-tuning: pretrains student