Image compression is increasingly used before machine vision systems, yet standard codecs are mainly optimized for human perception rather than downstream task accuracy. We propose SCOPE (Semantic COdec Pre-Editing), a conditional image pre-editor that modifies images before compression to improve the bitrate and detection accuracy trade-off. The model is conditioned on the codec family and compression severity, allowing a single trained network to adapt to multiple compression settings without retraining or loading codec-specific weights. Instead of uniformly preserving the whole image, the pre-editor learns to protect task-relevant regions while simplifying less important background content to improve compressibility. The resulting rate-accuracy curves show consistent gains across different codec families and detector architectures, together with strong transferability to unseen learned and wavelet-based compression families.
Figures & tables
Figure 1: Architecture of the proposed conditional pre-editor. The codec family f and severity s are encoded into a conditioning vector that modulates the U-Net-style image branch through FiLM layers. The network predicts an attention map A and two residual maps, Δobj and Δbg , which are used to construct the edited image Iedit by blending an object-preserving branch with a blurred-background branch.
Figure 2: Training pipeline of the proposed method. The pre-editor is the only trainable module. The edited image is passed through a differentiable codec proxy, while ground-truth boxes are used only to construct training masks. A frozen detector provides a teacher-student consistency signal between the clean image and the compressed edited image. At inference time, masks and detector supervision are removed.
Figure 3: mAP versus bitrate for the codec families used during training: JPEG, BMSHJ, and BPG. Results are shown for Faster R-CNN, RT-DETR-l, and YOLO26x.
Figure 4: Qualitative comparison for BMSHJ compression at quality level q3. From left to right: baseline compressed image without detections and with Faster R-CNN detections, SCOPE pre-edited compressed image without detections, and with Faster R-CNN detections.
Figure 5: Zero-shot codec transfer. Left: mAP versus bitrate for the unseen Cheng learned codec. Right: JPEG2000, where the same pretrained SCOPE model is evaluated under each of the three available seen-family conditions.
Table 6
Figure 6: Ablation study on the training objectives. Dashed curves correspond to direct compression without pre-editing, solid circle curves to full SCOPE, downward-triangle curves to w/o task , and pentagon curves to w/o bg/rate . The task-aware loss is essential for preserving detection accuracy, while the background and rate group improves the compression-aware rate-accuracy trade-off.
SCOPE
Family
Severity
Per-codec
Per-codec+Sev.
Codec
Detector
Base
Base
SCOPE
Base
SCOPE
Base
SCOPE
Base
SCOPE
JPEG
Faster R-CNN
-15.88
-14.90
+0.96
-2.94
+14.95
+4.61
+22.34
+4.90
+22.09
JPEG
RT-DETR-l
-5.71
-6.58
-0.70
-1.21
+3.79
–
+71.19
–
+73.72
JPEG
YOLO26x
-14.92
-13.84
+1.11
-2.51
+14.30
+5.64
+19.93
+5.05
+18.98
JPEG
Mean
-12.17
-11.77
+0.46
-2.22
+11.01
+5.13 †
+37.82
+4.98 †
+38.26
BPG
Faster R-CNN
-21.74
-20.27
+1.85
-21.07
+0.99
-21.54
+0.20
-20.42
+1.86
Table 3: Conditioning ablation, BDBR (%). Base : relative to direct compression; SCOPE : pairwise relative to the full model. Lower is better. Bold/underline indicate the best/second-best Base means. † : available comparisons only.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Condition family
Images
Forward mean
Forward p95
Total mean
Total p95
Total FPS
BMSHJ
25,000
7.92 ms
10.69 ms
11.78 ms
15.13 ms
84.89
BPG_like
25,000
7.92 ms
10.67 ms
11.79 ms
15.11 ms
84.85
Diff_JPEG
25,000
7.96 ms
10.85 ms
11.85 ms
15.17 ms
84.37
Overall
75,000
7.93 ms
10.74 ms
11.81 ms
15.14 ms
84.70
Appendix
Table 4: Runtime of SCOPE grouped by codec-family condition. Values are averaged over five severity levels and validation images per level. Forward time includes only the neural pre-editor forward pass, while total time additionally includes tensor preparation and conditioning setup. Codec execution, detector evaluation, and image reading are excluded.
Severity
Images
Forward mean
Total mean
Total FPS
0.00
15,000
8.00 ms
11.87 ms
84.28
0.25
15,000
7.92 ms
11.78 ms
84.89
0.50
15,000
7.91 ms
11.79 ms
84.78
0.75
15,000
7.92 ms
11.79 ms
84.82
1.00
15,000
7.92 ms
11.80 ms
84.73
Appendix
Table 5: Runtime of SCOPE grouped by severity. Values are averaged over the three codec-family conditions. Runtime is nearly constant across severity values because severity only affects the conditioning vector.
Table 6: COCO category grouping used for the semantic decomposition.
Figure 7: Semantic decomposition of the COCO mAP difference for BMSHJ. Each bar represents the contribution of a COCO supercategory to the overall mAP change between SCOPE and the corresponding compressed baseline. Contributions are obtained from per-category AP differences and normalized by the total number of COCO categories, so the sum of the bars equals the overall mAP difference for the corresponding detector and compression setting.
Figure 8: Semantic decomposition of the COCO mAP difference for BPG. As in Fig. 7 , the decomposition is computed from per-category AP differences and then grouped by COCO supercategory using the full COCO category set as denominator. This makes the sum of the displayed contributions directly comparable to the overall mAP difference shown in the rate and accuracy curves.
Parameter-efficient fine-tuning of pre-trained codecs is a promising direction in image compression for human and machine vision. While most existing works have primarily focused on tuning the feature structure within the encoder-decoder backbones, the adaptation of the statistical semantics within the entropy model has received limited attention despite its function of predicting the probability distribution of latent features. Our analysis reveals that naive adapter insertion into the entropy model can lead to suboptimal outcomes, underscoring that the effectiveness of adapter-based tuning depends critically on the coordination between adapter type and placement across the compression pipeline. Therefore, we introduce Structure-Semantics Co-Tuning (S2-CoT), a novel framework that achieves this coordination via two specialized, synergistic adapters: the Structural Fidelity Adapter (SFA) and the Semantic Context Adapter (SCA). SFA is integrated into the encoder-decoder to preserve high-fidelity representations by dynamically fusing spatial and frequency information; meanwhile, the SCA adapts the entropy model to align with SFA-tuned features by refining the channel context for more efficient statistical coding. Through joint optimization, S2-CoT turns potential performance degradation into synergistic gains, achieving state-of-the-art results across four diverse base codecs with only a small fraction of trainable parameters, closely matching full fine-tuning performance. Code is available at https://github.com/Brock-bit4/S2-CoT.
The rapid progress of large Vision-Language Models (VLMs) has enabled a wide range of applications, such as image understanding and Visual Question Answering (VQA). Query images are often uploaded to the cloud, where VLMs are typically hosted, hence efficient image compression becomes crucial. However, traditional human-centric codecs are suboptimal in this setting because they preserve many task-irrelevant details. Existing Image Coding for Machines (ICM) methods also fall short, as they assume a fixed set of downstream tasks and cannot adapt to prompt-driven VLMs with an open-ended variety of objectives. We propose a lightweight, plug-and-play, prompt-guided prefiltering module to identify image regions most relevant to the text prompt, and consequently to the downstream task. The module preserves important details while smoothing out less relevant areas to improve compression efficiency. It is codec-agnostic and can be applied before conventional and learned encoders. Experiments on several VQA benchmarks show that our approach achieves a 25-50% average bitrate reduction while maintaining the same task accuracy. Our source code is available at https://github.com/bardia-az/pgp-vlm-compression.
Bardia Azizian, Ivan V. Bajic
School of Engineering Science, Simon Fraser University, Burnaby, BC, Canada
Diffusion-based image compression has achieved strong perceptual quality at ultra-low bitrates. However, existing codecs are often tied to specific backbones and specialized components, making diverse, rapidly evolving generative models difficult to reuse. This raises a natural question: Can modern generative foundation models be connected to image compression through a simple and extensible interface? Two insights guide our design: stronger generative priors make a simpler codec interface viable, and generation and compression can be intrinsically linked through latent transport. We therefore propose Gen2-IC with two stages: (1) Latent Compression maps clean image latents to entropy-constrained latents; and (2) Latent Transport refines them with one near-terminal update based on the pretrained model. Gen2-IC requires neither auxiliary conditioning signals nor task-specific backbone modifications. With lightweight adaptation and no distillation, it supports fast encoding and one-step decoding across multiple bitrates. We validate Gen2-IC on SD-2.1, SANA-1.5, FLUX.1-dev, and Qwen-Image-2512, spanning U-Net and Transformer architectures as well as diffusion and flow-matching formulations. With stronger priors, Gen2-IC delivers gains below 0.05 bpp: the Qwen variant leads diffusion-based generative codecs in reconstruction fidelity (PSNR), perceptual similarity (LPIPS and DISTS), and recognizer-based semantic fidelity (OCR CER/WER and face-ROI similarity) across four benchmarks.