Unified Coding for Both Human Perception and Generalized Machine Analytics with CLIP Supervision(UG-ICM)
This repo contains the official PyTorch implementation for the paper “Unified Coding for Both Human Perception and Generalized Machine Analytics with CLIP Supervision”.
The training script is about to be open-sourced.
Unified Coding for Both Human Perception and Generalized Machine Analytics with CLIP Supervision(UG-ICM) is accepted at AAAI 2025!
The image compression model has long struggled with adaptability and generalization, as the decoded bitstream typically serves only human or machine needs and fails to preserve information for unseen visual tasks. Therefore, this paper innovatively introduces supervision obtained from multimodal pre-training models and incorporates adaptive multi-objective optimization tailored to support both human visual perception and machine vision simultaneously with a single bitstream, denoted as Unified and Generalized Image Coding for Machine (UG-ICM). Specifically, to get rid of the reliance between compression models with downstream task supervision, we introduce Contrastive Language-Image Pre-training(CLIP) models into the training constraint for improved generalization. Global-to-instance-wise CLIP supervision is applied to help obtain hierarchical semantics that make models more generalizable for the tasks relying on the information of different granularity. Furthermore, for supporting both human and machine visions with only a unifying bitstream, we incorporate a conditional decoding strategy that takes as conditions human or machine preferences, enabling the bitstream to be decoded into different versions for corresponding preferences. As such, our proposed UG-ICM is fully trained in a self-supervised manner, i.e., without awareness of any specific downstream models and tasks. The extensive experiments have shown that the proposed UG-ICM is capable of achieving remarkable improvements in various unseen machine analytics tasks, while simultaneously providing perceptually satisfying images.
Pytorch 3.7.16
CompressAI 1.2.0b3
Pytorch 1.13.0
Link | |
---|---|
UG-ICM | BaiDu Drive |
Encode and compress the test images, and obtain the decoded images for human and the decoded images for machine from the unified bitstreams.
cd tests
python test.py -exp test --gpu_id 0 -c /path/to/checkpoint -d /path/to/dataset
The performance of decoded images for classification task (modify the decoded image path in test.py
).
cd classification
python test.py
The performance of decoded images for instance segmantation task (modify the decoded image path in test.py
).
cd instance segmantation
python test.py
Thanks Compressai, MLIC, CLIP, TransTIC for their public code and released models.