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.