Add Batch fef79265-994a-48c5-bbd1-d22668e76ee3
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_content_list.json +3 -0
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_model.json +3 -0
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_origin.pdf +3 -0
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/full.md +339 -0
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/images.zip +3 -0
- learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/layout.json +3 -0
- learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_content_list.json +3 -0
- learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_model.json +3 -0
- learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_origin.pdf +3 -0
- learningasinglenetworkforscalearbitrarysuperresolution/full.md +307 -0
- learningasinglenetworkforscalearbitrarysuperresolution/images.zip +3 -0
- learningasinglenetworkforscalearbitrarysuperresolution/layout.json +3 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_content_list.json +3 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_model.json +3 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_origin.pdf +3 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/full.md +331 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/images.zip +3 -0
- learningasketchtensorspaceforimageinpaintingofmanmadescenes/layout.json +3 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_content_list.json +3 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_model.json +3 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_origin.pdf +3 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/full.md +301 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/images.zip +3 -0
- learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/layout.json +3 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_content_list.json +3 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_model.json +3 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_origin.pdf +3 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/full.md +322 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/images.zip +3 -0
- learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/layout.json +3 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_content_list.json +3 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_model.json +3 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_origin.pdf +3 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/full.md +342 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/images.zip +3 -0
- learningcrossmodalcontrastivefeaturesforvideodomainadaptation/layout.json +3 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_content_list.json +3 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_model.json +3 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_origin.pdf +3 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/full.md +330 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/images.zip +3 -0
- learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/layout.json +3 -0
- learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_content_list.json +3 -0
- learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_model.json +3 -0
- learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_origin.pdf +3 -0
- learningdualpriorsforjpegcompressionartifactsremoval/full.md +484 -0
- learningdualpriorsforjpegcompressionartifactsremoval/images.zip +3 -0
- learningdualpriorsforjpegcompressionartifactsremoval/layout.json +3 -0
- learningdynamicinterpolationforextremelysparselightfieldswithwidebaselines/96ddb3d6-7727-4c31-85b5-4d2522543031_content_list.json +3 -0
- learningdynamicinterpolationforextremelysparselightfieldswithwidebaselines/96ddb3d6-7727-4c31-85b5-4d2522543031_model.json +3 -0
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47bb6d10515a388eb6a00e71e55f3fc4bd11883c0f6728921c38b08f792e70ee
|
| 3 |
+
size 88798
|
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca9a4053132269d6380b05f83b477ac0f8c45793c03910e49b6cc67220a849cb
|
| 3 |
+
size 111712
|
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/afdd494d-03a7-4b1f-806c-25351e381323_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1cbef6b1d472c7c941aa1ca5a83fccff9ae5bf64a40c5a6ed3e9513cb3dca66a
|
| 3 |
+
size 1861459
|
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/full.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning an Augmented RGB Representation with Cross-Modal Knowledge Distillation for Action Detection
|
| 2 |
+
|
| 3 |
+
Rui Dai $^{1,2}$ , Srijan Das $^{3}$ , François Bremond $^{1,2}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Inria $^{2}$ Université Côte d'Azur $^{3}$ Stony Brook University
|
| 6 |
+
|
| 7 |
+
1,2{name.surname}@inria.fr 3{name.surname}@stonybrook.edu
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
In video understanding, most cross-modal knowledge distillation (KD) methods are tailored for classification tasks, focusing on the discriminative representation of the trimmed videos. However, action detection requires not only categorizing actions, but also localizing them in untrimmed videos. Therefore, transferring knowledge pertaining to temporal relations is critical for this task which is missing in the previous cross-modal KD frameworks. To this end, we aim at learning an augmented RGB representation for action detection, taking advantage of additional modalities at training time through KD. We propose a KD framework consisting of two levels of distillation. On one hand, atomic-level distillation encourages the RGB student to learn the sub-representation of the actions from the teacher in a contrastive manner. On the other hand, sequence-level distillation encourages the student to learn the temporal knowledge from the teacher, which consists of transferring the Global Contextual Relations and the Action Boundary Saliency. The result is an Augmented-RGB stream that can achieve competitive performance as the two-stream network while using only RGB at inference time. Extensive experimental analysis shows that our proposed distillation framework is generic and outperforms other popular cross-modal distillation methods in action detection task.
|
| 12 |
+
|
| 13 |
+
# 1. Introduction
|
| 14 |
+
|
| 15 |
+
Learning representation from untrimmed videos for action detection is a challenging vision task. Action detection aims at categorizing all the frames corresponding to every action occurring in an untrimmed video. The two main challenges for action detection are to tackle composite action patterns and fine-grained details [47]. These challenges are especially difficult in cases of real-world scenarios, where actions are densely distributed and overlapping each other [63]. To address these challenges, a typical setting, called two-stream network [49], consists in combining RGB with additional modalities like optical flow [41, 62],
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1. Proposed cross-modal distillation framework for action detection. Our distillation framework is composed of three loss terms corresponding to different types of knowledge to transfer across modalities. $\mathcal{L}_{\text{Atomic}}$ : Atomic KD loss; $\mathcal{L}_{\text{Global}}$ : Global Contextual Relation loss; $\mathcal{L}_{\text{Boundary}}$ : Boundary Saliency loss.
|
| 19 |
+
|
| 20 |
+
3D poses [68, 11] to take into account the complementary nature of each modality. However, using such setting is contingent upon the availability of multiple modalities and of expensive processing resources. The cost of computing additional modalities could be prohibitive, especially for long untrimmed videos. These constraints limit the usage of multi-modal action detection methods for real-world applications.
|
| 21 |
+
|
| 22 |
+
Previous studies [20, 21] have shown that cross-modal Knowledge Distillation (KD) is an effective mechanism to avoid the computation of the additional modalities during test time, while preserving the complementary information from the additional modalities. However, most previous works [6, 18, 17] in the video understanding domain have investigated solely the classification of short trimmed videos [28, 50, 30]. In these works, each video corresponds to a single action and the distillation framework infuses the aggregated knowledge of an action instance from one modality into another. In contrast to trimmed videos, untrimmed videos contain rich sequential knowledge with complex temporal relations. Untrimmed videos in real-world scenarios tend to have cluttered background and mul
|
| 23 |
+
|
| 24 |
+
tiple correlated actions either in sequence [36] or in parallel [63, 48]. Therefore, distillation mechanisms tailored for classification tasks and extended for detection tasks lack in capturing fine-grained details along the temporal dimension. Now the question remains, what should be the right strategy to distillate cross-modal knowledge for action detection in untrimmed videos?
|
| 25 |
+
|
| 26 |
+
In this work, we propose a distillation framework to combine cross-modal information for detecting actions with high precision and minimal resource. The goal is to reach the two-stream performance while using only the RGB stream at inference time. The proposed distillation framework consists of a traditional teacher-student network architecture which operates in a Seq2Seq fashion [42, 10], thanks to three new distillation losses dedicated to the action detection task as illustrated in Fig. 1. The first loss in our formulation is the Atomic KD loss, which enables the RGB student network to mimic the feature representation of every individual snippet from the teacher network in a contrastive manner. This loss-term extends the cross-modal KD mechanism fabricated for the classification tasks to the temporal domain [38], by transferring the knowledge only between one-to-one corresponding snippets of different modalities. As a snippet is often shorter than the action instance in an untrimmed video, so this loss encourages a transfer of sub-representation [19] of the action, for example, "raising arm" in the "drinking" action. Here, such sub-representation w.r.t. the entire video corresponds to an atomic piece of knowledge within the complete action feature distribution. However, the untrimmed video is composed of a sequence of snippets, distilling only the atomic representation is not sufficient for learning discriminative action representation. Thus, distillation mechanisms dedicated to represent specifically an action within an untrimmed video are required.
|
| 27 |
+
|
| 28 |
+
We therefore introduce two loss-terms for sequence-level KD so as to transfer the cross-snippet relations between different modalities. Firstly, we propose a Global Contextual Relation loss to transfer the contextual information of the sequence between modalities. In our work, contextual information is defined as the embedding of the correlation between all the snippet features. Thanks to this loss term, every student snippet feature can learn in the latent space from all the correlated teacher snippets within the untrimmed videos (Fig. 1). With this loss-term, detecting one action in a snippet can benefit from the information in the correlated snippets (corresponding to related actions, e.g. take and eat sandwich) across modalities, resulting in better action detection performance. Secondly, we propose another KD loss to distillate the boundary saliency from the teacher to RGB student network, dubbed Boundary Saliency loss. This ensures a more precise action boundary detection of the RGB student which is prone to imprecise action boundary detection due to weak temporal signals. In an untrimmed video,
|
| 29 |
+
|
| 30 |
+
the start and end moments of the action are more salient than other parts (see Fig. 1). Intuitively, the feature variation across consecutive snippets in the video can reflect such saliency of the action boundaries. Therefore, learning this variation from a modality that can better capture the movement (e.g. optical flow, 3D poses) encourages the RGB stream representation to be more sensitive to the action boundaries.
|
| 31 |
+
|
| 32 |
+
Contributions. To summarize, we take a step towards the little-explored but crucial, cross-modal KD for action detection. We build a Seq2Seq KD framework for action detection with a novel formulation. This formulation consists of an atomic-level KD loss and two sequence-level KD losses. The three loss terms in our formulation are jointly optimized in an end-to-end fashion. To the best of our knowledge, we are the first to propose a formulation containing sequential KD loss for the action detection task. We perform comprehensive experiments on five benchmarks. Our joint formulation significantly improves the vanilla RGB baseline (up to $+6.8\%$ improvement on MultiTHUMOS w.r.t. vanilla-RGB) and achieves the Two-stream performance while using only RGB at inference time. The consistent improvement on all these datasets corroborates the effectiveness and robustness of our distillation framework.
|
| 33 |
+
|
| 34 |
+
# 2. Related work
|
| 35 |
+
|
| 36 |
+
In this section, we briefly review the action detection architectures and the state-of-the-art cross-modal distillation methods.
|
| 37 |
+
|
| 38 |
+
# 2.1. Action Detection
|
| 39 |
+
|
| 40 |
+
Depending on the density of annotation, there are two kinds of dataset for action detection: (1) Sparsely labeled [26, 13, 36] and (2) Densely labeled [63, 48, 8] datasets. In the community, most action detection approaches [67, 16, 62] are custom-made for the sparsely labeled datasets. As densely labeled datasets include fine-grained actions occurring concurrently, they are more challenging and close to real-world scenarios [63]. Concerning the popular action detection approaches, anchor-based methods [61, 3, 16] are inspired by the two-stage object detection framework, which leverages a set of pre-defined anchors to generate action proposals along with another classification stage. However, anchor-based methods require a large number of anchors for generating the proposals and hence under-perform on densely labeled datasets [61, 5]. To handle the above issues, some methods [42, 31, 9, 51, 7] borrow the Seq2Seq framework from Natural Language Processing [12] to action detection. Seq2Seq methods are composed of a visual encoder to encode the primary spatiotemporal features, an efficient temporal filter to model the temporal information and a classifier to perform the frame-level action detection. This framework "interprets" the im
|
| 41 |
+
|
| 42 |
+
age sequence into a sequence of prediction scores. Frame-level action detection can be seen as a class-specific actionness detector. By referring to actionness-based methods [67, 60, 35], the action proposals can be generated from the frame-level detection results. Seq2Seq based approaches perform well on both types of dataset, especially for the densely annotated one [42, 10]. To build a generic distillation framework that can tackle both dataset types, we thus rely on the Seq2Seq paradigm. Furthermore to incorporate the appearance and motion based information, the state-of-the-art sequence based approaches make use of two-stream architectures [41, 42].
|
| 43 |
+
|
| 44 |
+
In order to avoid the expensive computation of two-stream architectures, cross-modal distillation methods [6, 18] and fast Optical Flow (OF) detectors [27, 52, 53, 66] have been introduced for video classification tasks. However, the fast OF detector techniques are modality-specific with relatively low performance [6]. Therefore, we propose to dig deeper into cross-modal distillation mechanisms for learning compact action representations for long continuous videos.
|
| 45 |
+
|
| 46 |
+
# 2.2. Cross-Modal Knowledge Distillation
|
| 47 |
+
|
| 48 |
+
The primary goal of Knowledge Distillation (KD) is to distill the information of a model learned from a teacher network into a student network. Many KD studies [23, 4, 40, 56, 37] explored transferring the knowledge from large complex models to small simpler models, i.e. model compression. In this work, we focus on cross-modal KD, where the difference between the teacher and student models mostly relies on input modalities rather than network architectures. In the video domain, Garcia et al. [18] developed a distillation framework for action classification with a four-step process that hallucinates depth features into RGB frames. Similarly, MARS [6] trains a RGB network in a single step, by back-propagating a linear combination of a OF distillation and classification losses through the entire network. Recently, Luo et al. [38] proposed a Graph Distillation (GD) method that can be applied to the action detection task. This method utilizes sliding windows to process untrimmed videos and distillates the knowledge of every window by minimizing the cosine distance in a mutual learning manner. GD aims at exploiting the privileged modalities and thus relies on a significant number of modalities. In contrast, our framework aims at effectively performing the distillation from the available modalities. Moreover, GD transfers knowledge only between the corresponding snippets (i.e. window), but does not consider the relations across snippets in the distillation, which is critical for handling a sequence of actions. Thus, to better tackle distillation for action detection, we propose a new formulation with three loss-terms. More specifically for transferring knowledge along the temporal dimension in the untrimmed video, we introduce a sequence-level distillation
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2. The proposed distillation framework. On the top, we present an example of a batch size $(\mathcal{B})$ of 2 untrimmed videos $(\mathcal{V})$ for both student $(\mathcal{S})$ and teacher $(\mathcal{T})$ networks. In this example, the input includes a pair of positive videos and a pair of negative videos. The sequence-level distillation and classification losses are employed only for positive pairs, while atomic-level distillation leverages both positive and negative pairs. On the bottom, we present the atomic-level distillation.
|
| 52 |
+
|
| 53 |
+
mechanism. Thanks to it, the network can be effective even with few additional modalities.
|
| 54 |
+
|
| 55 |
+
# 3. Proposed Distillation Framework
|
| 56 |
+
|
| 57 |
+
In this section, we first describe the overall architecture of our approach. We then detail the different losses in the proposed framework.
|
| 58 |
+
|
| 59 |
+
# 3.1. Overall Architecture
|
| 60 |
+
|
| 61 |
+
An overview of the architecture is shown in Fig. 2. In this work, the knowledge transfer occurs between the teacher and student networks. As discussed in Sec. 2.1, both networks are composed of a visual encoder and a temporal filter, following the Seq2Seq paradigm. For the visual encoder, we use I3D [2] to encode the spatio-temporal information of a snippet for RGB and Optical Flow (OF). Similar to previous action detection methods [14, 65], sequences of 16 frames are encoded to a single feature vector representation. The encoded feature maps of a video are then fed to the temporal filter. The choice of the temporal filter is flexible, since we can choose any well-known temporal model [42, 31, 24]. Here, we set a 5-layer SS-TCN [14] as default temporal filter, which is based on Dilated-TCN [31]. Both student and teacher have the same type of temporal filter with the same settings (i.e. dilation rate and channel size). In the training phase, the knowledge distillation is performed from the output feature of the teacher network towards the student network. Similar to [42, 10], this output
|
| 62 |
+
|
| 63 |
+
feature map is further classified and grouped as a class-wise actionness detector for detecting the actions.
|
| 64 |
+
|
| 65 |
+
The input of teacher network is flexible to variant costly modalities (e.g. OF, 3D poses). By default, we chose the teacher network as OF stream, whereas the student network as RGB stream. In the following sections, we express the feature representation of a video indexed $i$ with $F_{r}(i,t,c)$ , where $r \in \{\mathcal{T},\mathcal{S}\}$ represents the teacher $\mathcal{T}$ and student $\mathcal{S}$ ; $t \in [1,T]$ represents the snippet index and $T$ the length of the video in snippets; $c \in \mathbb{Z}^C$ represents the channel index, $C$ is the channel size. This expression can be used for representing feature of a video or a snippet. For example, $F_{r}(i,:,:)$ and $F_{r}(i,t,:)$ represent the feature map of a video $i$ and the feature vector of a snippet for video $i$ at time step $t$ , respectively. For an augmented RGB representation, the distillation is performed in two levels. First, we perform distillation at atomic-level to distillate the elementary representation of an action. Second, we perform a sequence-level distillation to distillate (i) the salient relations among the snippets, and (ii) the significant temporal variations across the snippets indicating action boundaries.
|
| 66 |
+
|
| 67 |
+
# 3.2. Atomic-level Distillation
|
| 68 |
+
|
| 69 |
+
To transfer the knowledge between two video sequence, firstly, we adapt and integrate the "representation loss" [38] in our overall formulation, dubbed Atomic KD loss. This loss term encourages the student to mimic the feature representation of every individual snippet feature of the teacher network. Our formulation is different from the previous work [38] that minimizes the cosine distance between the snippet features. Inspired by the recent success on contrastive learning [55, 22, 39], we build our model using a contrastive strategy to enhance the atomic-level knowledge imitation.
|
| 70 |
+
|
| 71 |
+
As shown in Fig. 2, let $[F_S(i,t,:), F_{\mathcal{T}}(i,t,:)]$ represents a pair of training snippets from same video $i$ at time $t$ but across different modalities for the teacher and student networks. Let $F_{\mathcal{T}}(j,t,:)$ be another snippet representation from a randomly chosen video $j$ of the teacher stream and having a different label. We define the pair $[F_S(i,t,:), F_{\mathcal{T}}(j,t,:)]$ as positive when $i = j$ , otherwise negative. We aim at pushing closer the representations $F_S(i,t,:)$ and $F_{\mathcal{T}}(i,t,:)$ while pushing apart $F_S(i,t,:)$ and $F_{\mathcal{T}}(j,t,:)$ which can be seen as a binary classification task that tries to maximize the log-likelihood of the mutual information between the student and teacher representations. In practice, the loss is updated by batches with a batch size $\mathcal{B}$ . If $\mathcal{N}$ negative pairs exist for each positive pair, then the number of samples in a batch of $\mathcal{P}$ positives is given by $\mathcal{B} = (\mathcal{N} + 1)\mathcal{P}$ (see Fig. 2). To measure the mutual information between
|
| 72 |
+
|
| 73 |
+
the student and the teacher, we compute:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\begin{array}{l} \mathcal {L} _ {\text {A t o m i c}} = \frac {1}{\mathcal {P} T} \sum_ {i = j} \sum_ {t = 1} ^ {T} \log \left[ \frac {\exp^ {F _ {\mathcal {T}} (j , t ; :) ^ {\top} F _ {\mathcal {S}} (i , t ; :)}}{\exp^ {F _ {\mathcal {T}} (j , t ; :) ^ {\top} F _ {\mathcal {S}} (i , t ; :)} + \phi} \right] + \tag {1} \\ \frac {1}{T} \sum_ {i \neq j} \sum_ {t = 1} ^ {T} [ \log (1 - \frac {\exp^ {F _ {\mathcal {T}} (j , t ; :)} {} ^ {\top} F _ {\mathcal {S}} (i , t ; :)}{\exp^ {F _ {\mathcal {T}} (j , t ; :)} {} ^ {\top} F _ {\mathcal {S}} (i , t ; :)} + \phi) ] \\ \end{array}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\mathcal{PT}$ represents total number of positive snippets, $\phi$ is the ratio of the negative snippets to the cardinality of snippets in the training set. Note that, this loss term is accompanied by a linear combination with the other distillation losses and the class-wise entropy loss (i.e. supervised learning).
|
| 80 |
+
|
| 81 |
+
As the length of an action instance is often larger than a snippet, with atomic-level distillation, the teacher network transfers only the sub-representation of the actions [19]. Next, we propose a novel sequence-level distillation mechanism which has been neglected in the state-of-the-art methods.
|
| 82 |
+
|
| 83 |
+
# 3.3. Sequence-level Distillation
|
| 84 |
+
|
| 85 |
+
Sequence-level distillation transfers cross-snippet knowledge between different modalities in an untrimmed video by incorporating contextual information and taking benefit from the variations of cross-modal representation along action boundaries. Consequently, we propose two sequence-level distillation losses: (1) Global Contextual Relation, (2) Boundary Saliency, to improve action detection performance. Note that both sequence-level distillation losses are applied only between positive video pairs, corresponding to $\mathcal{P}$ videos.
|
| 86 |
+
|
| 87 |
+
# 3.3.1 Global Contextual Relation
|
| 88 |
+
|
| 89 |
+
For sequence-level distillation, firstly, we propose to transfer contextual knowledge between modalities of the entire video. Intuitively, the detection of one given action could be supported by the detection of other related actions, which may be distant in the untrimmed video [41]. Hence, the representation of an action snippet could benefit from the contextual information across other snippets in the video pertaining to another modality. But the challenge in modeling such contextual relationships is the high complexity of the model for taking into account all the snippets in a video in relation with a single snippet. Therefore, we propose an embedding that projects the student-teacher features in a space where the global contextual relations among all actions are computed.
|
| 90 |
+
|
| 91 |
+
For the global contextual relation loss, we compute the Channel Covariance Matrix $(Cov)$ of the sequence of snippets. Our motivation for using channel covariance is: (1) At each time instant, the channel contains the latent representation of actions, thus channel covariance embeds the relation between action events in a video; (2) Though the videos
|
| 92 |
+
|
| 93 |
+
and action events have a high variation in length, the channel size is fixed. This results in channel covariance being a more robust representation.
|
| 94 |
+
|
| 95 |
+
Providing a feature map of the video, $Cov$ encodes the variance within each channel and the covariance between all channels over the whole video. Each element in the matrix reflects the correlation between two channels, which can characterize the specific activation patterns along time of an action class. Thus, the covariance matrix captures the relations between snippets along time and indicates whether a salient relation exists (i.e. which may be related to an action), while being computationally optimal. Here, the $Cov$ is formulated as:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
C o v _ {r} (i) = \frac {1}{T - 1} \sum_ {t = 1} ^ {T} \left[ F _ {r} (i, t,:) - \mu_ {i} \right] \left[ F _ {r} (i, t,:) - \mu_ {i} \right] ^ {T} \tag {2}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
such that $r \in \{\mathcal{T},\mathcal{S}\}$ , and $\mu_{i}$ represents the mean value of all the channels in the feature map $F_{r}(i,:,:))$ of a video $i$ . The covariance matrix $Cov_{r} \in \mathbb{R}^{C \times C}$ is a symmetric matrix and thus it is determined by $\frac{C(C + 1)}{2}$ values. We apply a filter mask extracting all the entries on and above the diagonal of the covariance matrix. We reshape these values in the form of a vector $G_{r}(i)$ :
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
G _ {r} (i) = \operatorname {m a s k} \left[ \operatorname {C o v} _ {r} (i) \right] \tag {3}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $\text{mask}(.)$ is the filter mask operation. The obtained feature vector $G_{r}(i)$ represents the channel covariance of the video. We then enforce a distillation loss in the embedded space from the frozen teacher to the student over the positive video pairs $(\mathcal{P})$ . This is performed by minimizing the mean square error, which is formulated as the Global Contextual Relation loss:
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\mathcal {L} _ {\text {G l o b a l}} = \frac {1}{\mathcal {P}} \sum_ {i = 1} ^ {\mathcal {P}} \left| \left| G _ {\mathcal {T}} (i) - G _ {\mathcal {S}} (i) \right| \right| ^ {2} \tag {4}
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
The differential property of equation 2 enables to train our teacher-student framework jointly with the other losses.
|
| 114 |
+
|
| 115 |
+
# 3.3.2 Boundary Saliency
|
| 116 |
+
|
| 117 |
+
The boundary saliency loss term is used in our formulation to learn comparatively precise boundaries for action detection. In an untrimmed video, we find that the starting and ending of the action are more salient than other parts [34], that brings us crucial information to detect the transition of an action to another action or background. Intuitively, the sharp variation across consecutive snippets in the video can reflect such saliency of the action boundaries, which is a cross-snippet knowledge. Transferring the knowledge of feature evolution along time encourages the features to be more sensitive at the action start and end, thus assisting the class-wise actionness detector in the student network to detect precise boundaries of the action instances. Such an approach is especially effective when the modality processed at the teacher network provides pertinent boundary
|
| 118 |
+
|
| 119 |
+
information. For instance, modalities which are sensitive to motion (e.g. OF, 3D poses) are able to bring a significant benefit from this loss term. In addition, this loss-term also encourages to retain the temporal consistency across the different modalities.
|
| 120 |
+
|
| 121 |
+
In practice, we first define the variation between consecutive snippets as $Var(i)$ for video $i$ , which is formulated as:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\operatorname {V a r} _ {r} (i) = \frac {1}{T - 1} \sum_ {t = 1} ^ {T - 1} \sum_ {c = 1} ^ {C} \left[ F _ {r} (i, t + 1, c) - F _ {r} (i, t, c) \right] \tag {5}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $r \in \{\mathcal{T},\mathcal{S}\}$ . Then, we define the Boundary Saliency loss as the $L1$ distance between the frozen teacher and the student network over the $\mathcal{P}$ positive pairs, which is formulated as:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\mathcal {L} _ {\text {B o u n d a r y}} = \frac {1}{\mathcal {P}} \sum_ {i = 1} ^ {\mathcal {P}} | V a r _ {\mathcal {T}} (i) - V a r _ {\mathcal {S}} (i) | \tag {6}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
With both sequence-level distillation losses, the student network learns two types of cross-snippet information from the other modalities. Below, we summarize the training procedure section.
|
| 134 |
+
|
| 135 |
+
# 3.4. Training and Testing
|
| 136 |
+
|
| 137 |
+
To sum up, firstly, we train the teacher networks with the classification $(Cls)$ loss, i.e. cross-entropy. The weights of the teacher network is then frozen followed by training the student network. During training, multiple distillation losses are jointly optimized with classification loss for the end task, i.e. action detection. On one hand, the atomic distillation is trained in a contrastive manner (with positive and negative pairs), whereas the sequence-level distillation losses are performed in a non-contrastive manner by utilizing only the positive pairs in a batch. The overall objective is formulated as:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {C l s}} + \alpha_ {1} \mathcal {L} _ {\text {A t o m i c}} + \alpha_ {2} \mathcal {L} _ {\text {G l o b a l}} + \alpha_ {3} \mathcal {L} _ {\text {B o u n d a r y}} \tag {7}
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
where $\alpha_{i}$ are the loss weighting factors determined during the validation step. $\mathcal{L}_{Cls}$ represents the cross-entropy classification loss. We call the educated-student network as Augmented-RGB. During inference time, we only use RGB videos as input to detect the actions and up-sample the predicted logits to the same temporal resolution as the ground truth to perform the evaluation.
|
| 144 |
+
|
| 145 |
+
# 4. Experimental Analysis
|
| 146 |
+
|
| 147 |
+
To corroborate the effectiveness of our proposed KD framework, we perform an exhaustive experimental analysis for the action detection task.
|
| 148 |
+
|
| 149 |
+
# 4.1. Dataset Description
|
| 150 |
+
|
| 151 |
+
We evaluate our framework on five action detection datasets: Charades [47], PKU-MMD [36], TSU [8], THUMOS14 [26], and MultiTHUMOS [63]. These datasets contain videos of different types: (1) sport and daily living
|
| 152 |
+
|
| 153 |
+
Table 1. Ablation study for the proposed framework on Charades and PKU-MMD (CS) datasets. For PKU-MMD we consider IoU=0.1.
|
| 154 |
+
|
| 155 |
+
<table><tr><td></td><td colspan="3">\( {\mathcal{L}}_{\text{Atomic }}{\mathcal{L}}_{\text{Global }}{\mathcal{L}}_{\text{Boundary }} \)</td><td>Charades</td><td>PKU-MMD</td></tr><tr><td>Teacher-OF</td><td>-</td><td>-</td><td>-</td><td>18.6</td><td>68.4</td></tr><tr><td>Vanilla-RGB</td><td>-</td><td>-</td><td>-</td><td>22.3</td><td>79.6</td></tr><tr><td>Two-stream</td><td>-</td><td>-</td><td>-</td><td>24.8</td><td>83.4</td></tr><tr><td>Atomic</td><td>✓</td><td>-</td><td>-</td><td>23.9</td><td>82.7</td></tr><tr><td rowspan="3">Sequence</td><td>-</td><td>✓</td><td>-</td><td>23.8</td><td>83.7</td></tr><tr><td>-</td><td>-</td><td>✓</td><td>23.4</td><td>83.1</td></tr><tr><td>-</td><td>✓</td><td>✓</td><td>24.2</td><td>84.2</td></tr><tr><td rowspan="2">Mixture</td><td>✓</td><td>✓</td><td>-</td><td>24.4</td><td>84.3</td></tr><tr><td>✓</td><td>-</td><td>✓</td><td>24.2</td><td>83.7</td></tr><tr><td>Total</td><td>✓</td><td>✓</td><td>✓</td><td>24.6</td><td>85.5</td></tr></table>
|
| 156 |
+
|
| 157 |
+
videos, (2) short and long videos, (3) densely and sparsely labeled videos. Note: there are two settings on Charades: (1) video-level action classification, (2) frame-level action detection (Charades_v1_localize [47]). We only target the second one in this paper.
|
| 158 |
+
|
| 159 |
+
All the datasets are evaluated by the mean Average Precision (mAP). We evaluate the per-frame mAP on densely labeled datasets following [63, 47].
|
| 160 |
+
|
| 161 |
+
# 4.2. Implementation Details
|
| 162 |
+
|
| 163 |
+
For extracting the additional modalities, Optical Flow (OF) is obtained using TVL1 [54], the 3D Poses are extracted using LCRNet++ [44]. In this work, we adapt the 5-layer SSTCN [14] as the temporal filter, the output channel size $C$ is 256. While training the teacher-student framework, we use Adam optimizer [29] with an initial learning rate of 0.001, and we scale it by a factor of 0.3 with a patience of 10 epochs. The network is trained for 300 epochs with a mini-batch $\mathcal{B}$ of 16 videos for Charades, 8 videos for PKU-MMD, THUMOS, and 4 videos for the TSU dataset. $\mathcal{N}$ is set to 1, $\mathcal{P}$ as $\frac{\mathcal{B}}{2}$ and $\alpha_{i} = [300, 100, 5]$ . We use binary cross-entropy for multi-label classification (i.e. class-wise actionness). For sparsely-labeled datasets: THUMOS14 and PKU-MMD, following [38, 10], a post-processing step is performed to generate the action boundaries.
|
| 164 |
+
|
| 165 |
+
# 4.3. Ablation Study
|
| 166 |
+
|
| 167 |
+
Firstly, we discuss about the effectiveness of the losses proposed in our distillation framework. Tab. 1 shows the comparison of action detection performance on Charades and PKU-MMD (IoU=0.1). This table also shows the impact of progressively integrating the KD losses in our distillation framework. The vanilla-RGB is the network trained using only $\mathcal{L}_{Cls}$ without distillation. Compared to vanilla RGB, while training with $\mathcal{L}_{Atomic}$ , $\mathcal{L}_{Global}$ , $\mathcal{L}_{Boundary}$ independently obtains an improvement of +3.1, 4.1, 3.5% mAP on PKU-MMD respectively. The action detection performance is further improved by the convex combination of any two losses w.r.t. their individual counter-parts. This shows the complementary functionalities of the proposed losses. Also, note that the combination of the sequence losses contributes higher than the atomic loss. This observation supports the importance of the sequence-level losses
|
| 168 |
+
|
| 169 |
+
for action detection. Finally, when trained with all the three losses, the student outperforms all the baselines $(+2.3\%, +5.9\%)$ w.r.t. vanilla RGB stream on Charades and PKU-MMD). These results show that both our design choices and different losses contribute to the overall performance of our approach.
|
| 170 |
+
|
| 171 |
+
In Tab. 2, we show that our distillation mechanisms perform better at feature-level than at logit-level. The primary reason behind this trend is that we are performing cross-modal distillation, where the frozen teacher may underperform compared to the student network (e.g. OF on Charades and PKU-MMD) w.r.t. the different modalities. As the logits represent the classification scores, they may introduce noise from the weak teacher via KD into the RGB student.
|
| 172 |
+
|
| 173 |
+
# 4.4. Analysis of our Distillation Framework
|
| 174 |
+
|
| 175 |
+
In this section, we further analyze our distillation framework in different aspects.
|
| 176 |
+
|
| 177 |
+
Comparison with popular cross-modal KD methods: Tab. 3 presents a comparison of our extended atomic distillation with state-of-the-art cross-modal KD methods, learning from OF. These baseline methods [25, 6, 18, 58] using traditional losses like MSE and cosine distance are actually designed for classification tasks. For the comparative analysis with our $\mathcal{L}_{\text{Atomic}}$ , we adapt them following [38] for the task of action detection. $\mathcal{L}_{\text{Atomic}}$ consistently outperforms all the baseline methods on Charades and PKU-MMD datasets ( $+1.6\%$ , $+3.1\%$ w.r.t. vanilla RGB stream on Charades and PKU-MMD).
|
| 178 |
+
|
| 179 |
+
Performance with different Temporal filters: In Tab. 4, our distillation framework is implemented with different temporal filters to confirm its robustness. The experiments are performed with a student network learning from a teacher network pre-trained with OF on Charades dataset. The results show that both SSTCN [14] and TGM [42] consistently improve the performance of RGB stream and achieve the competitive performance of two-stream network.
|
| 180 |
+
|
| 181 |
+
Analyzing our framework with different modalities: In Tab. 5, we validate that our proposed method is generic and can be effective with different modalities. For experimentation, we perform distillation from OF and 3D Poses. For 3D poses, the teacher consists of 2s-AGCN [46] as visual encoder followed by the temporal filters for detecting actions. In datasets like Charades, most actions involve human-object interactions with prominent motion patterns and in datasets like PKU-MMD, most actions have similar appearance with variant motion over time. Thus, OF stream provides more salient information than Pose stream on these datasets. Whereas 3D Poses are robust to the change of the view-points and thus, significantly improves the action detection performance in cross-view settings (see Tab. 5). Furthermore, with a multi-teacher network with OF and
|
| 182 |
+
|
| 183 |
+
Table 2. Feature-level and logit-level distillation. The student learns from OF stream. For PKU-MMD, we set IoU=0.1.
|
| 184 |
+
|
| 185 |
+
<table><tr><td></td><td>Charades</td><td>PKU-MMD</td></tr><tr><td>Logit</td><td>23.7</td><td>84.9</td></tr><tr><td>Logit+Feature</td><td>24.2</td><td>85.4</td></tr><tr><td>Feature (Ours)</td><td>24.6</td><td>85.5</td></tr></table>
|
| 186 |
+
|
| 187 |
+
Table 3. Comparison with cross-modal KD methods and $\mathcal{L}_{\text{Atomic}}$ on Charades and PKU-MMD datasets. For PKU-MMD, IoU=0.1.
|
| 188 |
+
|
| 189 |
+
<table><tr><td></td><td>Charades</td><td>PKU-MMD</td></tr><tr><td>Vanilla-RGB</td><td>22.3</td><td>79.6</td></tr><tr><td>+LHall [18]</td><td>22.7</td><td>81.5</td></tr><tr><td>+LMARS [6]</td><td>23.5</td><td>81.7</td></tr><tr><td>+LGD [38]</td><td>23.3</td><td>82.2</td></tr><tr><td>+LAtomic(Ours)</td><td>23.9</td><td>82.7</td></tr></table>
|
| 190 |
+
|
| 191 |
+
Table 4. Ablation for different temporal filters: SS-TCN and TGM on the Charades. The models learn from the OF.
|
| 192 |
+
|
| 193 |
+
<table><tr><td></td><td>SSTCN</td><td>TGM</td></tr><tr><td>Vanilla-RGB</td><td>22.3</td><td>18.9</td></tr><tr><td>Two Stream</td><td>24.8</td><td>21.5</td></tr><tr><td>Augmented-RGB</td><td>24.6</td><td>21.2</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 5. Ablation for different modalities on Charades, PKU-MMD (CS), TSU-CS and TSU-CV. For TSU, the reported values are frame-based mAP (\%). The IoU threshold for PKU-MMD is 0.1.
|
| 196 |
+
|
| 197 |
+
<table><tr><td></td><td>Charades</td><td>PKU-MMD</td><td>TSU-CS</td><td>TSU-CV</td></tr><tr><td>Teacher-OF</td><td>18.6</td><td>68.4</td><td>29.4</td><td>17.5</td></tr><tr><td>Teacher-Pose</td><td>9.8</td><td>65.0</td><td>26.2</td><td>22.4</td></tr><tr><td>Vanilla-RGB</td><td>22.3</td><td>79.6</td><td>29.2</td><td>18.9</td></tr><tr><td>Two-stream RGB + Pose</td><td>23.0</td><td>82.9</td><td>32.6</td><td>23.7</td></tr><tr><td>Two-stream RGB + OF</td><td>24.8</td><td>83.4</td><td>33.5</td><td>19.5</td></tr><tr><td>Pose Augmented RGB</td><td>23.2</td><td>84.7</td><td>32.4</td><td>23.6</td></tr><tr><td>OF Augmented RGB</td><td>24.6</td><td>85.5</td><td>32.8</td><td>19.3</td></tr><tr><td>Pose + OF Augmented RGB</td><td>24.9</td><td>86.3</td><td>33.7</td><td>23.8</td></tr></table>
|
| 198 |
+
|
| 199 |
+
Poses, the RGB stream now dubbed as Pose + OF Augmented RGB learns some additional information (+2.6%, +6.7%, +4.5%, +4.9% w.r.t. vanilla RGB stream on Charades, PKU-MMD, TSU-CS, TSU-CV respectively).
|
| 200 |
+
|
| 201 |
+
Inference time & Complexity: Fig. 3 shows the precision vs inference time per video on Charades dataset. The inference time includes the time of extracting the additional modalities and the processing time of the visual encoder and temporal filter. We find that Two stream RGB + TVL1 [64] achieves high precision on Charades, but at the expense of a high computational cost. In this work, we use TVL1 to obtain the OF modality. Although there are methods [27, 52] that generate OF at higher speed, these methods perform significantly worse than TVL1 [6]. Similarly, the computation of accurate 3D Positions is not real-time, and hence doubles the video processing time [44]. With these modalities in training phase, our proposed framework avoids estimating these modalities at test time while keeping the performance of two-stream network. The processing speed at the inference phase (I3D+SSTCN) is about 140 fps using 4 GPUs, thus can be seen as a real-time processing. Concerning complexity, as we have the same type of temporal filter and encoder for teacher and student, the Augmented-RGB stream retains the same number of parameters as the vanilla RGB stream at inference time, whereas two stream network doubles the number of parameters often causing over-fitting [59].
|
| 202 |
+
|
| 203 |
+
# 4.5. Qualitative Analysis
|
| 204 |
+
|
| 205 |
+
With Global Contextual Relation loss, the student learns the relationships among the action instances of the teacher network along with retaining the student's individual representation. As shown in Fig. 4, with only $\mathcal{L}_{Global}$ , the channel covariance representation of Augmented-RGB is closer to the one of RGB+OF. Hence, the Augmented-RGB achieves performance close to the one of the two-stream
|
| 206 |
+
|
| 207 |
+
network.
|
| 208 |
+
|
| 209 |
+
We also compare the performance of RGB stream with Boundary Saliency distillation and vanilla RGB stream. In Fig. 5, we find that the network with $\mathcal{L}_{\text{Boundary}}$ detects tighter temporal boundaries of the actions compared to the vanilla network. To further show how two sequence-level distillation losses are complementary, we compare APs for a student that is trained with only $\mathcal{L}_{\text{Global}}$ or $\mathcal{L}_{\text{Boundary}}$ on Charades in Fig. 6. We find that $\mathcal{L}_{\text{Boundary}}$ improves more the actions with high variation across time (e.g. Throw pillow), $\mathcal{L}_{\text{Global}}$ improves more the actions with relatively longer duration (e.g. Holding mirror). While learning from $\mathcal{L}_{\text{Global}} + \mathcal{L}_{\text{Boundary}}$ , the student improves all action types, reflecting how these two loss-terms complement each other.
|
| 210 |
+
|
| 211 |
+
Fig. 7 shows the class-wise actionness result of the vanilla-RGB and Augmented-RGB in a densely labeled video along with the action detection results. We notice that the Augmented-RGB detects tight action boundary w.r.t. the vanilla-RGB, e.g. use cupboard, walk. Thanks to our distillation methods, the Augmented-RGB now predicts the use drawer action which is miss detected in vanilla-RGB.
|
| 212 |
+
|
| 213 |
+
# 4.6. Comparison with the State-of-the-Art
|
| 214 |
+
|
| 215 |
+
In Tab. 6, we compare other action detection methods with our Augmented-RGB on PKU-MMD. Recall that our distillation mechanisms are built on SSTCN. While one method [32] using Poses achieves very high performance, this method is skeleton-based and applicable only for specific datasets (i.e. NTU-RGBD [45], PKU-MMD [36]), where high quality 3D Poses are available. In contrast, our method is generic and does not rely on Poses at inference time while being more effective compared to other RGB based SoA methods, such as Graph Distillation [38] $(+2.6\%, +2.4\%, +4.6\%)$ for 0.1, 0.3, 0.5 IoU), which utilizes the same temporal filter but more modalities (e.g. depth) at
|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
Figure 3. Precision vs Inference time per video on Charades.
|
| 219 |
+
|
| 220 |
+
Table 6. Event-based mAP on PKU-MMD (CS) dataset. Only the last five rows utilize RGB at inference time. Note that Graph distillation (GD) learns from more than 4 modalities while our method learns from OF and Pose.
|
| 221 |
+
|
| 222 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Method</td><td colspan="3">mAP@tIoU (θ)</td></tr><tr><td>0.1</td><td>0.3</td><td>0.5</td></tr><tr><td rowspan="5">Test modality</td><td>JCRRNN [33]</td><td>45.2</td><td>-</td><td>32.5</td></tr><tr><td>Convolution Skeleton [36]</td><td>49.3</td><td>31.8</td><td>12.1</td></tr><tr><td>Skeleton boxes [1]</td><td>61.3</td><td>-</td><td>54.8</td></tr><tr><td>Wang and Wang [57]</td><td>84.2</td><td>-</td><td>-</td></tr><tr><td>Li et al. [32]</td><td>92.2</td><td>-</td><td>90.4</td></tr><tr><td rowspan="5">RGB</td><td>Deep RGB [36]</td><td>50.7</td><td>32.3</td><td>14.7</td></tr><tr><td>Qin and Shelton [43]</td><td>65.0</td><td>51.0</td><td>29.4</td></tr><tr><td>GRU+GD [38]</td><td>82.4</td><td>81.3</td><td>74.3</td></tr><tr><td>SSTCN+GD</td><td>83.7</td><td>82.1</td><td>76.5</td></tr><tr><td>Augmented-RGB</td><td>86.3</td><td>84.5</td><td>81.1</td></tr></table>
|
| 223 |
+
|
| 224 |
+
Table 7. Comparison with State-of-the-Art action detection methods. Our method learns only from OF. The cells in white are the two stream results (RGB+OF), while the cell in orange represents using only RGB at Inference time. We report frame-based mAP and event-based mAP for the dense and sparse labeled datasets respectively. The IoU is 0.5 for THUMOS14.
|
| 225 |
+
|
| 226 |
+
<table><tr><td rowspan="2">Type</td><td rowspan="2">Model</td><td colspan="3">Dense</td><td>Sparse</td></tr><tr><td>Charades</td><td>TSU-CS</td><td>MultiTHUMOS</td><td>THUMOS14</td></tr><tr><td rowspan="4">Anchor</td><td>R-C3D [61]</td><td>12.7</td><td>8.7</td><td>—</td><td>28.9</td></tr><tr><td>TAL [3]</td><td>—</td><td>—</td><td>—</td><td>42.8</td></tr><tr><td>G-TAD [62]</td><td>—</td><td>—</td><td>—</td><td>40.2</td></tr><tr><td>AFNet [5]</td><td>13.1</td><td>—</td><td>—</td><td>49.5</td></tr><tr><td rowspan="6">Seq2Seq</td><td>TAN [10]</td><td>17.6</td><td>—</td><td>33.3</td><td>46.8</td></tr><tr><td>WSGM [15]</td><td>18.7</td><td>—</td><td>—</td><td>32.8</td></tr><tr><td>TGM [42]</td><td>21.5</td><td>26.7</td><td>44.3</td><td>53.5</td></tr><tr><td>Vanila-RGB [14]</td><td>22.3</td><td>29.2</td><td>37.8</td><td>46.1</td></tr><tr><td>Two-stream</td><td>24.4</td><td>33.5</td><td>44.4</td><td>53.7</td></tr><tr><td>Augmented-RGB</td><td>24.6</td><td>32.8</td><td>44.6</td><td>53.3</td></tr></table>
|
| 227 |
+
|
| 228 |
+

|
| 229 |
+
(1) RGB
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
(2) Flow
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
(3) $\mathrm{RGB} + \mathrm{Flow}$
|
| 236 |
+
Figure 4. Channel Covariance. We visualize the Covariance matrix of a video for the vanilla RGB, vanilla OF, the two-stream RGB+OF, and the Augmented-RGB $(\mathcal{L}_{Global})$ . For better visualization, we normalize the matrix to [0,1] and set a threshold of 0.5.
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
(4) Augmented RGB
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
Figure 5. Action boundary detection: (1) Ground truth indicates if it is action or background at this frame. (2) The boundaries detected without $\mathcal{L}_{\text{Boundary}}$ , (3) The boundaries detected with $\mathcal{L}_{\text{Boundary}}$ .
|
| 243 |
+
|
| 244 |
+
training time compared to our method.
|
| 245 |
+
|
| 246 |
+
To show the generalization of our method, we also evaluate our distillation framework on Charades and TSU-CS, MultiTHUMOS and THUMOS in Table 7. For all these comparisons, the student network is distilled with teacher pre-trained with OF in the training phase, as Poses are not always available. For a fair comparison with our Augmented-RGB, Vanilla-RGB and Two-stream networks are implemented using SSTCN. In this table, we find that, anchor-based methods (e.g. AFNet) perform decently on sparsely-labeled datasets, while failing on densely labeled datasets due to the combinatorial explosion of proposals. On the other hand, Seq2Seq architectures are stable on both types of dataset. With the help of our proposed distillation method, the Augmented-RGB achieves the competitive Two-stream performance on all the datasets (+2.3, 3.6, 6.8, 7.2 w.r.t. vanilla-RGB on Charades, TSU, MultiTHUMOS, THUMOS14 respectively). We observe that the performance improvement on THUMOS which consists of sport videos, is significant due to strong motion patterns resulting to an effective OF based teacher network. Thus, Augmented-RGB while using only RGB at inference, performs on par with Two-stream network for the task of action detection.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
Figure 6. Difference of Average Precision for two sequence-level distillation losses on Charades dataset. G: $\mathcal{L}_{Global}$ , B: $\mathcal{L}_{Boundary}$ .
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 7. Class-wise actionness with the detection results.
|
| 253 |
+
|
| 254 |
+
# 5. Conclusion
|
| 255 |
+
|
| 256 |
+
In this work, we have introduced a novel distillation framework for action detection. This generic framework combines three novel learnable losses to better benefit from the cross-modal information in untrimmed videos. To the best of our knowledge, we are the first to propose a formulation with sequence-level distillation in this task. Thanks to this framework, we can improve the performance of vanilla RGB networks and make it possible to detect actions in real-time with high precision, even in case of densely labeled datasets. Experiments on five datasets show that the proposed method can effectively infuse different modalities into RGB. For instance, the Augmented-RGB network achieves the Two-stream network performance while using only RGB at inference time.
|
| 257 |
+
|
| 258 |
+
Acknowledgements. This work has been supported by the French government, through the 3IA Côte d'Azur Investments in the Future project managed by the National Research Agency (ANR) with the reference number ANR-19-P3IA-0002. The authors are also grateful to the OPAL infrastructure from Université Côte d'Azur for providing resources and support.
|
| 259 |
+
|
| 260 |
+
# References
|
| 261 |
+
|
| 262 |
+
[1] Bo Li, Huahui Chen, Yucheng Chen, Yuchao Dai, and Mingyi He. Skeleton boxes: Solving skeleton based action detection with a single deep convolutional neural network. In 2017 IEEE International Conference on Multimedia Expo Workshops (ICMEW), pages 613-616, 2017. 8
|
| 263 |
+
[2] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4724-4733. IEEE, 2017. 3
|
| 264 |
+
[3] Yu-Wei Chao, Sudheendra Vijayanarasimhan, Bryan Seybold, David A Ross, Jia Deng, and Rahul Sukthankar. Rethinking the faster r-cnn architecture for temporal action localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1130–1139, 2018. 2, 8
|
| 265 |
+
[4] Guobin Chen, Wongun Choi, Xiang Yu, Tony Han, and Manmohan Chandraker. Learning efficient object detection models with knowledge distillation. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 742-751, 2017. 3
|
| 266 |
+
[5] Guang Chen, Can Zhang, and Yuexian Zou. Afnet: Temporal locality-aware network with dual structure for accurate and fast action detection. IEEE Transactions on Multimedia, 2020. 2, 8
|
| 267 |
+
[6] Nieves Crasto, Philippe Weinzaepfel, Karteek Alahari, and Cordelia Schmid. MARS: Motion-Augmented RGB Stream for Action Recognition. In CVPR, 2019. 1, 3, 6, 7
|
| 268 |
+
[7] Rui Dai, Srijan Das, Luca Minciullo, Lorenzo Garattoni, Gianpiero Francesca, and Francois Bremond. Pdan: Pyramid dilated attention network for action detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 2970-2979, January 2021. 2
|
| 269 |
+
[8] Rui Dai, Srijan Das, Saurav Sharma, Luca Minciullo, Lorenzo Garattoni, Francois Bremond, and Gianpiero Francesca. Toyota smarthome untrimmed: Realworld untrimmed videos for activity detection. arXiv preprint arXiv:2010.14982, 2020. 2, 5
|
| 270 |
+
[9] Rui Dai, Luca Minciullo, Lorenzo Garattoni, Gianpiero Francesca, and François Bremond. Self-attention temporal convolutional network for long-term daily living activity detection. In 2019 16th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), pages 1-7. IEEE, 2019. 2
|
| 271 |
+
[10] Xiyang Dai, Bharat Singh, Joe Yue-Hei Ng, and Larry Davis. Tan: Temporal aggregation network for dense
|
| 272 |
+
|
| 273 |
+
multi-label action recognition. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 151-160. IEEE, 2019. 2, 3, 6, 8
|
| 274 |
+
[11] Srijan Das, Saurav Sharma, Rui Dai, Francois Bremond, and Monique Thonnat. Vpn: Learning videopose embedding for activities of daily living, 2020. 1
|
| 275 |
+
[12] Srijan Das, Monique Thonnat, and Francois Bremond. Looking deeper into time for activities of daily living recognition. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 498-507, 2020. 2
|
| 276 |
+
[13] Bernard Ghanem Fabian Caba Heilbron, Victor Escorcia and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 961-970, 2015. 2
|
| 277 |
+
[14] Yazan Abu Farha and Jurgen Gall. Ms-tcn: Multi-stage temporal convolutional network for action segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3575-3584, 2019. 3, 6, 8
|
| 278 |
+
[15] Basura Fernando, Cheston Tan, and Hakan Bilen. Weakly supervised gaussian networks for action detection. In The IEEE Winter Conference on Applications of Computer Vision (WACV), March 2020. 8
|
| 279 |
+
[16] Jiyang Gao, Zhenheng Yang, Kan Chen, Chen Sun, and Ram Nevatia. Turn tap: Temporal unit regression network for temporal action proposals. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 2
|
| 280 |
+
[17] Nuno Cruz Garcia, Sarah Adel Bargal, Vitaly Ablavsky, Pietro Morerio, Vittorio Murino, and Stan Sclaroff. Distillation multiple choice learning for multimodal action recognition. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 2755-2764, January 2021. 1
|
| 281 |
+
[18] Nuno C. Garcia, Pietro Morerio, and Vittorio Murino. Modality distillation with multiple stream networks for action recognition. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, Computer Vision – ECCV 2018, pages 106–121, Cham, 2018. Springer International Publishing. 1, 3, 6, 7
|
| 282 |
+
[19] Chunhui Gu, Chen Sun, David A. Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, Cordelia Schmid, and Jitendra Malik. Ava: A video dataset of spatio-temporally localized atomic visual actions. Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 4
|
| 283 |
+
|
| 284 |
+
[20] Saurabh Gupta, Judy Hoffman, and Jitendra Malik. Cross modal distillation for supervision transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 1
|
| 285 |
+
[21] Frank Hafner, Amran Bhuiyan, Julian FP Kooij, and Eric Granger. A cross-modal distillation network for person re-identification in rgb-depth. arXiv preprint arXiv:1810.11641, 2018. 1
|
| 286 |
+
[22] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729-9738, 2020. 4
|
| 287 |
+
[23] Geoffrey Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning and Representation Learning Workshop, 2015. 3
|
| 288 |
+
[24] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735-1780, Nov. 1997. 3
|
| 289 |
+
[25] Judy Hoffman, Saurabh Gupta, and Trevor Darrell. Learning with side information through modality hallucination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 826-834, 2016. 6
|
| 290 |
+
[26] Yu-Gang. Jiang, Jingen Liu, Amir Roshan Zamir, George Toderici, Ivan Laptev, Mubarak Shah, and Rahul Sukthankar. THUMOS challenge: Action recognition with a large number of classes. http://crcv.ucf.edu/THUMOS14/, 2014. 2, 5
|
| 291 |
+
[27] Vadim Kantorov and Ivan Laptev. Efficient feature extraction, encoding and classification for action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2593-2600, 2014. 3, 7
|
| 292 |
+
[28] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 1
|
| 293 |
+
[29] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. 6
|
| 294 |
+
[30] Hildegard Kuehne, Hueihan Jhuang, Estíbaliz Garrote, Tomaso Poggio, and Thomas Serre. Hmdb: a large video database for human motion recognition. In 2011 International Conference on Computer Vision, pages 2556-2563. IEEE, 2011. 1
|
| 295 |
+
[31] Colin Lea, Michael D Flynn, Rene Vidal, Austin Reiter, and Gregory D Hager. Temporal convolutional networks for action segmentation and detection. In
|
| 296 |
+
|
| 297 |
+
proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 156-165, 2017. 2,3
|
| 298 |
+
[32] Chao Li, Qiaoyong Zhong, Di Xie, and Shiliang Pu. Skeleton-based action recognition with convolutional neural networks. In 2017 IEEE International Conference on Multimedia & Expo Workshops (ICMEW), pages 597-600. IEEE, 2017. 7, 8
|
| 299 |
+
[33] Yanghao Li, Cuiling Lan, Junliang Xing, Wenjun Zeng, Chunfeng Yuan, and Jiaying Liu. Online human action detection using joint classification-regression recurrent neural networks. In European Conference on Computer Vision, pages 203-220. Springer, 2016. 8
|
| 300 |
+
[34] Chuming Lin, Chengming Xu, Donghao Luo, Yabiao Wang, Ying Tai, Chengjie Wang, Jilin Li, Feiyue Huang, and Yanwei Fu. Learning salient boundary feature for anchor-free temporal action localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3320-3329, 2021. 5
|
| 301 |
+
[35] Tianwei Lin, Xu Zhao, Haisheng Su, Chongjing Wang, and Ming Yang. Bsn: Boundary sensitive network for temporal action proposal generation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 3
|
| 302 |
+
[36] Chunhui Liu, Yueyu Hu, Yanghao Li, Sijie Song, and Jiaying Liu. Pku-mmd: A large scale benchmark for skeleton-based human action understanding. In Proceedings of the Workshop on Visual Analysis in Smart and Connected Communities, VSCC '17, pages 1-8, New York, NY, USA, 2017. ACM. 2, 5, 7, 8
|
| 303 |
+
[37] Yifan Liu, Ke Chen, Chris Liu, Zengchang Qin, Zhenbo Luo, and Jingdong Wang. Structured knowledge distillation for semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2604-2613, 2019. 3
|
| 304 |
+
[38] Zelun Luo, Jun-Ting Hsieh, Lu Jiang, Juan Carlos Niebles, and Li Fei-Fei. Graph distillation for action detection with privileged modalities. In The European Conference on Computer Vision (ECCV), September 2018. 2, 3, 4, 6, 7, 8
|
| 305 |
+
[39] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. Adv. Neural Inform. Process. Syst., 2018. 4
|
| 306 |
+
[40] Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3967-3976, 2019. 3
|
| 307 |
+
[41] AJ Piergiovanni and Michael S Ryoo. Learning latent super-events to detect multiple activities in videos. In
|
| 308 |
+
|
| 309 |
+
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5304-5313, 2018. 1, 3, 4
|
| 310 |
+
[42] AJ Piergiovanni and Michael S Ryoo. Temporal gaussian mixture layer for videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 3, 6, 8
|
| 311 |
+
[43] Zhen Qin and Christian R Shelton. Event detection in continuous video: An inference in point process approach. IEEE Transactions on Image Processing, 26(12):5680-5691, 2017. 8
|
| 312 |
+
[44] Grégory Rogez, Philippe Weinzaepfel, and Cordelia Schmid. LCR-Net++: Multi-person 2D and 3D Pose Detection in Natural Images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 6, 7
|
| 313 |
+
[45] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Nturgb+d: A large scale dataset for 3d human activity analysis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 7
|
| 314 |
+
[46] Lei Shi, Yifan Zhang, Jian Cheng, and Hanqing Lu. Two-stream adaptive graph convolutional networks for skeleton-based action recognition. In CVPR, 2019. 6
|
| 315 |
+
[47] Gunnar A Sigurdsson, Santosh Divvala, Ali Farhadi, and Abhinav Gupta. Asynchronous temporal fields for action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 585-594, 2017. 1, 5, 6
|
| 316 |
+
[48] Gunnar A. Sigurdsson, Gül Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In European Conference on Computer Vision(ECCV), 2016. 2
|
| 317 |
+
[49] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. 1
|
| 318 |
+
[50] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. CoRR, abs/1212.0402, 2012. 1
|
| 319 |
+
[51] Rui Su, Wanli Ouyang, Luping Zhou, and Dong Xu. Improving action localization by progressive cross-stream cooperation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12016-12025, 2019. 2
|
| 320 |
+
[52] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8934-8943, 2018. 3, 7
|
| 321 |
+
|
| 322 |
+
[53] Shuyang Sun, Zhanghui Kuang, Lu Sheng, Wanli Ouyang, and Wei Zhang. Optical flow guided feature: A fast and robust motion representation for video action recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 3
|
| 323 |
+
[54] Javier Sánchez Pérez, Enric Meinhardt-Llopis, and Gabriele Facciolo. TV-L1 Optical Flow Estimation. Image Processing On Line, 3:137-150, 2013. 6
|
| 324 |
+
[55] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive representation distillation. In International Conference on Learning Representations, 2020. 4
|
| 325 |
+
[56] Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1365-1374, 2019. 3
|
| 326 |
+
[57] Jiang Wang, Zicheng Liu, Ying Wu, and Junsong Yuan. Mining actionlet ensemble for action recognition with depth cameras. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 1290-1297. IEEE, 2012. 8
|
| 327 |
+
[58] Liwei Wang, Yin Li, and Svetlana Lazebnik. Learning deep structure-preserving image-text embeddings. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5005-5013, 2016. 6
|
| 328 |
+
[59] Weiyao Wang, Du Tran, and Matt Feiszli. What makes training multi-modal networks hard? CoRR, abs/1905.12681, 2019. 7
|
| 329 |
+
[60] Yuanjun Xiong, Yue Zhao, Limin Wang, Dahua Lin, and Xiaou Tang. A pursuit of temporal accuracy in general activity detection. arXiv preprint arXiv:1703.02716, 2017. 3
|
| 330 |
+
[61] Huijuan Xu, Abir Das, and Kate Saenko. R-c3d: Region convolutional 3d network for temporal activity detection. In Proceedings of the IEEE international conference on computer vision, pages 5783-5792, 2017. 2, 8
|
| 331 |
+
[62] Mengmeng Xu, Chen Zhao, David S Rojas, Ali Thabet, and Bernard Ghanem. G-tad: Sub-graph localization for temporal action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10156-10165, 2020. 1, 2, 8
|
| 332 |
+
[63] Serena Yeung, Olga Russakovsky, Ning Jin, Mykhaylo Andriluka, Greg Mori, and Li Fei-Fei. Every moment counts: Dense detailed labeling of actions in complex videos. International Journal of Computer Vision, 126(2-4):375-389, 2018. 1, 2, 5, 6
|
| 333 |
+
[64] Christopher Zach, Thomas Pock, and Horst Bischof. A duality based approach for realtime tv-1 optical
|
| 334 |
+
|
| 335 |
+
flow. In Joint pattern recognition symposium, pages 214-223. Springer, 2007. 7
|
| 336 |
+
[65] Songyang Zhang, Houwen Peng, Jianlong Fu, and Jiebo Luo. Learning 2d temporal adjacent networks formoment localization with natural language. In AAAI, 2020. 3
|
| 337 |
+
[66] Jiaojiao Zhao and Cees G. M. Snoek. Dance with flow: Two-in-one stream action detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3
|
| 338 |
+
[67] Yue Zhao, Yuanjun Xiong, Limin Wang, Zhirong Wu, Xiaou Tang, and Dahua Lin. Temporal action detection with structured segment networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2914-2923, 2017. 2, 3
|
| 339 |
+
[68] Mohammadreza Zolfaghari, Gabriel L Oliveira, Nima Sedaghat, and Thomas Brox. Chained multi-stream networks exploiting pose, motion, and appearance for action classification and detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 2904-2913, 2017. 1
|
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc02b96a00b96ee18f05e7c57ef06c20866c7dbfcf0f5972111336dd81d1445b
|
| 3 |
+
size 448185
|
learninganaugmentedrgbrepresentationwithcrossmodalknowledgedistillationforactiondetection/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f9e912587b601001111b6c2812f6e7b5ea7cf4dfc8d455c589165dc560836cfd
|
| 3 |
+
size 431281
|
learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f51d36ced6f379d1ebf19c6eaabf659c2cce9341e634f73cd40b0843ef47670b
|
| 3 |
+
size 83643
|
learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebb46db14bb3b5e1c5d3e6795a9452ba4b4a25fd1e75910e62908d2a5325e174
|
| 3 |
+
size 98534
|
learningasinglenetworkforscalearbitrarysuperresolution/f4bd1550-5a07-4721-8c85-c5aa92729034_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04450bbcf6898b45992ba2c4e4fb6f7a3affe9a3add185db374073eb6295768d
|
| 3 |
+
size 4910002
|
learningasinglenetworkforscalearbitrarysuperresolution/full.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning A Single Network for Scale-Arbitrary Super-Resolution
|
| 2 |
+
|
| 3 |
+
Longguang Wang, Yingqian Wang, Zaiping Lin, Jungang Yang, Wei An, Yulan Guo* National University of Defense Technology
|
| 4 |
+
|
| 5 |
+
{wanglongguang15,yulan.quo}@nudt.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Recently, the performance of single image superresolution (SR) has been significantly improved with powerful networks. However, these networks are developed for image SR with specific integer scale factors (e.g., $\times 2/3/4$ ), and cannot handle non-integer and asymmetric SR. In this paper, we propose to learn a scale-arbitrary image SR network from scale-specific networks. Specifically, we develop a plug-in module for existing SR networks to perform scale-arbitrary SR, which consists of multiple scale-aware feature adaption blocks and a scale-aware upsampling layer. Moreover, conditional convolution is used in our plug-in module to generate dynamic scale-aware filters, which enables our network to adapt to arbitrary scale factors. Our plug-in module can be easily adapted to existing networks to realize scale-arbitrary SR with a single model. These networks plugged with our module can produce promising results for non-integer and asymmetric SR while maintaining state-of-the-art performance for SR with integer scale factors. Besides, the additional computational and memory cost of our module is very small.
|
| 10 |
+
|
| 11 |
+
# 1. Introduction
|
| 12 |
+
|
| 13 |
+
Single image super-resolution (SR) aims at recovering a high-resolution (HR) image from its low-resolution (LR) counterpart. As a long-standing low-level computer vision problem, single image SR has been investigated for decades [1, 2, 3, 4, 5, 6]. Recently, the rise of deep learning provides a powerful tool to solve this problem, with numerous CNN-based methods [7, 8, 9, 10, 11] being developed to improve the SR performance.
|
| 14 |
+
|
| 15 |
+
Although recent CNN-based single image SR networks [6, 10, 12, 13] have achieved promising performance, they are developed for image SR with specific integer scale factors (e.g., $\times 2/3/4$ ). In many real-world applications like image retargeting, image editing and artworks, non-integer SR (e.g., from $100 \times 100$ to $220 \times 220$ ) and asymmetric SR (e.g., from $100 \times 100$ to $220 \times 420$ ) are highly demanded. However, due to the fixed filters in upscale modules, most
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1. Visual comparison achieved by Bicubic, Meta-RCAN [14] and our ArbRCAN. “(+Bicubic)” means that the network output is further resized to the expected resolution using bicubic interpolation for asymmetric scale factors.
|
| 19 |
+
|
| 20 |
+
existing networks can only zoom in an image with specific integer scales and cannot handle scale-arbitrary SR in real-world scenarios.
|
| 21 |
+
|
| 22 |
+
To address this limitation, Hu et al. [14] proposed a Meta-SR network to dynamically predict filters in the upscale module for different scale factors using meta-learning. As a result, Meta-SR achieves promising performance on non-integer scale factors. However, scale information is only used for upsampling in Meta-SR. That is, features in the backbone are the same for all SR tasks with different scale factors, which hinders the further improvement of performance. Moreover, Meta-SR focuses on SR with non-integer scale factors but cannot handle SR with asymmetric scale factors.
|
| 23 |
+
|
| 24 |
+
In this paper, we propose to learn a scale-arbitrary single image SR network from scale-specific networks. Specifically, we develop a plug-in module for existing SR networks to enable scale-arbitrary SR, which consists of multiple scale-aware feature adaption blocks and a scale-aware upsampling layer. The scale-aware feature adaption blocks are used to adapt features in the backbone to specific scale factors and the scale-aware upsampling layer is used for scale-arbitrary upsampling. Within our plug-in module, conditional convolutions are used to generate dynamic scale-aware filters to handle different scale factors. Our plug-in module can be easily adapted to existing networks for scale-
|
| 25 |
+
|
| 26 |
+
arbitrary SR with small additional computational and memory cost. Baseline networks equipped with our module can produce promising results for non-integer and asymmetric SR (Fig. 1), while maintaining state-of-the-art performance on integer scale factors with a single model. To the best of our knowledge, our plug-in module is the first work to handle asymmetric SR.
|
| 27 |
+
|
| 28 |
+
Our main contributions can be summarized as follows: 1) We develop a plug-in module for existing SR networks to achieve scale-arbitrary SR, including multiple scale-aware feature adaption blocks and a scale-aware upsampling layer. 2) Our plug-in module uses conditional convolution to dynamically generate filters based on the input scale information, which facilitates our network to adapt to specific scale factors. 3) Experimental results show that baseline networks equipped with our module produce promising results for scale-arbitrary SR with only a single model. A video demo is provided in the supplemental material.
|
| 29 |
+
|
| 30 |
+
# 2. Related Work
|
| 31 |
+
|
| 32 |
+
In this section, we first briefly review several major works for CNN-based single image SR. Then, we discuss conditional convolutions that are related to our work.
|
| 33 |
+
|
| 34 |
+
Single Image Super-Resolution. Due to the powerful feature representation and model fitting capabilities of deep neural network, CNN-based single image SR methods [7, 8, 9, 6, 10] outperform traditional methods [1, 2, 15, 3, 4, 5] significantly. Dong et al. [7] proposed a three-layer convolutional network (namely, SRCNN) to learn the non-linear mapping between LR images and HR images. A deeper network (namely, VDSR) with 20 layers [8] was then developed to achieve better performance. Later, Lim et al. [16] proposed a very deep and wide network, namely EDSR. Specifically, batch normalization (BN) layers were removed and a residual scaling technique was used to enable the training of such a large model. Recently, Zhang et al. [12] and Dai et al. [13] further improved the SR performance by introducing channel attention and second-order channel attention, respectively.
|
| 35 |
+
|
| 36 |
+
Although existing single image SR networks have achieved promising results, they are trained for SR with a single specific integer scale factor. To overcome this limitation, Lim et al. [16] proposed a multi-scale deep super-resolution (MDSR) system to integrate modules trained for multiple integer scale factors (i.e., $\times 2/3/4$ ). However, MDSR cannot super-resolve images with non-integer scale factors. Recently, Hu et al. [14] proposed a Meta-SR network to solve the scale-arbitrary upsampling problem. Specifically, they used meta-learning to predict weights of filters for different scale factors. Nevertheless, Meta-SR does not exploit the benefits of scale information during feature learning in the backbone. To make better use of scale information, Fu et al. [17] introduced a residual scale attenuate
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
LR Image
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Block 1
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Block 8
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Block 16
|
| 59 |
+
Figure 2. Visualization of feature similarity maps.
|
| 60 |
+
|
| 61 |
+
tion network (RSAN), where the scale information is used as a prior knowledge to learn discriminative features for superior performance.
|
| 62 |
+
|
| 63 |
+
Despite Meta-SR and RSAN are able to super-resolve images with non-integer scale factors, they cannot handle asymmetric SR. In many real-world applications like image retargeting, image editing and artworks, asymmetric SR is also highly demanded. However, it is still underinvestigated in literature. In this paper, we develop a plugin module for existing SR networks to enable SR with both non-integer and asymmetric scale factors.
|
| 64 |
+
|
| 65 |
+
Conditional Convolutions. Different from traditional convolutional layers with static filters, conditional convolutions [18, 19, 20, 21] parameterize their filters conditioned on the input as linear combinations of several experts. Consequently, the capacity of the network can be efficiently improved without a significant increase in computational cost. In this paper, we extend the idea of conditional convolutions to generate dynamic scale-aware filters to handle the scale-arbitrary SR task. It is demonstrated that conditional convolutions facilitate our network to adapt to arbitrary scale factors to achieve better SR performance.
|
| 66 |
+
|
| 67 |
+
# 3. Methodology
|
| 68 |
+
|
| 69 |
+
# 3.1. Motivation
|
| 70 |
+
|
| 71 |
+
Since SR tasks with different scale factors are interrelated [16], it is non-trivial to learn a scale-arbitrary SR network from scale-specific networks (e.g., $\times 2/3/4$ ). Early attempts [8, 22, 23] use shared features in the backbone to handle multiple scale factors without considering the scale information during feature learning. Intuitively, since the degradation is different for various scale factors, scale information can further be used to learn discriminative features to improve SR performance [17]. In this section, we investigate the relationship between $\times 2/3/4$ SR tasks to provide insights for scale-arbitrary SR.
|
| 72 |
+
|
| 73 |
+
We conduct experiments to compare the feature similarity on specific layers in pre-trained $\times 2 / 3 / 4$ SR networks. In our experiments, EDSR [16] is selected as the baseline network. First, we downsample an image to $\frac{1}{4}$ size (denoted as $I\in \mathbb{R}^{H\times W}$ ). Then, we feed $I$ to EDSR networks devel
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 3. An overview of our plug-in module. The details of our scale-aware convolutional layer and scale-aware upsampling layer are further illustrated in Figs. 4 and 5, respectively.
|
| 77 |
+
|
| 78 |
+
oped for $\times 2/3/4$ SR. Following [24], features from the last layer in the $i^{\mathrm{th}}$ residual block are whitened to remove global component for more precise calculation of pairwise similarity, resulting in $F_{i}^{\times 2}, F_{i}^{\times 3}, F_{i}^{\times 4} \in \mathbb{R}^{256 \times H \times W}$ . Next, for each location $p$ , we extract a triplet of feature samples at $p$ to obtain $f_{i}^{\times 2}, f_{i}^{\times 3}, f_{i}^{\times 4} \in \mathbb{R}^{256}$ and compute the feature similarity among them:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
S _ {i} (p) = \frac {1}{3} \left(\frac {\left(f _ {i} ^ {\times 2}\right) ^ {T} f _ {i} ^ {\times 3}}{\| f _ {i} ^ {\times 2} \| \| f _ {i} ^ {\times 3} \|} + \frac {\left(f _ {i} ^ {\times 2}\right) ^ {T} f _ {i} ^ {\times 4}}{\| f _ {i} ^ {\times 2} \| \| f _ {i} ^ {\times 4} \|} + \frac {\left(f _ {i} ^ {\times 3}\right) ^ {T} f _ {i} ^ {\times 4}}{\| f _ {i} ^ {\times 3} \| \| f _ {i} ^ {\times 4} \|}\right). \tag {1}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
The feature similarity map $S_{i}$ is visualized in Fig. 2. For more results, please refer to the supplemental material.
|
| 85 |
+
|
| 86 |
+
From Fig. 2, we can see that feature similarity varies for different blocks and regions. That is, the sensitivity of features to the change of scale factors is different for various blocks and regions. Consequently, we are motivated to perform pixel-wise feature adaption accordingly. For features within regions of high feature similarities, they can be directly used for SR with arbitrary scale factors. In contrast, features within regions of low feature similarities are adapted to specific scale factors. More analyses are included in the supplemental material.
|
| 87 |
+
|
| 88 |
+
# 3.2. Our Plug-in Module
|
| 89 |
+
|
| 90 |
+
The architecture of our plug-in module is shown in Fig. 3. Given a baseline network (e.g., EDSR) developed for SR with integer scale factors, we can extend it to a scale-arbitrary SR network using our plug-in module. Specifically, scale-aware feature adaption is performed after every $K$ backbone blocks, as shown in Fig. 3(b). Following the backbone module, a scale-aware upsampling layer is used for scale-arbitrary upsampling.
|
| 91 |
+
|
| 92 |
+
Scale-Aware Feature Adaption. Given a feature map $F$ ,
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 4. An illustration of our scale-aware convolutional layer.
|
| 96 |
+
|
| 97 |
+
it is first fed to an hourglass module with four convolutions and a sigmoid layer to generate a guidance map $M$ with values ranging from 0 to 1, as shown in Fig. 3(b). Then, $F$ is fed to a scale-aware convolution for feature adaption, resulting in an adapted feature map $F^{adapt}$ . Next, the guidance map $M$ is used to fuse $F$ and $F^{adapt}$ as:
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
F ^ {\text {f u s e}} = F + F ^ {\text {a d a p t}} \times M. \tag {2}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
Intuitively, in regions with high feature similarities across different scale factors, $F$ can be directly used as $F^{fuse}$ . In contrast, in regions with low feature similarities, $F^{adapt}$ is added into $F^{fuse}$ for feature adaption. That is, $M$ serves as a gating mechanism and learns to guide pixel-wise feature adaption. It is demonstrated in Sec. 4.3 that our network benefits from the guidance maps to produce better results for scale-arbitrary SR.
|
| 104 |
+
|
| 105 |
+
The scale-aware convolutional layer within our feature adaption blocks is further illustrated in Fig. 4. First, the horizontal and vertical scale factors $r_h$ and $r_v$ are fed to a model controller with two fully connected (FC) layers to generate routing weights. Then, these routing weights are used to combine the experts, resulting in a scale-aware filter. Here, experts represent a set of convolutional kernels to be
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
(a) computation of $L(x), L(y), R(x), R(y)$
|
| 109 |
+
|
| 110 |
+

|
| 111 |
+
(b) filter/offset prediction
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
(c) spatially-varying filtering
|
| 115 |
+
Figure 5. An illustration of our scale-aware upsampling layer.
|
| 116 |
+
|
| 117 |
+
combined based on the scale information. Finally, the predicted filter is used to process the input feature maps for feature adaption. Different from vanilla convolution with fixed filter, our scale-aware convolution dynamically customizes its filter conditioned on the scale information by combining knowledge from experts. It is demonstrated in Sec. 4.3 that scale-aware convolutions facilitate our network to adapt to specific scale factors to achieve better performance.
|
| 118 |
+
|
| 119 |
+
Scale-Aware Upsampling. Pixel shuffling layer [25] is widely used in SR networks for upsampling with integer scale factors. For $\times r (r = 2,3,4)$ SR, input features of size $C_{in} \times H \times W$ are first fed to a convolution to produce features of size $r^2 C_{out} \times H \times W$ . Then, the resulting features are shuffled to the size of $C_{out} \times rH \times rW$ . The pixel shuffling layer can be considered as a two-step pipeline, which consists of a sampling step and a spatially-varying filtering step (i.e., $r^2$ convolutions for $r^2$ different sub-positions). Please refer to the supplemental material for more details.
|
| 120 |
+
|
| 121 |
+
In this paper, we generalize the pixel shuffling layer to a scale-aware upsampling layer, as shown in Fig. 5. First, each pixel $(x,y)$ in the HR space is projected to the LR space to compute its coordinates $(L(x)$ and $L(y))$ and relative distances $(R(x)$ and $R(y))$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
L (x) = \frac {x + 0 . 5}{r _ {h}} - 0. 5, \tag {3}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
R (x) = L (x) - \operatorname {f l o o r} \left(\frac {x + 0 . 5}{r _ {h}}\right), \tag {4}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $L(y)$ and $R(y)$ are calculated similar to $L(x)$ and $R(x)$ . Next, $R(x), R(y), r_h$ and $r_v$ are concatenated and fed to two FC layers for feature extraction, as shown in Fig. 5(b). The resulting features are then passed to filter and offset heads to predict routing weights and offsets ( $\delta_x$ and $\delta_y$ ), respectively. After that, the routing weights are used to combine two groups of experts, resulting in a pair of filters for the bottleneck/expansion layers in Fig. 5(c). Finally, a $k \times k$ neighborhood centered at $(L(x) + \delta_x, L(y) + \delta_y)$ is sampled using bilinear interpolation and convolved with the predicted filters to produce the output features at $(x, y)$ , as shown in Fig. 5(c).
|
| 132 |
+
|
| 133 |
+
In the implementation, a pair of convolutional kernels $(\mathbb{R}^{C\times \frac{C}{8}\times k\times k}$ and $\mathbb{R}^{\frac{C}{8}\times C\times k\times k})$ need to be generated and stored for each location in HR space. Since the memory consumption can be very high for $k = 3$ ( $\sim 31.6\mathrm{G}$ for a 720P HR image), $k$ is set to 1 in our networks for memory efficiency ( $\sim 3.5\mathrm{G}$ ).
|
| 134 |
+
|
| 135 |
+
# 4. Experiments
|
| 136 |
+
|
| 137 |
+
# 4.1. Datasets and Metrics
|
| 138 |
+
|
| 139 |
+
We used the DIV2K dataset [26] for network training and five benchmark datasets for evaluation, including Set5 [27], Set14 [28], B100 [29], Urban100 [30], and Manga109 [31]. Peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) were used as evaluation metrics. Similar to [14], we cropped borders for fair comparison. Note that, all metrics were computed in the luminance channel.
|
| 140 |
+
|
| 141 |
+
# 4.2. Implementation Details
|
| 142 |
+
|
| 143 |
+
Following [14], symmetric scale factors varying from 1 to 4 with a stride of 0.1 (i.e., 1.1, 1.2, ..., 3.9, 4.0) were used to generate LR training images. Moreover, asymmetric scale factors with a stride of 0.5 along horizontal and vertical axes (i.e., $\frac{1.5}{2.0}, \frac{1.5}{2.5}, \dots, \frac{4.0}{3.0}, \frac{4.0}{3.5}$ ) were also included for LR image generation. During training, a pair of horizontal/vertical scale factors was randomly selected from the above ranges for each batch and then 16 LR patches with the size of $50 \times 50$ were randomly cropped. Meanwhile, their corresponding HR patches were also cropped. Data augmentation was performed through random rotation and random flipping.
|
| 144 |
+
|
| 145 |
+
In our experiments, EDSR [16], RDN [10] and RCAN [12] were used as baseline networks to produce three scale-arbitrary networks, i.e., ArbEDSR, ArbRDN and ArbRCAN. We use 4 experts in the scale-aware convolutions and set $K = 4/2/1$ for ArbEDSR/ArbRDN/ArbRCAN to control the model size. Since the available pre-trained RDN models are implemented in Torch while our networks are implemented in PyTorch [32], we re-trained RDN as our baseline network. Pre-trained $\times 4$ SR models of EDSR/RDN/RCAN were used to initialize the backbone
|
| 146 |
+
|
| 147 |
+
Table 1. PSNR results achieved by our network with different settings on Set5.
|
| 148 |
+
|
| 149 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Scale-Aware Feature Adaption</td><td rowspan="2">Scale-Aware Upsampling</td><td rowspan="2">×1.7</td><td rowspan="2">×2</td><td rowspan="2">×2.95</td><td rowspan="2">×3</td><td rowspan="2">×3.1</td><td rowspan="2">×1.3 ×3.9</td><td rowspan="2">×1.9 ×3.5</td><td rowspan="2">×2 ×3.3</td><td rowspan="2">×3.3 ×1.9</td><td rowspan="2">×4 ×1.8</td></tr><tr><td>Scale-Aware Conv</td><td>Guidance Map</td></tr><tr><td>EDSR (+Bicubic)*</td><td>X</td><td>X</td><td>X</td><td>39.72</td><td>38.19</td><td>34.64</td><td>34.68</td><td>34.25</td><td>34.10</td><td>34.70</td><td>34.92</td><td>35.68</td><td>34.61</td></tr><tr><td>1</td><td>X</td><td>X</td><td>bicubic</td><td>39.56</td><td>37.86</td><td>33.77</td><td>33.78</td><td>33.47</td><td>33.12</td><td>33.90</td><td>34.21</td><td>34.90</td><td>33.42</td></tr><tr><td>2</td><td>X</td><td>X</td><td>✓</td><td>39.76</td><td>38.13</td><td>34.70</td><td>34.68</td><td>34.40</td><td>34.32</td><td>34.91</td><td>35.02</td><td>35.85</td><td>34.67</td></tr><tr><td>3</td><td>✓</td><td>X</td><td>✓</td><td>39.81</td><td>38.15</td><td>34.70</td><td>34.70</td><td>34.42</td><td>34.38</td><td>34.98</td><td>35.10</td><td>35.91</td><td>34.72</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td>✓</td><td>39.87</td><td>38.19</td><td>34.75</td><td>34.73</td><td>34.48</td><td>34.44</td><td>35.03</td><td>35.16</td><td>35.95</td><td>34.81</td></tr></table>
|
| 150 |
+
|
| 151 |
+
* To perform SR with non-integer and asymmetric scale factors (e.g., $\times 1.7 / \frac{\times 1.3}{\times 3.9}$ SR) using baseline network, we first super-resolve the LR image for $\times 2 / \times 4$ SR and then downscale the result to the expected resolution using bicubic interpolation following [14].
|
| 152 |
+
|
| 153 |
+
blocks in ArbEDSR/ArbRDN/ArbRCAN, respectively. We used the Adam method [33] with $\beta_{1} = 0.9$ and $\beta_{2} = 0.999$ for optimization. An $L_{1}$ loss between SR results and HR images was used as the loss function. Following [10], 1000 iterations of back-propagation constitute an epoch. The initial learning rate was set to $1\times 10^{-4}$ and reduced to half after every 30 epochs. To maintain training stability, we first trained our networks on integer scale factors $(r = 2,3,4)$ for 1 epoch and then trained the networks on all scale factors. The training was stopped after 150 epochs.
|
| 154 |
+
|
| 155 |
+
# 4.3. Ablation Study
|
| 156 |
+
|
| 157 |
+
Ablation experiments were conducted on Set5 to test the effectiveness of our design choices. We used EDSR as the baseline network and introduced 4 variants. All variants were re-trained for 150 epochs.
|
| 158 |
+
|
| 159 |
+
Scale-Aware Upsampling. To enable scale-arbitrary SR, a naive approach is to replace the pixel shuffling layer with an interpolation layer (e.g., bicubic interpolation). To demonstrate the effectiveness of our scale-aware upsampling layer, we introduced two variants. For variant 1, we replaced the pixel shuffling layer in the baseline network with a bicubic upsampling layer. For variant 2, we replaced the pixel shuffling layer with the proposed scale-aware upsampling layer. It can be observed from Table 1 that the PSNR values are relatively low when bicubic upsampling is used. With our scale-aware upsampling layer, the performance is significantly improved (e.g., 39.76/38.13 vs. 39.56/37.86 for $\times 1.7 / 2$ SR). That is because, our scale-aware upsampling layer can learn dynamic filters conditioned on the scale factors while bicubic upsampling uses a fixed filter.
|
| 160 |
+
|
| 161 |
+
Scale-Aware Feature Adaption. Scale-aware feature adaption is used to adapt features to specific scale factors for better performance. Note that, our scale-aware feature adaption block consists of two key components: scale-aware convolution and guidance map generation. To demonstrate their effectiveness, we first added scale-aware convolutions to variant 2 to produce variant 3. Then, variant 4 is further obtained by adding guidance map generation to variant 3. It can be observed from Table 1 that the performance benefits from both scale-aware convolution and guidance map, with PSNR values being improved from $39.76 / 38.13 / 34.91$ to $39.87 / 38.19 / 35.03$ for $\times 1.7 / 2 / \frac{1.9}{3.5}$ SR. Without feature adaption, model 2 uses
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 6. Visualization of guidance maps and their corresponding feature similarity maps.
|
| 165 |
+
|
| 166 |
+
Table 2. PSNR results achieved by our network with different number of experts on Set5. The running time is averaged over B100 on $\times 4$ SR.
|
| 167 |
+
|
| 168 |
+
<table><tr><td>#Experts</td><td>Params.</td><td>Time</td><td>×1.7</td><td>×2</td><td>×2.55</td><td>×3.8</td><td>×1.3/×3.9</td><td>×2/×3.5</td><td>×3.3/×1.8</td><td>×4/×1.2</td></tr><tr><td>1</td><td>38.4M</td><td>0.09s</td><td>39.37</td><td>37.87</td><td>35.82</td><td>32.13</td><td>33.34</td><td>34.37</td><td>35.50</td><td>33.93</td></tr><tr><td>2</td><td>38.6M</td><td>0.10s</td><td>39.88</td><td>38.20</td><td>36.02</td><td>32.99</td><td>34.23</td><td>34.92</td><td>36.03</td><td>34.87</td></tr><tr><td>4</td><td>39.2M</td><td>0.10s</td><td>39.87</td><td>38.19</td><td>36.02</td><td>33.00</td><td>34.44</td><td>34.96</td><td>36.07</td><td>35.18</td></tr><tr><td>8</td><td>40.4M</td><td>0.11s</td><td>39.88</td><td>38.22</td><td>36.03</td><td>32.98</td><td>34.46</td><td>34.98</td><td>36.07</td><td>35.20</td></tr></table>
|
| 169 |
+
|
| 170 |
+
shared features in the backbone for SR with different scale factors. This variant suffers inferior performance since the difference among features learned for various scale factors is not considered. With our scale-aware feature adaption blocks, our network can adapt features in the backbone according to the scale information. Therefore, better performance can be achieved.
|
| 171 |
+
|
| 172 |
+
We further visualize the guidance maps learned by variant 4 in Fig. 6. It can be observed that the learned maps are consistent with the feature similarity maps (also shown in Fig. 2). Specifically, regions with high values in guidance maps are consistent with those of low feature similarities. This demonstrates that our guidance maps can effectively guide the fusion of $F$ and $F^{adapt}$ (Eq. 2) to perform pixelwise feature adaption accordingly.
|
| 173 |
+
|
| 174 |
+
Number of Experts in Scale-Aware Convolution. Scale-aware convolution dynamically generates scale-aware filters by combining knowledge from experts. To analyze the effect of the number of experts, we compare the performance of our network with different numbers of experts in Table 2. With only one expert, our scale-aware convolutions are degraded to vanilla ones with static filters and cannot well handle different scale factors. Therefore, variant 1 suffers a performance drop from 39.88/38.22/36.03 to 39.37/37.87/35.82 for $\times 1.7 / 2 / 2.55$ SR. As more experts are included in scale-aware convolutions, our network pro
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 8. Visual comparison for SR with non-integer scale factors.
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 7. Visualization of routing weights in the scale-aware convolution of the first scale-aware feature adaption block. (a) and (b) show the routing weights for symmetric and asymmetric scale factors, respectively.
|
| 181 |
+
|
| 182 |
+
duces comparable results on symmetric scale factors while achieving better performance on asymmetric scale factors. This means that SR with asymmetric scale factors benefits a lot from the increase of experts. Further, we can see that the performance improvement on highly asymmetric scale factors are more significant (e.g., 34.46(↑0.23)/34.98(↑0.06) vs. 34.23/34.92 for $\frac{\times 1.3}{\times 3.9} / \frac{\times 2}{\times 3.5}$ SR). Since more experts than 4 cannot introduce notable performance improvements, we use 4 experts as our default setting to achieve a better trade-off between performance and model size.
|
| 183 |
+
|
| 184 |
+
We further visualize the routing weights in our scale-aware convolution to investigate the knowledge of different experts with respect to various scale factors. As shown in Fig. 7(a), expert 2 is dominant for small scale factors while expert 1 is gradually activated for large ones. Compared to symmetric scale factors, more experts are activated for asymmetric ones. For example, experts 1, 3 and 4 are assigned with higher weights for $\frac{\times 4}{\times 1.1}$ than $\frac{\times 1.1}{\times 1.1}$ . This observation is consistent with the results in Table 2 that SR with
|
| 185 |
+
|
| 186 |
+
asymmetric scale factors benefits a lot from more experts.
|
| 187 |
+
|
| 188 |
+
# 4.4. Results for SR with Symmetric Scale Factors
|
| 189 |
+
|
| 190 |
+
In this section, we compare our ArbEDSR, ArbRDN and ArbRCAN to EDSR [16], RDN [10], RCAN [12], Meta-RDN [14] and Meta-RCAN [14] on the SR task with symmetric scale factors (both integer and non-integer scale factors)<sup>1</sup>. Since pre-trained models for Meta-RCAN are unavailable, we used officially released codes for re-training. Note that, we also fine-tuned Meta-RDN and Meta-RCAN on our training set for fair comparison. Comparative results are shown in Table 3 and Fig. 8.
|
| 191 |
+
|
| 192 |
+
Quantitative Results. It can be observed from Table 3 that our ArbEDSR, ArbRDN and ArbRCAN achieve comparable performance to their corresponding baseline networks on integer scale factors. For SR with non-integer scale factors, our networks significantly outperform their baseline networks. For example, our ArbEDSR is on par with EDSR for $\times 2$ SR on Set5 (38.19 vs. 38.19) while producing much better results for $\times 1.6 / 1.55$ SR (40.64/40.94 vs. 40.39/40.71).
|
| 193 |
+
|
| 194 |
+
Compared to Meta-RDN and Meta-RCAN, our ArbRDN and ArbRCAN achieves comparable or better performance for most scale factors. For example, our ArbRCAN produces notable performance improvements for $\times 3.4 / 3.65$ SR on Manga109 (33.12/32.29 vs. 33.00/32.22). Moreover, our ArbRDN and ArbRCAN achieve much better efficiency than Meta-RDN and Meta-RCAN, respectively. Compared to RCAN, Meta-RCAN has a comparable model size with larger memory consumption and longer running time. In
|
| 195 |
+
|
| 196 |
+
Table 3. PSNR results achieved on 5 benchmark datasets for symmetric scale factors. Note that, the memory consumption is calculated on an LR image with a size of $100 \times 100$ . The running time is averaged over B100 on $\times 2/3/4$ SR. “+ft” means that the networks are fine-tuned on our training set.
|
| 197 |
+
|
| 198 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Params.</td><td rowspan="2">Memory*</td><td rowspan="2">Time*</td><td colspan="3">Set5</td><td colspan="3">Set14</td><td colspan="3">B100</td><td colspan="3">Urban100</td><td colspan="3">Manga109</td></tr><tr><td>×2</td><td>×1.6</td><td>×1.55</td><td>×2</td><td>×1.5</td><td>×1.65</td><td>×2</td><td>×1.4</td><td>×1.85</td><td>×2</td><td>×1.9</td><td>×1.95</td><td>×2</td><td>×1.7</td><td>×1.95</td></tr><tr><td>Bicubic</td><td>-</td><td>-</td><td>-</td><td>33.66</td><td>36.10</td><td>36.24</td><td>30.24</td><td>32.87</td><td>31.83</td><td>29.56</td><td>32.95</td><td>30.11</td><td>26.88</td><td>27.25</td><td>27.05</td><td>30.80</td><td>32.91</td><td>31.12</td></tr><tr><td>EDSR-×2 [16](+Bicubic)</td><td>39.7M</td><td>0.9G</td><td>0.05s</td><td>38.19</td><td>40.39</td><td>40.71</td><td>33.95</td><td>37.10</td><td>35.95</td><td>32.36</td><td>36.79</td><td>33.02</td><td>32.95</td><td>33.06</td><td>32.69</td><td>39.18</td><td>40.88</td><td>39.13</td></tr><tr><td>ArbEDSR (Ours)</td><td>39.2M</td><td>1.0G</td><td>0.23s</td><td>38.19</td><td>40.64</td><td>40.94</td><td>34.05</td><td>37.51</td><td>36.22</td><td>32.37</td><td>36.92</td><td>33.23</td><td>33.02</td><td>33.61</td><td>33.30</td><td>39.22</td><td>41.20</td><td>39.24</td></tr><tr><td>RDN-×2 [10](+Bicubic)</td><td>21.6M</td><td>0.4G</td><td>0.08s</td><td>38.24</td><td>40.51</td><td>40.53</td><td>34.01</td><td>37.24</td><td>36.10</td><td>32.34</td><td>36.83</td><td>33.15</td><td>32.89</td><td>33.05</td><td>32.79</td><td>39.18</td><td>41.06</td><td>39.31</td></tr><tr><td>Meta-RDN [14]</td><td>21.4M</td><td>1.1G</td><td>0.38s</td><td>38.23</td><td>40.66</td><td>40.94</td><td>34.03</td><td>37.52</td><td>36.24</td><td>32.35</td><td>36.93</td><td>33.21</td><td>33.03</td><td>33.60</td><td>33.26</td><td>39.31</td><td>41.33</td><td>39.60</td></tr><tr><td>Meta-RDN [14]+ft</td><td>21.4M</td><td>1.1G</td><td>0.38s</td><td>38.21</td><td>40.65</td><td>40.94</td><td>34.05</td><td>37.53</td><td>36.26</td><td>32.34</td><td>36.91</td><td>33.21</td><td>33.01</td><td>33.61</td><td>33.27</td><td>39.32</td><td>41.35</td><td>39.61</td></tr><tr><td>ArbRDN (Ours)</td><td>22.6M</td><td>0.6G</td><td>0.18s</td><td>38.23</td><td>40.67</td><td>40.95</td><td>34.07</td><td>37.53</td><td>36.27</td><td>32.37</td><td>36.93</td><td>33.21</td><td>33.00</td><td>33.51</td><td>33.19</td><td>39.28</td><td>41.32</td><td>39.54</td></tr><tr><td>RCAN-×2 [12](+Bicubic)</td><td>15.2M</td><td>0.3G</td><td>0.27s</td><td>38.27</td><td>40.53</td><td>40.77</td><td>34.12</td><td>37.23</td><td>36.08</td><td>32.40</td><td>36.86</td><td>33.16</td><td>33.18</td><td>33.17</td><td>32.84</td><td>39.42</td><td>41.15</td><td>39.39</td></tr><tr><td>Meta-RCAN [14]</td><td>15.5M</td><td>0.9G</td><td>0.40s</td><td>38.22</td><td>40.66</td><td>40.93</td><td>34.00</td><td>37.51</td><td>36.17</td><td>32.36</td><td>36.95</td><td>33.22</td><td>33.12</td><td>33.62</td><td>33.30</td><td>39.32</td><td>41.30</td><td>39.59</td></tr><tr><td>Meta-RCAN [14]+ft</td><td>15.5M</td><td>0.9G</td><td>0.40s</td><td>38.21</td><td>40.63</td><td>40.93</td><td>34.03</td><td>37.50</td><td>36.20</td><td>32.35</td><td>36.95</td><td>33.22</td><td>33.10</td><td>33.63</td><td>33.32</td><td>39.34</td><td>41.31</td><td>39.61</td></tr><tr><td>ArbRCAN (Ours)</td><td>16.6M</td><td>0.5G</td><td>0.29s</td><td>38.26</td><td>40.69</td><td>40.97</td><td>34.09</td><td>37.53</td><td>36.28</td><td>32.39</td><td>36.93</td><td>33.23</td><td>33.14</td><td>33.55</td><td>33.25</td><td>39.37</td><td>41.32</td><td>39.56</td></tr><tr><td></td><td></td><td></td><td></td><td>×3</td><td>×2.4</td><td>×2.75</td><td>×3</td><td>×2.8</td><td>×2.95</td><td>×3</td><td>×2.2</td><td>×2.15</td><td>×3</td><td>×2.3</td><td>×2.35</td><td>×3</td><td>×2.7</td><td>×2.55</td></tr><tr><td>Bicubic</td><td>-</td><td>-</td><td>-</td><td>30.39</td><td>32.41</td><td>31.06</td><td>27.55</td><td>27.84</td><td>27.46</td><td>27.21</td><td>28.88</td><td>29.12</td><td>24.46</td><td>25.91</td><td>25.72</td><td>26.95</td><td>27.77</td><td>28.27</td></tr><tr><td>EDSR-×3 [16](+Bicubic)</td><td>42.5M</td><td>1.0G</td><td>0.05s</td><td>34.68</td><td>36.45</td><td>35.35</td><td>30.53</td><td>30.90</td><td>30.49</td><td>29.27</td><td>31.38</td><td>31.78</td><td>28.82</td><td>31.13</td><td>30.91</td><td>34.19</td><td>35.18</td><td>35.75</td></tr><tr><td>ArbEDSR (Ours)</td><td>39.2M</td><td>1.3G</td><td>0.13s</td><td>34.73</td><td>36.54</td><td>35.34</td><td>30.61</td><td>31.04</td><td>30.56</td><td>29.30</td><td>31.46</td><td>31.70</td><td>28.90</td><td>31.36</td><td>31.11</td><td>34.28</td><td>35.40</td><td>36.06</td></tr><tr><td>RDN-×3 [10](+Bicubic)</td><td>21.7M</td><td>0.4G</td><td>0.08s</td><td>34.71</td><td>36.46</td><td>35.27</td><td>30.57</td><td>30.88</td><td>30.53</td><td>29.26</td><td>31.30</td><td>31.65</td><td>28.80</td><td>31.25</td><td>31.07</td><td>34.13</td><td>35.41</td><td>36.00</td></tr><tr><td>Meta-RDN [14]</td><td>21.4M</td><td>1.9G</td><td>0.32s</td><td>34.73</td><td>36.55</td><td>35.33</td><td>30.58</td><td>30.97</td><td>30.57</td><td>29.30</td><td>31.41</td><td>31.69</td><td>28.93</td><td>31.33</td><td>31.13</td><td>34.40</td><td>35.58</td><td>36.21</td></tr><tr><td>Meta-RDN [14]+ft</td><td>21.4M</td><td>1.9G</td><td>0.32s</td><td>34.70</td><td>36.55</td><td>35.35</td><td>30.58</td><td>30.97</td><td>30.57</td><td>29.28</td><td>31.42</td><td>31.67</td><td>28.88</td><td>31.33</td><td>31.12</td><td>34.42</td><td>35.59</td><td>36.22</td></tr><tr><td>ArbRDN (Ours)</td><td>22.6M</td><td>0.8G</td><td>0.13s</td><td>30.71</td><td>36.55</td><td>35.35</td><td>30.59</td><td>30.98</td><td>30.58</td><td>29.30</td><td>31.45</td><td>31.69</td><td>28.86</td><td>31.33</td><td>31.14</td><td>34.43</td><td>35.60</td><td>36.20</td></tr><tr><td>RCAN-×3 [12](+Bicubic)</td><td>15.3M</td><td>0.3G</td><td>0.27s</td><td>34.76</td><td>36.51</td><td>35.31</td><td>30.62</td><td>30.90</td><td>30.53</td><td>29.31</td><td>31.31</td><td>31.68</td><td>29.01</td><td>31.34</td><td>31.15</td><td>34.42</td><td>35.50</td><td>36.06</td></tr><tr><td>Meta-RCAN [14]</td><td>15.5M</td><td>1.7G</td><td>0.41s</td><td>34.76</td><td>36.58</td><td>35.36</td><td>30.58</td><td>31.00</td><td>30.56</td><td>29.29</td><td>31.44</td><td>31.70</td><td>28.96</td><td>31.43</td><td>31.20</td><td>34.40</td><td>35.55</td><td>36.21</td></tr><tr><td>Meta-RCAN [14]+ft</td><td>15.5M</td><td>1.7G</td><td>0.41s</td><td>34.72</td><td>36.59</td><td>35.38</td><td>30.58</td><td>30.99</td><td>30.56</td><td>29.28</td><td>31.46</td><td>31.70</td><td>28.93</td><td>31.44</td><td>31.22</td><td>34.44</td><td>35.60</td><td>36.24</td></tr><tr><td>ArbRCAN (Ours)</td><td>16.6M</td><td>0.8G</td><td>0.29s</td><td>34.76</td><td>36.59</td><td>35.39</td><td>30.64</td><td>31.01</td><td>30.59</td><td>29.32</td><td>31.48</td><td>31.72</td><td>28.98</td><td>31.48</td><td>31.26</td><td>34.55</td><td>35.64</td><td>36.27</td></tr><tr><td></td><td></td><td></td><td></td><td>×4</td><td>×3.1</td><td>×3.25</td><td>×4</td><td>×3.2</td><td>×3.95</td><td>×4</td><td>×3.2</td><td>×3.55</td><td>×4</td><td>×3.7</td><td>×3.85</td><td>×4</td><td>×3.4</td><td>×3.65</td></tr><tr><td>Bicubic</td><td>-</td><td>-</td><td>-</td><td>28.42</td><td>29.89</td><td>29.21</td><td>26.00</td><td>26.98</td><td>25.68</td><td>25.96</td><td>26.91</td><td>26.32</td><td>23.14</td><td>23.38</td><td>23.14</td><td>24.89</td><td>25.97</td><td>25.41</td></tr><tr><td>EDSR-×4 [16](+Bicubic)</td><td>42.1M</td><td>1.2G</td><td>0.05s</td><td>32.47</td><td>34.25</td><td>33.35</td><td>28.81</td><td>29.95</td><td>28.63</td><td>27.73</td><td>28.84</td><td>28.25</td><td>26.65</td><td>27.06</td><td>26.69</td><td>31.04</td><td>32.51</td><td>31.79</td></tr><tr><td>ArbEDSR (Ours)</td><td>39.2M</td><td>1.7G</td><td>0.10s</td><td>32.51</td><td>34.48</td><td>33.92</td><td>28.83</td><td>30.07</td><td>28.72</td><td>27.74</td><td>28.91</td><td>28.30</td><td>26.62</td><td>27.12</td><td>26.73</td><td>31.26</td><td>32.90</td><td>32.14</td></tr><tr><td>RDN-×4 [10](+Bicubic)</td><td>21.7M</td><td>0.3G</td><td>0.07s</td><td>32.47</td><td>34.36</td><td>33.91</td><td>28.81</td><td>30.01</td><td>28.69</td><td>27.72</td><td>28.85</td><td>28.25</td><td>26.61</td><td>27.17</td><td>26.83</td><td>31.00</td><td>32.70</td><td>31.99</td></tr><tr><td>Meta-RDN [14]</td><td>21.4M</td><td>2.6G</td><td>0.29s</td><td>32.49</td><td>34.42</td><td>33.93</td><td>28.86</td><td>30.06</td><td>28.75</td><td>27.75</td><td>28.90</td><td>28.31</td><td>26.70</td><td>27.24</td><td>26.91</td><td>31.34</td><td>33.02</td><td>32.24</td></tr><tr><td>Meta-RDN [14]+ft</td><td>21.4M</td><td>2.6G</td><td>0.29s</td><td>32.46</td><td>34.41</td><td>33.91</td><td>28.86</td><td>30.06</td><td>28.74</td><td>27.75</td><td>28.90</td><td>28.30</td><td>26.68</td><td>27.20</td><td>26.87</td><td>31.35</td><td>33.02</td><td>32.24</td></tr><tr><td>ArbRDN (Ours)</td><td>22.6M</td><td>1.2G</td><td>0.13s</td><td>32.42</td><td>34.43</td><td>33.92</td><td>28.82</td><td>30.08</td><td>28.71</td><td>27.73</td><td>28.90</td><td>28.30</td><td>26.61</td><td>27.15</td><td>26.85</td><td>31.35</td><td>32.99</td><td>32.24</td></tr><tr><td>RCAN-×4 [12](+Bicubic)</td><td>15.2M</td><td>0.3G</td><td>0.23s</td><td>32.63</td><td>34.37</td><td>33.92</td><td>28.85</td><td>30.00</td><td>28.72</td><td>27.75</td><td>28.86</td><td>28.27</td><td>26.75</td><td>27.20</td><td>26.89</td><td>31.20</td><td>32.76</td><td>32.04</td></tr><tr><td>Meta-RCAN [14]</td><td>15.5M</td><td>3.1G</td><td>0.39s</td><td>32.56</td><td>34.46</td><td>33.98</td><td>28.85</td><td>30.08</td><td>28.73</td><td>27.75</td><td>28.86</td><td>28.30</td><td>26.71</td><td>27.25</td><td>26.93</td><td>31.33</td><td>33.00</td><td>32.22</td></tr><tr><td>Meta-RCAN [14]+ft</td><td>15.5M</td><td>3.1G</td><td>0.39s</td><td>32.55</td><td>34.44</td><td>33.99</td><td>28.85</td><td>30.08</td><td>28.73</td><td>27.75</td><td>28.88</td><td>28.30</td><td>26.71</td><td>27.24</td><td>26.93</td><td>31.35</td><td>33.02</td><td>32.23</td></tr><tr><td>ArbRCAN (Ours)</td><td>16.6M</td><td>1.1G</td><td>0.29s</td><td>32.55</td><td>34.50</td><td>34.03</td><td>28.87</td><td>30.08</td><td>28.74</td><td>27.76</td><td>28.93</td><td>28.33</td><td>26.68</td><td>27.22</td><td>26.90</td><td>31.36</td><td>33.12</td><td>32.29</td></tr></table>
|
| 199 |
+
|
| 200 |
+
* Officially released codes for Meta-RDN and Meta-RCAN are used to test the memory consumption and running time. Since generating an input matrix for the weight prediction network (Line 224 of trainer.py in the Github repository of Meta-SR) and post-processing (Line 235 of trainer.py) are also necessary for a single inference of Meta-SR, these operations are included for a fair comparison of running time.
|
| 201 |
+
|
| 202 |
+
contrast, our ArbRCAN takes shorter running time (0.29s vs. 0.39s) and much less memory consumption (1.1G vs. 3.1G). This clearly demonstrates the high efficiency of our plug-in module.
|
| 203 |
+
|
| 204 |
+
Qualitative Results. Figure 8 compares the visual results achieved on two images of the Manga109 and Urban100 datasets. From the zoom-in regions, we can see that our ArbRCAN produces results with better perceptual quality and fewer artifacts. For the second test image, Meta-RDN and Meta-RCAN cannot faithfully recover the stripes and suffer distorted artifacts. In contrast, our ArbRCAN produces clearer and finer details.
|
| 205 |
+
|
| 206 |
+
# 4.5. Results for SR with Asymmetric Scale Factors
|
| 207 |
+
|
| 208 |
+
In this section, we test our ArbEDSR, ArbRDN and ArbRCAN on the SR task with asymmetric scale factors<sup>2</sup>.
|
| 209 |
+
|
| 210 |
+
Comparative results are presented in Table 4, while visual comparison is provided in Fig. 9.
|
| 211 |
+
|
| 212 |
+
Quantitative Results. It can be observed from Table 4 that baseline networks (e.g., RCAN) have limited performance on asymmetric scale factors since their filters are fixed. Meta-RCAN uses meta-learning to generate filters for different scale factors to produce better results, with PSNR values being improved from 37.48/33.31/33.82 to 37.74/33.61/34.23 on Manga109. Moreover, fine-tuning Meta-RCAN on our training set further introduces marginal improvements (37.80/33.67/34.28 vs. 37.74/33.61/34.23). However, the performance is still inferior to our ArbRCAN even after fine-tuning. Using scale-aware convolutions to dynamically customize filters conditioned on the scale information, our ArbRCAN can adapt to the input scale factor to achieve better performance (37.93/33.81/34.41 vs. 37.80/33.67/34.28).
|
| 213 |
+
|
| 214 |
+
Table 4. PSNR results achieved for asymmetric scale factors. Note that, the memory consumption is calculated on an LR image with a size of $100 \times 100$ for $\frac{\times 2}{\times 4}$ SR. The running time is averaged over B100 on $\frac{\times 2}{\times 4}$ SR.
|
| 215 |
+
|
| 216 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Params.</td><td rowspan="2">Memory</td><td rowspan="2">Time</td><td colspan="3">Set5</td><td colspan="3">Set14</td><td colspan="3">B100</td><td colspan="3">Urban100</td><td colspan="3">Manga109</td></tr><tr><td>×1.5 ×4</td><td>×1.5 ×3.5</td><td>×1.6 ×3.05</td><td>×4 ×2</td><td>×3.5 ×2</td><td>×3.5 ×1.75</td><td>×4 ×1.4</td><td>×1.5 ×3</td><td>×3.5 ×1.45</td><td>×1.6 ×3</td><td>×1.6 ×3.8</td><td>×3.5 ×1.55</td><td>×2 ×2</td><td>×2.8 ×3.5 ×3.7</td><td>×3.8 ×3.5 ×2.7</td></tr><tr><td>Bicubic</td><td>-</td><td>-</td><td>-</td><td>30.01</td><td>30.83</td><td>31.40</td><td>27.25</td><td>27.88</td><td>27.27</td><td>27.45</td><td>28.86</td><td>27.94</td><td>25.93</td><td>24.92</td><td>25.19</td><td>29.61</td><td>26.47</td><td>26.86</td></tr><tr><td>EDSR [16]+Bicubic</td><td>42.1M</td><td>0.7G</td><td>0.04s</td><td>33.95</td><td>34.89</td><td>35.59</td><td>30.29</td><td>30.91</td><td>31.36</td><td>29.33</td><td>31.24</td><td>29.96</td><td>30.61</td><td>28.77</td><td>29.23</td><td>37.08</td><td>32.99</td><td>33.46</td></tr><tr><td>ArbEDSR (Ours)</td><td>39.2M</td><td>0.9G</td><td>0.14s</td><td>34.32</td><td>35.33</td><td>36.02</td><td>30.51</td><td>31.15</td><td>31.46</td><td>29.52</td><td>31.38</td><td>30.20</td><td>31.06</td><td>29.32</td><td>29.98</td><td>37.70</td><td>33.54</td><td>34.16</td></tr><tr><td>RDN [10]+Bicubic</td><td>21.7M</td><td>0.4G</td><td>0.08s</td><td>34.12</td><td>35.04</td><td>35.63</td><td>30.32</td><td>31.02</td><td>31.16</td><td>29.34</td><td>31.29</td><td>29.98</td><td>30.68</td><td>28.75</td><td>29.30</td><td>37.43</td><td>33.27</td><td>33.77</td></tr><tr><td>Meta-RDN [14]+Bicubic</td><td>21.4M</td><td>3.1G</td><td>0.49s</td><td>34.19</td><td>35.17</td><td>35.79</td><td>30.39</td><td>31.06</td><td>31.36</td><td>29.43</td><td>31.28</td><td>30.09</td><td>30.77</td><td>29.04</td><td>29.63</td><td>37.74</td><td>33.61</td><td>34.22</td></tr><tr><td>Meta-RDN [14]+Bicubic+ft</td><td>21.4M</td><td>3.1G</td><td>0.49s</td><td>34.22</td><td>35.19</td><td>35.80</td><td>30.42</td><td>31.06</td><td>31.35</td><td>29.47</td><td>31.30</td><td>30.12</td><td>30.85</td><td>29.11</td><td>29.70</td><td>37.80</td><td>33.64</td><td>34.26</td></tr><tr><td>ArbRDN (Ours)</td><td>22.6M</td><td>0.7G</td><td>0.13s</td><td>34.31</td><td>35.26</td><td>35.98</td><td>30.47</td><td>31.12</td><td>31.42</td><td>29.52</td><td>31.36</td><td>31.19</td><td>31.02</td><td>29.23</td><td>29.91</td><td>37.88</td><td>33.74</td><td>34.36</td></tr><tr><td>RCAN [12]+Bicubic</td><td>15.2M</td><td>0.4G</td><td>0.27s</td><td>34.14</td><td>35.05</td><td>35.67</td><td>30.35</td><td>31.02</td><td>31.21</td><td>29.35</td><td>31.30</td><td>29.98</td><td>30.72</td><td>28.81</td><td>29.34</td><td>37.48</td><td>33.31</td><td>33.82</td></tr><tr><td>Meta-RCAN [14]+Bicubic</td><td>15.5M</td><td>2.8G</td><td>0.61s</td><td>34.20</td><td>35.17</td><td>35.81</td><td>30.40</td><td>31.05</td><td>31.33</td><td>29.43</td><td>31.26</td><td>30.09</td><td>30.73</td><td>29.03</td><td>29.67</td><td>37.74</td><td>33.61</td><td>34.23</td></tr><tr><td>Meta-RCAN [14]+Bicubic+ft</td><td>15.5M</td><td>2.8G</td><td>0.61s</td><td>34.26</td><td>35.24</td><td>35.86</td><td>30.46</td><td>31.10</td><td>31.40</td><td>29.47</td><td>31.30</td><td>30.14</td><td>30.86</td><td>29.14</td><td>29.75</td><td>37.80</td><td>33.67</td><td>34.28</td></tr><tr><td>ArbRCAN (Ours)</td><td>16.6M</td><td>0.7G</td><td>0.29s</td><td>34.37</td><td>35.40</td><td>36.05</td><td>30.55</td><td>31.27</td><td>31.54</td><td>29.54</td><td>31.40</td><td>30.22</td><td>31.13</td><td>29.36</td><td>30.04</td><td>37.93</td><td>33.81</td><td>34.41</td></tr></table>
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
|
| 220 |
+

|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
|
| 228 |
+

|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
LR Image
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Bicubic
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
Meta-RDN+Bicubc
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
ArbRDN
|
| 243 |
+
Meta-RCAN+Bicubic
|
| 244 |
+
|
| 245 |
+

|
| 246 |
+
|
| 247 |
+

|
| 248 |
+
ArbRCAN
|
| 249 |
+
|
| 250 |
+

|
| 251 |
+
GT
|
| 252 |
+
|
| 253 |
+
In addition to higher PSNR results, our ArbRCAN also has much smaller memory cost (0.7G vs. 2.8G) and shorter running time (0.29s vs. 0.61s) as compared to Meta-RCAN. Since Meta-RCAN needs to super-resolve an LR image to a size larger than the expected one before bicubic downscaling to perform asymmetric SR, redundant computational and memory cost is involved. In contrast, our ArbRCAN can directly super-resolve the LR image to the expected size with better efficiency.
|
| 254 |
+
|
| 255 |
+
Qualitative Results. Figure 9 illustrates the visual results achieved on two images of the Urban100 dataset. It can be observed from the zoom-in regions that our ArbRCAN produces better results for different asymmetric scale factors. Specifically, we can see from the second row that, our ArbRDN and ArbRCAN faithfully recover the stripes while other methods suffer blurring artifacts. This further demonstrates the superior performance of our networks on asymmetric scale factors.
|
| 256 |
+
|
| 257 |
+
# 4.6. Results for SR in the Wild
|
| 258 |
+
|
| 259 |
+
In many real-world applications, continuous magnification of an image to an arbitrary size is favored by customers such that they can stretch an image to any resolution they like. However, all existing SR network including RDN, RCAN and Meta-RCAN rely on post-processing (i.e., bicubic interpolation) to achieve scale-arbitrary SR, which is difficult to obtain optimal performance. In contrast, our network provides an end-to-end framework to produce better results. In this section, ArbRCAN is used to super-resolve a real-world image (an HR image in B200 [29]) to differ
|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
Figure 9. Visual comparison for SR with asymmetric scale factors on Urban100.
|
| 263 |
+
Figure 10. Visual comparison on a real-world image.
|
| 264 |
+
|
| 265 |
+
ent resolutions for visual comparison, as shown in Fig. 10. When the input image is continuously magnified, the text becomes easier for recognition and our ArbRCAN consistently produces better perceptual quality than other methods.
|
| 266 |
+
|
| 267 |
+
# 5. Conclusions
|
| 268 |
+
|
| 269 |
+
In this paper, we proposed a plug-in module to enable existing image SR networks for scale-arbitrary SR with a single model. Experimental results show that baseline networks equipped with our module can produce promising results on SR tasks with non-integer and asymmetric scale factors, while maintaining state-of-the-art performance on integer scale factors. Moreover, our module can be easily adapted to scale-specific networks with small additional computational and memory cost.
|
| 270 |
+
|
| 271 |
+
# References
|
| 272 |
+
|
| 273 |
+
[1] Jian Sun, Zongben Xu, and Heung-Yeung Shum. Image super-resolution using gradient profile prior. In CVPR, 2008. 1, 2
|
| 274 |
+
[2] Kaibing Zhang, Xinbo Gao, Dacheng Tao, and Xuelong Li. Single image super-resolution with non-local means and steering kernel regression. IEEE Trans. Image Process., 21(11):4544-4556, nov 2012. 1, 2
|
| 275 |
+
[3] Chih-Yuan Yang and Ming-Hsuan Yang. Fast direct superresolution by simple functions. In ICCV, pages 561-568, 2013. 1, 2
|
| 276 |
+
[4] Radu Timofte, Vincent De Smet, and Luc J. Van Gool. Anchored neighborhood regression for fast example-based super-resolution. In ICCV, pages 1920-1927, 2013. 1, 2
|
| 277 |
+
[5] Shuhang Gu, Wangmeng Zuo, Qi Xie, Deyu Meng, Xi-angchu Feng, and Lei Zhang. Convolutional sparse coding for image super-resolution. In ICCV, pages 1823–1831, 2015. 1, 2
|
| 278 |
+
[6] Muhammad Haris, Gregory Shakhnarovich, and Norimichi Ukita. Deep back-projection networks for super-resolution. In CVPR, pages 1664-1673, 2018. 1, 2
|
| 279 |
+
[7] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Learning a deep convolutional network for image super-resolution. In ECCV, pages 184-199, 2014. 1, 2
|
| 280 |
+
[8] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, pages 1646-1654, 2016. 1, 2
|
| 281 |
+
[9] Jose Caballero, Christian Ledig, Andrew P. Aitken, Alejandro Acosta, Johannes Totz, Zehan Wang, and Wenzhe Shi. Real-time video super-resolution with spatio-temporal networks and motion compensation. In CVPR, pages 2848-2857, 2017. 1, 2
|
| 282 |
+
[10] Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image super-resolution. In CVPR, pages 2472-2481, 2018. 1, 2, 4, 5, 6, 7, 8
|
| 283 |
+
[11] Yajun Qiu, Ruxin Wang, Dapeng Tao, and Jun Cheng. Embedded block residual network: A recursive restoration model for single-image super-resolution. In ICCV, 2019. 1
|
| 284 |
+
[12] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, pages 1646-1654, 2018. 1, 2, 4, 6, 7, 8
|
| 285 |
+
[13] Tao Dai, Jianrui Cai, Yongbing Zhang, Shu-Tao Xia, and Lei Zhang. Second-order attention network for single image super-resolution. In CVPR, 2019. 1, 2
|
| 286 |
+
[14] Xuecai Hu, Haoyuan Mu, Xiangyu Zhang, Zilei Wang, Jian Sun, and Tieniu Tan. Meta-SR: A magnification-arbitrary network for super-resolution. In CVPR, 2019. 1, 2, 4, 5, 6, 7, 8
|
| 287 |
+
[15] Jianchao Yang, Zhaowen Wang, Zhe Lin, S. Cohen, and T. Huang. Coupled dictionary training for image superresolution. IEEE Trans. Image Process., 21(8):3467-3478, aug 2012. 2
|
| 288 |
+
|
| 289 |
+
[16] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPR, 2017. 2, 4, 6, 7, 8
|
| 290 |
+
[17] Ying Fu, Jian Chen, Tao Zhang, and Yonggang Lin. Residual scale attention network for arbitrary scale image superresolution. Neurocomputing, 427:201-211, 2021. 2
|
| 291 |
+
[18] Yinpeng Chen, Xiyang Dai, Mengchen Liu, Dongdong Chen, Lu Yuan, and Zicheng Liu. Dynamic convolution: Attention over convolution kernels. arXiv, 2019. 2
|
| 292 |
+
[19] Brandon Yang, Gabriel Bender, Quoc V. Le, and Jiquan Ngiam. Condconv: Conditionally parameterized convolutions for efficient inference. In NeurIPS, pages 1305-1316, 2019. 2
|
| 293 |
+
[20] Yikang Zhang, Jian Zhang, Qiang Wang, and Zhao Zhong. Dynet: Dynamic convolution for accelerating convolutional neural networks. arXiv, 2020. 2
|
| 294 |
+
[21] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In ECCV, 2020. 2
|
| 295 |
+
[22] Chao Dong, Chen Change Loy, and Xiaou Tang. Accelerating the super-resolution convolutional neural network. In ECCV, pages 391-407, 2016. 2
|
| 296 |
+
[23] Namhyuk Ahn, Byungkon Kang, and Kyung-Ah Sohn. Fast, accurate, and lightweight super-resolution with cascading residual network. In ECCV, pages 252-268, 2018. 2
|
| 297 |
+
[24] Minghao Yin, Zhuliang Yao, Yue Cao, Xiu Li, Zheng Zhang, Stephen Lin, and Han Hu. Disentangled non-local neural networks. In ECCV, 2020. 3
|
| 298 |
+
[25] Wenzhe Shi, Jose Caballero, Ferenc Huszar, Johannes Totz, Andrew P. Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In CVPR, pages 1874-1883, 2016. 4
|
| 299 |
+
[26] Eirikur Agustsson and Radu Timofte. NTIRE 2017 challenge on single image super-resolution: Dataset and study. In CVPRW, pages 1122-1131, 2017. 4
|
| 300 |
+
[27] Marco Bevilacqua, Aline Roumy, Christine Guillemot, and Marie-Line Alberi-Morel. Low-complexity single-image super-resolution based on nonnegative neighbor embedding. In BMVC, pages 1-10, 2012. 4
|
| 301 |
+
[28] Roman Zeyde, Michael Elad, and Matan Protter. On single image scale-up using sparse-representations. In International Conference on Curves and Surfaces, volume 6920, pages 711-730, 2010. 4
|
| 302 |
+
[29] David Martin, Charless Fowlkes, Doron Tal, Jitendra Malik, et al. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, 2001. 4, 8
|
| 303 |
+
[30] Jia-Bin Huang, Abhishek Singh, and Narendra Ahuja. Single image super-resolution from transformed self-exemplars. In CVPR, pages 5197-5206, 2015. 4
|
| 304 |
+
[31] Yusuke Matsui, Kota Ito, Yuji Aramaki, Azuma Fujimoto, Toru Ogawa, Toshihiko Yamasaki, and Kiyoharu Aizawa. Sketch-based manga retrieval using manga109 dataset. Multimedia Tools Appl., 76(20):21811-21838, 2017. 4
|
| 305 |
+
|
| 306 |
+
[32] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, and et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019. 4
|
| 307 |
+
[33] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5
|
learningasinglenetworkforscalearbitrarysuperresolution/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c6014d740aa97d9ba97b19441376b041e367055bec35da944e02611390d27ec
|
| 3 |
+
size 1155094
|
learningasinglenetworkforscalearbitrarysuperresolution/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e42615cac0d195b8a17cc386bf8ad82cba60837cc4f9d8062a9c39059c9646b0
|
| 3 |
+
size 403692
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d05813dab93ba9569b0394744d60f6170b794c6089437b52cfd5323369b17bb
|
| 3 |
+
size 79519
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a97f899619d9b59167dbfac6dc02c3f04a0258e5f62d5f74e62b9c06fb27090
|
| 3 |
+
size 97255
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/5c03f6cb-2c1c-4c65-bcbb-d33492a7b86b_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8101239e3f587f6f370a5b01a6f248b2f907ad311a3bdf1995a07c348dea8e8b
|
| 3 |
+
size 7659176
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/full.md
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning a Sketch Tensor Space for Image Inpainting of Man-made Scenes
|
| 2 |
+
|
| 3 |
+
Chenjie Cao, Yanwei Fu
|
| 4 |
+
School of Data Science, Fudan University
|
| 5 |
+
{20110980001, yanweifu}@fudan.edu.cn
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
(a) Inputs
|
| 9 |
+
|
| 10 |
+

|
| 11 |
+
(b) Exemplar-based
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
(c) GateConv
|
| 15 |
+
Figure 1: Results of (b) Exemplar-based inpainting [2], (c) GateConv [43], (d) EdgeConnect [28], and (e) our method, with the inpainted areas highlighted by red dot box. Our method makes better inpainting without artifacts.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
(d) EdgeConnect
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
(e) Ours
|
| 22 |
+
|
| 23 |
+
# Abstract
|
| 24 |
+
|
| 25 |
+
This paper studies the task of inpainting man-made scenes. It is very challenging due to the difficulty in preserving the visual patterns of images, such as edges, lines, and junctions. Especially, most previous works are failed to restore the object/building structures for images of man-made scenes. To this end, this paper proposes learning a Sketch Tensor (ST) space for inpainting man-made scenes. Such a space is learned to restore the edges, lines, and junctions in images, and thus makes reliable predictions of the holistic image structures. To facilitate the structure refinement, we propose a Multi-scale Sketch Tensor inpainting (MST) network, with a novel encoder-decoder structure. The encoder extracts lines and edges from the input images to project them into an ST space. From this space, the decoder is learned to restore the input images. Extensive experiments validate the efficacy of our model. Furthermore, our model can also achieve competitive performance in inpainting general nature images over the competitors.
|
| 26 |
+
|
| 27 |
+
# 1. Introduction
|
| 28 |
+
|
| 29 |
+
As a long-standing problem, image inpainting has been studied to address the problem of filling in the missing parts of the images being semantically consistent and visually re
|
| 30 |
+
|
| 31 |
+
alistic with plausible results. Thus, image inpainting is useful to many real-world applications, e.g. image restoration, image editing, and object removal [6].
|
| 32 |
+
|
| 33 |
+
Intrinsically as an inverse problem, the inpainting is challenging in both restoring the missed global structure (semantically consistent), and generating realistic regions locally coherent to unmasked regions (visually consistent). Especially, it is hard to reconstruct the missed image regions from the complex man-made scenes and structures, due to the difficulty in preserving the prominent low-level visual patterns, such as edges, line segments, and junctions, as shown in Fig. 1. To this end, this paper particularly focuses on learning to reconstruct these visual patterns for image inpainting, and proposes a method of the best merits in repairing the masked regions of man-made scene images, such as images with indoor and outdoor buildings.
|
| 34 |
+
|
| 35 |
+
Both traditional approaches [2, 8, 19] and deep learning methods [24, 44, 40, 17, 43, 21] had made great efforts on reconstructing the structures of images in producing visually realistic results. However, these methods are still challenged by producing structurally coherent results, especially in the inpainting of man-made scenes. Typically, inpainting approaches may suffer from the following problems. (1) Missing critical structures. Traditional synthesis-based approaches are normally unable to model
|
| 36 |
+
|
| 37 |
+
the critical structures as in Fig. 1(b). On the other hand, recent learning-based inpainting methods utilize auxiliary information to support the inpainting, e.g., edges [28, 20], and segmentation [32, 22], predominantly inpainting local visual cues, rather than holistic structures of man-made scenes. For example, the results of EdgeConnect [28] with canny edges [5] in Fig. 1(d) suffer from broken and blurry line segments and lose connectivity of building structures. (2) Unreliable pattern transfer: The learning-based auxiliary detectors will transfer and magnify the unreliable image priors or patterns to the masked image regions, which causes degraded inpainting results [22]. (3) Trading off performance and efficiency. The auxiliary-based inpainting methods usually consume more computation, due to additional components or training stages [28, 20, 39]. But these methods still have artifacts in junction regions as framed with red dotted lines in Fig. 1(c)(d). Therefore, the design of a more effective network is expected to efficiently enhance the inpainting performance.
|
| 38 |
+
|
| 39 |
+
To address these issues, our key idea is to learn a Sketch Tensor (ST) space by an encoder-decoder model. (1) The encoder learns to infer both local and holistic critical structures of input images, including canny edges and compositional lines. The image is encoded as the binarized 'sketch' style feature maps, dubbed as sketch tensor. The decoder takes the restored structure to fill in holes of images. (2) For the first time, the idea of parsing wireframes [14] is repurposed to facilitate inpainting by strengthening the holistic structures of man-made scenes with more effective and flexible holistic structures. We propose a Line Segment Masking (LSM) algorithm to effectively train the wireframe parser, which alleviates unreliable structure guidance from corrupted images and the heavy computation of auxiliary detectors during the training phase. Besides, LSM also leverage the separability of line segments to extend the proposed model to obtain better object removal results. (3) Most importantly, we significantly boost the training and inference process of previous inpainting architectures. Thus, a series of efficient modules are proposed, which include partially gated convolutions, efficient attention module, and Pyramid Decomposing Separable (PDS) blocks. Critically, we present PDS blocks to help better learn binary line and edge maps. Our proposed modules make a good balance of model performance and training efficiency.
|
| 40 |
+
|
| 41 |
+
Formally, this paper proposes a novel Multi-scale Sketch Tensor inpainting (MST) network with an encoder-decoder structure. The encoder employs LSM algorithm to train an hourglass wireframe parser [38] and a canny detector to extract line and edge maps. These maps concatenated with input images are projected into ST space by Pyramid Structure Sub-encoder (PSS), which is sequentially constructed by 3 partially gated convolution layers, 8 dilated residual block layers with an efficient attention module, and 3 pyra
|
| 42 |
+
|
| 43 |
+
mid decomposing block layers as in Fig. 2. The image is encoded as a third-order sketch tensor in ST space, representing local and holistic structures. Finally, the decoder is stacked by two groups of 3 partially gated convolution layers for both ends with 8 residual block layers, which will re-project the sketch tensor into the restored image.
|
| 44 |
+
|
| 45 |
+
We highlight several contributions here. (1) We propose learning a novel sketch tensor space for inpainting tasks. Such a space is learned to restore the critical missed structures and visual patterns, and makes reliable predictions of the holistic image structures. Essentially, the sketch tensor has good interpretability of input images, as empirically shown in experiments. (2) For the first time, the wireframe parsing has been re-purposed to extract lines and junctions for inpainting. A novel line segment masking algorithm is proposed to facilitate training our inpainting wireframe parser. (3) We introduce the novel partially gated convolution and efficient attention module to significantly improve model performance without incurring additional expensive computational cost than competitors, such as EdgeConnect. (4) A novel pyramid decomposing separable block is proposed to address the issue of effectively learning sparse binary edge and line maps. (5) Extensive experiments on the dataset of both man-made and natural scenes, including ShanghaiTech [14], Places2 [48], and York Urban [4]. show the efficacy of our MST-net, over the competitors.
|
| 46 |
+
|
| 47 |
+
# 2. Related work
|
| 48 |
+
|
| 49 |
+
Image Inpainting by Auxiliaries. The auxiliary information of semantics and structures have been utilized to help inpainting tasks in traditional methods, such as lines, structures [13, 1], and approximation images [10]. Recently, deep learning based approaches take auxiliary information as the important prior, such as canny edges [28, 20], smoothed edges [29, 12], edge and gradient information [39], and semantic segmentation [32, 22]. Auxiliary information has been also utilized in image editing [47, 30, 15, 18]. Particularly, EdgeConnect [28] and GateConv [43] both leverage edges to inpaint masked areas with specific structural results. However, there is no holistic structure information for man-made scenes that has been explicitly modeled and utilized as auxiliary information in previous work. Such information is crucial to inpaint the images of complex structures, such as buildings, or indoor furniture. To this end, our method utilizes the separability and connectivity of line segments to help improve the performance of inpainting.
|
| 50 |
+
|
| 51 |
+
Line Detection Approaches. Line detection enjoys immense value in many real-world problems. Therefore, it has been widely researched and developed in computer vision. Many classic graphics algorithms are proposed to extract line segments from raw images [9, 34, 26]. However, these traditional methods suffer from intermittent and spu
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 2: The overview of MST, which is consisted of encoder, sketch tensor space, and decoder.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 3: The illustration of (a): Pyramid Decomposing Separable (PDS) block, (b): Efficient Attention block.
|
| 58 |
+
|
| 59 |
+
vious line segments. Moreover, the extracted lines lack positions of junctions which causes poor connectivity. Huang et al. [14] propose a deep learning based wireframe parsing to improve the line detection task, which uses DNNs to predict heatmaps of junctions and line segments as the wireframe representation. LCNN proposed in [49] leverages heuristic sampling strategies and a line verification network to improve the performance of wireframe parsing. Furthermore, Xue et al. [38] utilize the holistic attraction field to enhance both efficiency and accuracy for the wireframe parser. Although wireframe parsing based models enjoy distinctive strengths, to the best of our knowledge, no previous work has considered utilizing wireframe parser to help preserve line structures for downstream inpainting task. Critically, for the first time, our method first repurposes the wireframe parser to facilitate image inpainting, which leverages connectivity and structural information of wireframes to achieve better inpainting performance.
|
| 60 |
+
|
| 61 |
+
# 3. Multi-scale Sketch Tensor Inpainting
|
| 62 |
+
|
| 63 |
+
Overview. The MST network is shown in Fig. 2. Given the input masked image $\mathbf{I}_m\in \mathbb{R}^{h\times w\times 3}$ and corresponding binary mask M, MST has three key components, i.e., encoder $\Phi :[\mathbf{I}_m,\mathbf{M}]\to S$ , decoder $\Psi :S\rightarrow \tilde{\mathbf{I}}_m$ , and Sketch Tensor (ST) space of a third-order tensor denoted by
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 4: LSM Illustration. In training, lines segments are denoted by Eq. (1). Black solid lines, blue and green dotted lines indicate the retained, masked, and masked by probably $m$ lines. Only in inpainting training process or object removal task, the ground-truth images are known in advance.
|
| 67 |
+
|
| 68 |
+
$S \in \mathbb{R}^{h \times w \times 3}$ . Particularly, the encoder firstly employs the improved wireframe parser LSM-HAWP and canny detector [5] to extract line $\mathbf{I}_l$ and edge maps $\mathbf{I}_e$ ; then the concatenated image and maps $[\mathbf{I}_l; \mathbf{I}_e; \mathbf{I}_m; \mathbf{M}]$ is processed by Pyramid Structure Sub-Encoder (PSS) to produce the ST space $S$ . The decoder predicts inpainted image $\tilde{\mathbf{I}}_m$ , closer to ground-truth image $\mathbf{I}$ .
|
| 69 |
+
|
| 70 |
+
In this section, Sec. 3.1 will introduce the LSM algorithm. Details about the PSS and ST space are specified in Sec. 3.2. Finally, the decoder will be discussed in Sec. 3.4.
|
| 71 |
+
|
| 72 |
+
# 3.1. Line Segment Masking Algorithm
|
| 73 |
+
|
| 74 |
+
The wireframe parser HAWP [38] is adopted to extract lines from images. Specifically, it extracts the junction set $\mathbf{J} = \{\mathbf{p} = (x,y) \in \mathbb{R}^2\}$ , and line set $\mathbf{L} = \{\mathbf{l} = (\mathbf{p}_a, \mathbf{p}_b) = (x_a, y_a, x_b, y_b)\}$ paired by junctions in $\mathbf{J}$ . Unfortunately, if lines are corrupted by the mask $\mathbf{M}$ , the results of naive HAWP [38] will be largely degraded as shown in the inference stage of Fig. 4 with broken structures.
|
| 75 |
+
|
| 76 |
+
To this end, we propose an LSM algorithm to infer missed line segments with the flexible wireframe parsing, which is composed of two parts. 1) Learning an LSM-HAWP network by retraining HAWP with the irregular [43] and object segmentation [45] masks. This not only improves the stability for the corrupted images, but also achieves superior results in trivial wireframe parsing tasks
|
| 77 |
+
|
| 78 |
+
(Sec. 4.2). 2) Introducing an indicator function to denote the masking probability of each line segment $l$ according to the mask $M$ as the post-processing for LSM-HAWP,
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathbb {I} (\mathbf {l}) = \left\{ \begin{array}{l l} 1 & \text {i f} \mathbf {p} _ {a} \in \mathbf {M} \text {a n d} \mathbf {p} _ {b} \in \mathbf {M} \\ 0 & \text {i f} \mathbf {p} _ {a} \notin \mathbf {M} \text {a n d} \mathbf {p} _ {b} \notin \mathbf {M}, \\ m & \text {o t h e r w i s e} \end{array} \right. \tag {1}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $m$ ( $0 \leq m \leq 1$ ) is a hyper-parameter between 0 and 1, and junction $\mathbf{p} \in M, \mathbf{p} \notin M$ means that $\mathbf{p}$ is masked or not. Fig. 4 illustrates the LSM post-process in training and inference stages. In training, we set $m = 0.5$ to train the first half epochs, and $m = 1$ for training in the rest epochs. In the object removal task, we use the unmasked image with $m = 0$ to retain necessary structures.
|
| 85 |
+
|
| 86 |
+
Thus as one practical strategy of speedup the learning process, we extract all wireframes beforehand and filtering them by the post-process of LSM, rather than an end-to-end training with LSM-HAWP, which dramatically improves the training efficiency. Note that in the testing stage for inpainting, corrupted images are used as the input to make our results fair comparable to the competitors.
|
| 87 |
+
|
| 88 |
+
# 3.2. Pyramid Structure Sub-Encoder
|
| 89 |
+
|
| 90 |
+
The LSM-HAWP and canny detector extract the line and edge maps $\mathbf{I}_l, \mathbf{I}_e \in \mathbb{R}^{h \times w \times 1}$ respectively. Essentially, $\mathbf{I}_e$ is binary map, and $\mathbf{I}_l$ is got from connecting junction pairs from LSM-HAWP with anti-aliased lines. The input to PSS is the concatenation of the masked image and structure maps $[\mathbf{I}_l; \mathbf{I}_e; \mathbf{I}_m]$ . As shown in Fig. 2, the PSS is composed of partially gated convolutions, dilated [41] residual blocks, efficient attention, and pyramid decomposing separable blocks, which will be explained next. For the detailed structures, please refer to our supplementary.
|
| 91 |
+
|
| 92 |
+
Partially Gated Convolutions. We adopt the Gated Convolution (GC) layers to process the masked input features, as it works well for the irregular mask inpainting tasks in [43]. Unfortunately, GC demands much more trainable parameters than vanilla convolutions. To this end, as shown in Fig. 2 and Fig. 3(a), we propose a partially GC strategy of only utilizing three GC layers for the input and output features in both encoder and decoder models. Essentially, this is motivated by our finding that the outputs of GC mostly devoting to filtering features of masked and unmasked regions only in the encoder layers of the coarse network and the decoder layers of the refinement network in [43]. In contrast, we do not observe significantly performance improvement of using GC in the middle layers of backbones. Thus, we maintain vanilla convolutions (i.e., residual blocks) in the middle layers, to save parameters and improve the performance as empirically validated in Tab. 4.
|
| 93 |
+
|
| 94 |
+
Efficient Attention Block. Intuitively, attention is important to learn patterns crossing spatial locations in image inpainting [42, 25, 21, 39]. However, attention modules are
|
| 95 |
+
|
| 96 |
+
expensive to be computed, and non-trivial to be parallelized in image inpainting [42]. To this end, we leverage Efficient Attention (EA) module among middle blocks of Fig. 2 and detailed in Fig. 3(b). Particularly, for the input feature $\mathbf{X} \in \mathbb{R}^{h \times w \times d}$ , and mask $\mathbf{M} \in \mathbb{R}^{h \times w \times 1}$ , we first reshape them to $\mathbb{R}^{hw \times d}$ and $\mathbb{R}^{hw \times 1}$ as the vector data respectively. Then, the process of efficient attention can be written as
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathbf {Q} = \operatorname {s o f t m a x} _ {r o w} \left(\mathbf {W} _ {q} \mathbf {X} + (\mathbf {M} \cdot - \infty)\right)
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathbf {K} = \operatorname {s o f t m a x} _ {c o l} \left(\mathbf {W} _ {k} \mathbf {X} + (\mathbf {M} \cdot - \infty)\right) \tag {2}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\mathbf {V} = \mathbf {W} _ {v} \mathbf {X}, \quad \mathbf {E} = \mathbf {Q} (\mathbf {K} ^ {T} \mathbf {V}),
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where $\mathbf{W}_{q,k,v}$ indicates different learned parameter matrices; $+(M - \infty)$ means masking the corrupted inputs before the softmax operation. Critically, $\mathrm{softmax}_{row}$ and $\mathrm{softmax}_{col}$ means the softmax operations on the row and column individually. Then, we achieve the output $\mathbf{E} \in \mathbb{R}^{hw\times d}$ , which will be reshaped back to $\mathbb{R}^{h\times w\times d}$ . Note that Eq. (2) is an approximation to vanilla attention operation as in [31]. Typically, this strategy should in principle, reduce significantly computational cost. Since $\mathbf{E}$ is computed by $\mathbf{K}^T\mathbf{V} \in \mathbb{R}^{d\times d}$ , rather than standard $\mathbf{Q}\mathbf{K}^T \in \mathbb{R}^{hw\times hw}$ . In practice, the dimension $d$ is much smaller than $hw$ in computer vision tasks. Furthermore, as in Fig. 3(b), we introduce the multi-head attention [33] to further reduce the dimension from $d$ to $d' = d / n_{head}$ . Thus, $\mathbf{K}^T\mathbf{V}$ could aggregate the query $\mathbf{Q}$ in feature level and obtain the global context $\mathbf{E}$ . Note that EA module is inspired but different from [31], as the attention scores of corrupted regions are masked to aggregate features from uncorrupted regions.
|
| 111 |
+
|
| 112 |
+
Pyramid Decomposing Separable (PDS) Block. We have found that GAN-based edge inpainting [35] suffers from generating meaningless edges or unreasonable blanks for masked areas as shown in Fig. 6, due to the nature of sparsity in binary edge maps. Thus, we propose a novel PDS block in PSS as in Fig. 3(a). PDS leverages dilated lower-scale structures to make up the sparse problem for ST space. Particularly, assume the image feature $\mathbf{X} \in \mathbb{R}^{h \times w \times d}$ , PDS firstly decouples it as
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathbf {E} _ {l e} = f _ {e b} (\operatorname {G a t e C o n v} (\mathbf {X})), \left\{\mathbf {E} _ {l}, \mathbf {E} _ {e} \right\} = \operatorname {s p l i t} \left(\mathbf {E} _ {l e}\right), \tag {3}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathbf {O} _ {e} = \sigma (\operatorname {C o n v} (\mathbf {E} _ {e})), \mathbf {O} _ {l} = \sigma (\operatorname {C o n v} (\mathbf {E} _ {l})),
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $\sigma$ is sigmoid activation. We project the feature into two separated embedding spaces called line embedding $\mathbf{E}_l$ and edge embedding $\mathbf{E}_e$ with the function $f_{eb}$ , which is composed with $\mathrm{Conv2D} \to \mathrm{IN} \to \mathrm{ReLU}$ . split is the operation of splitting the features into two respective tensors with equal channels. Then, $\mathbf{E}_l$ and $\mathbf{E}_e$ are utilized to learn to roughly reconstruct the image $\mathbf{O}_{im}$ without corruption as
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\mathbf {A} = f _ {a b} \left(\mathbf {E} _ {l e}\right) \in \mathbb {R} ^ {h \times w \times 1}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\mathbf {E} _ {l e} ^ {\prime} = \mathbf {E} _ {l} \odot (1 - \mathbf {A}) + \mathbf {E} _ {e} \odot \mathbf {A} \tag {4}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\mathbf {O} _ {i m} = \tanh (\operatorname {C o n v} (\mathbf {E} _ {l e} ^ {\prime})),
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $f_{ab}$ is Conv2D $\rightarrow$ IN $\rightarrow$ ReLU $\rightarrow$ Conv2D $\rightarrow$ Sigmoid.
|
| 137 |
+
$\odot$ denotes the element-wise product. The prediction of
|
| 138 |
+
|
| 139 |
+
coarse $\mathbf{O}_{im}$ gives a stronger constraint to the conflict of $\mathbf{E}_l$ and $\mathbf{E}_e$ , and we expect the attention map $\mathbf{A}$ can be learned adaptively according to a challenging target. Furthermore, a multi-scale strategy is introduced in the PDS. For the given feature $\mathbf{X}^{(1)} \in \mathbb{R}^{64 \times 64 \times d}$ from dilated residual blocks of PSS, PDS predicts lines, edges, and coarse images with different resolutions as follow
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\mathbf {X} ^ {(i + 1)}, \mathbf {O} _ {i m} ^ {(i)}, \mathbf {O} _ {l} ^ {(i)}, \mathbf {O} _ {e} ^ {(i)} = \operatorname {P D S} ^ {(i)} (\mathbf {X} ^ {(i)}), \tag {5}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $i = 1,2,3$ indicate that the output maps with $64\times 64$ , $128\times 128$ , and $256\times 256$ resolutions respectively. Various scales of images can be in favor of reconstructing different types of structure information.
|
| 146 |
+
|
| 147 |
+
Loss Function of PSS. We minimize the objectives of PPS with two spectral norm [27] based SN-PathGAN [43] discriminators $D_{l}$ and $D_{e}$ for lines and edges respectively. And the $\mathcal{L}_D^{enc}$ and $\mathcal{L}_G^{enc}$ are indicated as
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\mathcal {L} _ {D} ^ {e n c} = \mathcal {L} _ {D _ {l}} + \mathcal {L} _ {D _ {e}},
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\mathcal {L} _ {G} ^ {e n c} = \lambda_ {a} \mathcal {L} _ {a d v} ^ {e n c} + \lambda_ {f} \mathcal {L} _ {f m} + \sum_ {i = 1} ^ {3} \| \mathbf {O} _ {i m} ^ {(i)} - \mathbf {I} ^ {(i)} \| _ {1}, \tag {6}
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
where $\mathbf{O}_{im}^{(i)}$ , $\mathbf{I}^{(i)}$ are the multi-scale outputs (Eq. 5) and ground-truth images varying image size $64 \times 64$ to $256 \times 256$ respectively. $\mathcal{L}_{fm}$ is the feature matching loss as in [28] to restrict the $l_{1}$ loss between discriminator features from the concatenated coarse-to-fine real and fake sketches discussed below. And the adversarial loss can be further specified as
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\begin{array}{l} \mathcal {L} _ {a d v} ^ {e n c} = - \mathbb {E} \left[ \log D _ {l} (\hat {\mathbf {O}} _ {l}) \right] - \mathbb {E} \left[ \log D _ {e} (\hat {\mathbf {O}} _ {e}) \right], \\ \mathcal {L} _ {D _ {l}} = - \mathbb {E} \left[ \log D _ {l} (\hat {\mathbf {I}} _ {l}) \right] - \mathbb {E} \left[ 1 - \log D _ {l} (\hat {\mathbf {O}} _ {l}) \right], \tag {7} \\ \mathcal {L} _ {D _ {e}} = - \mathbb {E} \left[ \log D _ {e} (\hat {\mathbf {I}} _ {e}) \right] - \mathbb {E} \left[ 1 - \log D _ {e} (\hat {\mathbf {O}} _ {e}) \right], \\ \end{array}
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
where $\hat{\mathbf{O}}_l$ , $\hat{\mathbf{O}}_e \in \mathbb{R}^{256 \times 256 \times 3}$ are got from the multi-scale PSS outputs of lines and edges, which are upsampled and concatenated with $\hat{\mathbf{O}}_l = [\mathrm{up}(\mathbf{O}_l^{(1)});\mathrm{up}(\mathbf{O}_l^{(2)});\mathbf{O}_l^{(3)}]$ and $\hat{\mathbf{O}}_e = [\mathrm{up}(\mathbf{O}_e^{(1)});\mathrm{up}(\mathbf{O}_e^{(2)});\mathbf{O}_e^{(3)}]$ . To unify these outputs into the same scale, the nearest upsampling $\mathrm{up()}$ is utilized here. Accordingly, $\hat{\mathbf{I}}_l$ , and $\hat{\mathbf{I}}_e$ are the concatenation of multiscale ground-truth edge and line maps, respectively. Note that, we firstly dilate the ground-truth edges and lines with the $2 \times 2$ kernel, and then subsample them to produce the low resolution maps at the scale of $64 \times 64$ , $128 \times 128$ . The hyper-parameters are set as $\lambda_a = 0.1$ , $\lambda_f = 10$ .
|
| 164 |
+
|
| 165 |
+
# 3.3. Sketch Tensor (ST) Space
|
| 166 |
+
|
| 167 |
+
The last outputs $\mathbf{O}_l^{(3)},\mathbf{O}_e^{(3)}\in \mathbb{R}^{256\times 256\times 1}$ of Eq. 5 is used to compose the ST space as
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\mathcal {S} = \left[ \mathbf {O} _ {l} ^ {(3)}; \mathbf {O} _ {e} ^ {(3)}; \operatorname {c l i p} \left(\mathbf {O} _ {l} ^ {(3)} + \mathbf {O} _ {e} ^ {(3)}\right) \right]. \tag {8}
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
Generally, lines represent holistic structures, while edges indicate some local details. They provide priors of structures in different manners to the inpainting model. We also
|
| 174 |
+
|
| 175 |
+
combine and clip them within 0 and 1 to emphasize overlaps and make an intuitive expression of the whole structure.
|
| 176 |
+
|
| 177 |
+
# 3.4. Decoder of MST Network
|
| 178 |
+
|
| 179 |
+
The structure of the decoder is the same as PSS except that the decoder has no attention blocks and PSD blocks. Because we find that the generator in [28] is sufficient to generate fine results with reasonable structure information. But we still add gated mechanism to the leading and trailing three convolutions to improve the performance for the irregular mask. As the encoder has provided the ST space $S \in \mathbb{R}^{h \times w \times 3}$ in Eq. 8, we can get the inpainted image $\tilde{\mathbf{I}}_m$ with the masked input $\mathbf{I}_m$ and mask $\mathbf{M}$ as
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\tilde {\mathbf {I}} _ {m} = \boldsymbol {\Psi} ([ \mathbf {I} _ {m}; \mathbf {M}; \mathcal {S} ]). \tag {9}
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
We use SN-PathGAN [43] based discriminator $D_{im}$ for the decoder, and the objectives to be minimized are
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\mathcal {L} _ {D} ^ {d e c} = - \mathbb {E} \left[ \log D _ {i m} (\mathbf {I}) \right] - \mathbb {E} \left[ 1 - \log D _ {i m} \left(\tilde {\mathbf {I}} _ {m}\right) \right], \tag {10}
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\begin{array}{l} \mathcal {L} _ {G} ^ {d e c} = \mathcal {L} _ {l _ {1}} + \lambda_ {a} \mathcal {L} _ {a d v} ^ {d e c} + \lambda_ {p} \mathcal {L} _ {p e r} + \lambda_ {s} \mathcal {L} _ {s t y l e}, \\ \mathcal {L} _ {a d v} ^ {d e c} = - \mathbb {E} \left[ \log D _ {i m} \left(\tilde {\mathbf {I}} _ {m}\right) \right], \tag {11} \\ \end{array}
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
where $\mathbf{I}$ is the origin undamaged image for training. We adopt the $l_{1}$ loss $\mathcal{L}_{l_1}$ , VGG-19 based perceptual loss [16] $\mathcal{L}_{per}$ , and style-loss [7] $\mathcal{L}_{style}$ to train our model, with the empirically setted hyperparameters $\lambda_p = 0.1$ , $\lambda_s = 250$ [28, 12]. We propose using the balanced loss form [3] to implement reconstruction losses $\mathcal{L}_{l_1}$ and $\mathcal{L}_{per}$ , normalizing by the weights of masked region $\mathbf{M}$ and unmasked region $1 - \mathbf{M}$ . The balanced loss form can settle the inpainting task with imbalanced irregular masks properly.
|
| 196 |
+
|
| 197 |
+
Note that we learn the encoder and the decoder jointly in the forward pass. The gradients of the decoder will not be propagated to update the encoder, which not only saves the memory but also maintains the interpretability of the sketch tensor $S$ . Generally, the total parameter number and calculation costs of our model are comparable to [28].
|
| 198 |
+
|
| 199 |
+
# 4. Experiments and Results
|
| 200 |
+
|
| 201 |
+
Datasets. The proposed approach is evaluated on three datasets: ShanghaiTech [14], Places2 [48], and York Urban [4]. ShanghaiTech contains 5000 training images and 462 test images consisted of buildings and indoor scenes with wireframe labels. The LSM-HAWP wireframe detection model is trained on this dataset with the mask augmentation. For Places2, we select 10 categories images according to the number of line segments detected by HAWP as man-made scenes (P2M). Moreover, we randomly select 10 Places2 classes with both natural and urban scenes as comprehensive scenes $(\mathrm{P2C})^{1}$ . For York Urban, it has 102 city street view images for testing models trained with P2M.
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 5: Qualitative results in ShanghaiTech and man-made Places2, where * means that our method works in the LMS object removal mode with $m = 0$ . Key parts are enlarged, and the complete generated pictures are shown in the supplementary.
|
| 205 |
+
|
| 206 |
+
<table><tr><td></td><td></td><td>GC</td><td>EC</td><td>RFR</td><td>MED</td><td>Ours</td><td>Ours*</td></tr><tr><td rowspan="3">S.T.</td><td>P↑</td><td>25.54</td><td>26.51</td><td>26.30</td><td>26.14</td><td>26.90</td><td>27.20</td></tr><tr><td>S.↑</td><td>0.893</td><td>0.871</td><td>0.863</td><td>0.886</td><td>0.876</td><td>0.880</td></tr><tr><td>F.↓</td><td>26.06</td><td>24.84</td><td>25.95</td><td>30.02</td><td>21.16</td><td>20.05</td></tr><tr><td rowspan="3">P2M</td><td>P↑</td><td>25.72</td><td>26.71</td><td>26.07</td><td>23.84</td><td>27.20</td><td>27.47</td></tr><tr><td>S.↑</td><td>0.892</td><td>0.901</td><td>0.890</td><td>0.857</td><td>0.907</td><td>0.910</td></tr><tr><td>F.↓</td><td>16.54</td><td>14.75</td><td>17.79</td><td>26.95</td><td>12.81</td><td>12.13</td></tr><tr><td rowspan="3">Y-U.</td><td>P↑</td><td>25.92</td><td>26.13</td><td>25.64</td><td>24.20</td><td>26.29</td><td>26.59</td></tr><tr><td>S.↑</td><td>0.886</td><td>0.864</td><td>0.852</td><td>0.858</td><td>0.869</td><td>0.872</td></tr><tr><td>F.↓</td><td>31.68</td><td>32.06</td><td>38.70</td><td>51.71</td><td>29.15</td><td>26.53</td></tr><tr><td rowspan="3">P2C</td><td>P↑</td><td>27.87</td><td>28.35</td><td>-</td><td>-</td><td>28.52</td><td>28.65</td></tr><tr><td>S.↑</td><td>0.923</td><td>0.927</td><td>-</td><td>-</td><td>0.928</td><td>0.929</td></tr><tr><td>F.↓</td><td>15.05</td><td>13.68</td><td>-</td><td>-</td><td>11.97</td><td>11.69</td></tr></table>
|
| 207 |
+
|
| 208 |
+
Table 1: The PSNR (P.), SSIM (S.) and FID (F.) results on ShanghaiTech (S.-T.), man-made Places2 (P2M), York Urban (Y.-U.), and comprehensive Places2 (P2C). $\uparrow$ means larger is better and $\downarrow$ means lower is better. * indicates our method working in object removal mode of LSM. Best results are bold except for object removal ones.
|
| 209 |
+
|
| 210 |
+
Implementation Details. Our method is implemented with PyTorch in $256 \times 256$ image size. All models are trained with Adam optimizer of $\beta_{1} = 0$ and $\beta_{2} = 0.9$ , and the initial learning rates are $2e - 4$ and $2e - 5$ for generators and discriminators respectively. We train the model with 400k steps in ShanghaiTech and 1000k steps in Places2. Besides, $E_{s}$ is trained with $1/3$ of the total steps, and then be fixed. We decay the learning rate with 0.75 for each 100k steps. For the structure information, line segments are extracted by HAWP, and Canny edges are got with $\sigma = 2$ . Our model is trained in Pytorch v1.3.1, and costs about 2 days training
|
| 211 |
+
|
| 212 |
+
in ShanghaiTech and about 5 days in Places2 with a single NVIDIA(R) Tesla(R) V100 16GB GPU.
|
| 213 |
+
|
| 214 |
+
Comparison Methods. We compare the proposed MST with some state-of-the-art methods, which include Gated Convolution (GC) [43], Edge Connect (EC) [28], Recurrent Feature Reasoning (RFR) [21], and Mutual Encoder-Decoder with Feature Equalizations (MED) [12]. These methods are all retrained with similar settings and costs compared with ours.
|
| 215 |
+
|
| 216 |
+
Settings of Masks. To handle the real-world image inpainting and editing tasks, such as object removal, the random irregular mask generation in [43, 37] is adopted in this paper. Besides, as discussed in [45], real-world inpainting tasks usually remove regions with typical objects or scenes segments. So we collect 91707 diverse semantic segmentation masks with various objects and scenes with the coverage rates in $[5\%, 40\%]$ from the COCO dataset [23]. Overall, the final mask will be chosen from irregular masks and COCO segment masks randomly with $50\%$ in both training and test set. To be fair, all comparison methods are retrained with the same masking strategy.
|
| 217 |
+
|
| 218 |
+
# 4.1. Image Inpainting Results
|
| 219 |
+
|
| 220 |
+
For fair comparisons in image inpainting, we do not leak any line segments of the uncorrupted images for the image inpainting task and related discussions. The wireframe parser LSM-HAWP is trained in ShanghaiTech, and it predicts the line segments for the other two datasets. Besides, results from the object removal with $m = 0$ in Eq. (1) are offered for reference only in this section.
|
| 221 |
+
|
| 222 |
+
Quantitative Comparisons. In this section, we evaluate results with PSNR, SSIM [36], and FID [11]. As discussed
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 6: (From left to right) Original image, masked image, edges $\mathbf{O}_e$ generated from EC [28], edges and lines $\mathrm{clip}(\mathbf{O}_l + \mathbf{O}_e)$ generated from our model, our inpainted results. Blue lines indicate the generated lines or edges.
|
| 226 |
+
|
| 227 |
+
in [46], we find that $l_{2}$ based metrics such as PSNR and SSIM often contradict human judgment. For example, some meaningless blurring areas will cause large perceptual deviations but small $l_{2}$ loss [46]. Therefore, we pay more attention to the perceptual metric FID in quantitative comparisons. The results on ShanghaiTech, P2M, and York Urban are shown in Tab. 1. From the quantitative results, our method outperforms other approaches in PSNR and FID. Especially for the FID, which accords with the human perception, our method achieves considerable advantages. Besides, our method enjoys good generalization, as it also works properly in P2M, York Urban, and even P2C.
|
| 228 |
+
|
| 229 |
+
Qualitative Comparisons. Qualitative results among our method and other state-of-the-art methods are shown in Fig. 5. Compared with other methods, our approach achieves more semantically coherent results. From the enlarged regions, our schema significantly outperforms other approaches in preserving the perspectivity and the structures of man-made scenes. Moreover, we show the edge results of EC [28] and partial sketch tensor space (edges and lines) results of our method in ShanghaiTech, P2M, and P2C in Fig. 6. Results in Fig. 6 demonstrate that line segments can supply compositional information to avoid indecisive and meaningless generations in edges. Furthermore, line segments can also provide clear and specific structures
|
| 230 |
+
|
| 231 |
+
<table><tr><td></td><td>GC</td><td>EC</td><td>Ours</td></tr><tr><td>S.-T.</td><td>3.00</td><td>7.67</td><td>33.67</td></tr><tr><td>P2M</td><td>6.67</td><td>8.67</td><td>32.33</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 2: Average user scores of ShanghaiTech (S.-T.) and man-made Places2 (P2M).
|
| 234 |
+
|
| 235 |
+
in masked regions to reconstruct more definitive results in man-made scenes. Besides, for the natural scene images in P2C without any lines, our method can still outperform EC with reasonable generated edges for the masked regions. As discussed in Sec. 3.2, the proposed PDS works properly to handle the sparse generative problem.
|
| 236 |
+
|
| 237 |
+
Results of Natural Scenes. In the last three rows of Tab. 1, we present the results of ours method on the comprehensive Places2 dataset (P2C) to confirm the generalization. They are compared with GC and EC, which have achieved fine scores in man-made Places2 (P2M). Note that all metrics are improved in P2C compared with ones in P2M of Tab. 1, which demonstrates man-made scenes are more difficult to tackle. Our methods still get the best results among all competitors, and the object removal results achieve superior performance. Besides, the last two rows of Fig. 6 show that our method can generate reliable edge sketches even without lines in natural scenes. These phenomenons are largely due to two reasons: 1) There is still a considerable quantity of line segments in the comprehensive scenes, and these instances are usually more difficult than others. 2) The proposed partially gated convolutions, efficient attention, and PDS blocks can work properly for various scenes.
|
| 238 |
+
|
| 239 |
+
Human Judgements. For more comprehensive comparisons, 50 inpainted images from GC [43], EC [28], and ours are chosen from ShanghaiTech and P2M randomly. And these samples are compared by 3 uncorrelated volunteers. Particularly, volunteers need to choose the best one from the mixed pool of the inpainted images with different methods, and give one score to the respective approach. If all methods work roughly the same for a certain sample, it will be ignored. The average scores are shown in Tab. 2. Ours method is significantly better than other competitors.
|
| 240 |
+
|
| 241 |
+
# 4.2. Other Applications and Ablation Study
|
| 242 |
+
|
| 243 |
+
Object Removal. From the last column in Fig. 5, we show the inpainting results of our MST working in the postprocess of LSM with $m = 0$ for the object removal. These refined images with more reasonable structures indicate that the our model can strengthen the capability of image reconstruction without redundant residues. From Fig. 7, some object removal cases are shown to confirm the practicability of the proposed method. Numerical results are presented in the last columns of Tab. 1. So, our method can achieve further improvements in all metrics compared with the vanilla image inpainting schema for the object removal, and it can correctly mask undesired lines. Therefore, the post-process
|
| 244 |
+
|
| 245 |
+

|
| 246 |
+
Figure 7: Object removal examples. From left to right: origin image, masked image, and our inpainted image.
|
| 247 |
+
|
| 248 |
+
<table><tr><td></td><td colspan="3">unmasked testset</td><td colspan="3">masked testset</td></tr><tr><td>Threshold</td><td>5</td><td>10</td><td>15</td><td>5</td><td>10</td><td>15</td></tr><tr><td>HAWP</td><td>62.16</td><td>65.94</td><td>67.64</td><td>35.39</td><td>38.47</td><td>40.15</td></tr><tr><td>LSM-HAWP</td><td>63.20</td><td>67.06</td><td>68.70</td><td>48.93</td><td>53.30</td><td>55.39</td></tr></table>
|
| 249 |
+
|
| 250 |
+
Table 3: Structural average precision scores [49] with different thresholds of parsers trained with (LSM-HAWP) and without (HAWP) the mask augmentation on ShanghaiTech.
|
| 251 |
+
|
| 252 |
+
<table><tr><td></td><td>PSNR↑</td><td>SSIM↑</td><td>FID↓</td><td>Param</td></tr><tr><td>w/o GC</td><td>26.51</td><td>0.871</td><td>24.84</td><td>10.8M</td></tr><tr><td>Partially GC</td><td>26.78</td><td>0.874</td><td>22.68</td><td>12.1M</td></tr><tr><td>All GC</td><td>26.71</td><td>0.874</td><td>22.62</td><td>25.1M</td></tr></table>
|
| 253 |
+
|
| 254 |
+
Table 4: Ablation study of the gated convolution of our model in ShanghaiTech, Param indicates the parameter scale of the compared inpainting model.
|
| 255 |
+
|
| 256 |
+
<table><tr><td></td><td>w/o lines</td><td>w/o EA</td><td>w/o PDS</td><td>Ours</td></tr><tr><td>PSNR↑</td><td>26.78</td><td>26.77</td><td>26.63</td><td>26.90</td></tr><tr><td>SSIM↑</td><td>0.874</td><td>0.875</td><td>0.873</td><td>0.876</td></tr><tr><td>FID↓</td><td>22.68</td><td>21.39</td><td>21.88</td><td>21.16</td></tr></table>
|
| 257 |
+
|
| 258 |
+
Table 5: Quantitative ablation studies in ShanghaiTech.
|
| 259 |
+
|
| 260 |
+
of LSM can significantly improve the performance in the object removal task with the separability of line segments. Masked Wireframe Detection. As discussed in Sec. 3.1, we retrain the HAWP with mask augmentation to ensure the robustness for the corrupted data as LSM-HAWP in ShanghaiTech dataset [14]. To confirm the effect of the augmentation, we further prepare another masked ShanghaiTech testset with the same images. The results are shown in Tab. 3. The structural average precision (sAP) metric is proposed
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 8: Ablation studies on line segments and PDS blocks in ShanghaiTech. Blue and red lines indicate recovered and ground truth in masked regions, respectively.
|
| 264 |
+
|
| 265 |
+
in [49], which is defined as the area under the PR curve of detected lines with different thresholds. From Tab. 3, LSM-HAWP performs better than vanilla HAWP significantly for the masked testset. Moreover, HAWP can also gain improvements in the uncorropted testset with more than $1\%$ in sAP, which indicates the great generality of the mask augmentation for the wireframe detection task.
|
| 266 |
+
|
| 267 |
+
Simplification of Gated Convolutions. The related ablation study of GC are shown in Tab. 4. Only replacing vanilla convolutions for input and output stages of the model with partially GC gains satisfactory improvements. But replacing all convolution layers with GC fails to achieve a further large advance, while the parameters are doubled<sup>2</sup>.
|
| 268 |
+
|
| 269 |
+
Contributions of Lines, PDS, and EA. We explored the effects of lines, Pyramid Decomposing Separable (PDS) blocks and the Efficient Attention (EA) module in Tab. 5 in ShanghaiTech. Specifically, line segments, PDS blocks and the EA module are removed respectively, while other settings unchanged. As shown in Fig. 8, our method without line segments causes severe structural loss, and the one without PDS suffers from contradictory perspectivity. From Tab. 5, we can see all line segments, PDS blocks and the EA module can improve the performance in image inpainting.
|
| 270 |
+
|
| 271 |
+
# 5. Conclusions
|
| 272 |
+
|
| 273 |
+
This paper studies an encoder-decoder MST-net for inpainting. It learns a sketch tensor space restoring edges, lines, and junctions. Specifically, the encoder extracts and refines line and edge structures into a sketch tensor space. The decoder recovers the image from it. Moreover, the LSM algorithm is proposed to update the line extractor HAWP to fit the inpainting and object removal tasks. Several effective network modules are proposed to improve the MST for tough man-made scenes inpainting. Extensive experiments validate the efficacy of our MST-net for inpainting.
|
| 274 |
+
|
| 275 |
+
Acknowledgment Yanwei Fu is the corresponding author. This project is supported by Huawei, and released on https://ewrfcas.github.io/MST_inpainting.
|
| 276 |
+
|
| 277 |
+
# References
|
| 278 |
+
|
| 279 |
+
[1] Connelly Barnes, Eli Shechtman, Adam Finkelstein, and Dan B Goldman. Patchmatch: A randomized correspondence algorithm for structural image editing. ACM Trans. Graph., 28(3):24, 2009. 2
|
| 280 |
+
[2] Antonio Criminisi, Patrick Perez, and Kentaro Toyama. Object removal by exemplar-based inpainting. In 2003 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2003. Proceedings., volume 2, pages II-II. IEEE, 2003. 1, 1
|
| 281 |
+
[3] Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9268-9277, 2019. 3.4
|
| 282 |
+
[4] Patrick Denis, James H Elder, and Francisco J Estrada. Efficient edge-based methods for estimating Manhattan frames in urban imagery. In European conference on computer vision, pages 197-210. Springer, 2008. 1, 4
|
| 283 |
+
[5] Lijun Ding and Ardeshir Goshtasby. On the canny edge detector. Pattern Recognition, 34(3):721-725, 2001. 1, 3
|
| 284 |
+
[6] Omar Elharrouss, Noor Almaadeed, Somaya Al-Maadeed, and Younes Akbari. Image inpainting: A review. Neural Processing Letters, pages 1-22, 2019. 1
|
| 285 |
+
[7] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2414-2423, 2016. 3.4
|
| 286 |
+
[8] Qiang Guo, Shanshan Gao, Xiaofeng Zhang, Yilong Yin, and Caiming Zhang. Patch-based image inpainting via two-stage low rank approximation. IEEE transactions on visualization and computer graphics, 24(6):2023-2036, 2017. 1
|
| 287 |
+
[9] Peter E Hart and RO Duda. Use of the hough transformation to detect lines and curves in pictures. Communications of the ACM, 15(1):11-15, 1972. 2
|
| 288 |
+
[10] James Hays and Alexei A Efros. Scene completion using millions of photographs. Communications of the ACM, 51(10):87-94, 2008. 2
|
| 289 |
+
[11] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in neural information processing systems, pages 6626-6637, 2017. 4.1
|
| 290 |
+
[12] Bin Jiang Hongyu Liu, Yibing Song, Wei Huang, and Chao Yang. Rethinking image inpainting via a mutual encoder-decoder with feature equalizations. In Proceedings of the European Conference on Computer Vision, 2020. 2, 3.4, 4
|
| 291 |
+
[13] Jia-Bin Huang, Sing Bing Kang, Narendra Ahuja, and Johannes Kopf. Image completion using planar structure guidance. ACM Transactions on graphics (TOG), 33(4):1-10, 2014. 2
|
| 292 |
+
[14] Kun Huang, Yifan Wang, Zihan Zhou, Tianjiao Ding, Shenghua Gao, and Yi Ma. Learning to parse wireframes in images of man-made environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 626-635, 2018. 1, 2, 4, 4.2
|
| 293 |
+
|
| 294 |
+
[15] Youngjoo Jo and Jongyoul Park. Sc-fegan: Face editing generative adversarial network with user's sketch and color. In Proceedings of the IEEE International Conference on Computer Vision, pages 1745-1753, 2019. 2
|
| 295 |
+
[16] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European conference on computer vision, pages 694–711. Springer, 2016. 3.4
|
| 296 |
+
[17] Avisek Lahiri, Arnav Kumar Jain, Sanskar Agrawal, Pabitra Mitra, and Prabir Kumar Biswas. Prior guided gan based semantic inpainting. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1
|
| 297 |
+
[18] Cheng-Han Lee, Ziwei Liu, Lingyun Wu, and Ping Luo. Maskgan: Towards diverse and interactive facial image manipulation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5549-5558, 2020. 2
|
| 298 |
+
[19] Haodong Li, Weiqi Luo, and Jiwu Huang. Localization of diffusion-based inpainting in digital images. IEEE Transactions on Information Forensics and Security, 12(12):3050-3064, 2017. 1
|
| 299 |
+
[20] Jingyuan Li, Fengxiang He, Lefei Zhang, Bo Du, and Dacheng Tao. Progressive reconstruction of visual structure for image inpainting. In Proceedings of the IEEE International Conference on Computer Vision, pages 5962-5971, 2019. 1, 2
|
| 300 |
+
[21] Jingyuan Li, Ning Wang, Lefei Zhang, Bo Du, and Dacheng Tao. Recurrent feature reasoning for image inpainting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7760-7768, 2020. 1, 3.2, 4
|
| 301 |
+
[22] Liang Liao, Jing Xiao, Zheng Wang, Chia-Wen Lin, and Shinichi Satoh. Guidance and evaluation: Semantic-aware image inpainting for mixed scenes. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXVII 16, pages 683-700. Springer, 2020. 1, 2
|
| 302 |
+
[23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 4
|
| 303 |
+
[24] Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision (ECCV), pages 85-100, 2018. 1
|
| 304 |
+
[25] Hongyu Liu, Bin Jiang, Yi Xiao, and Chao Yang. Coherent semantic attention for image inpainting. In Proceedings of the IEEE International Conference on Computer Vision, pages 4170-4179, 2019. 3.2
|
| 305 |
+
[26] Xiaohu Lu, Jian Yao, Kai Li, and Li Li. Cannylines: A parameter-free line segment detector. In 2015 IEEE International Conference on Image Processing (ICIP), pages 507-511. IEEE, 2015. 2
|
| 306 |
+
[27] Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative ad
|
| 307 |
+
|
| 308 |
+
versarial networks. In International Conference on Learning Representations, 2018. 3.2
|
| 309 |
+
[28] Kamyar Nazeri, Eric Ng, Tony Joseph, Faisal Qureshi, and Mehran Ebrahimi. Edgeconnect: Structure guided image inpainting using edge prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, Oct 2019. 1, 1, 2, 3.2, 3.4, 3.4, 4, 6, 4.1, 4.1
|
| 310 |
+
[29] Yurui Ren, Xiaoming Yu, Ruonan Zhang, Thomas H Li, Shan Liu, and Ge Li. Structureflow: Image inpainting via structure-aware appearance flow. In Proceedings of the IEEE International Conference on Computer Vision, pages 181-190, 2019. 2
|
| 311 |
+
[30] Patsorn Sangkloy, Jingwan Lu, Chen Fang, Fisher Yu, and James Hays. Scribbler: Controlling deep image synthesis with sketch and color. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5400-5409, 2017. 2
|
| 312 |
+
[31] Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, and Hongsheng Li. Efficient attention: Attention with linear complexities. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 3531-3539, 2021. 3.2
|
| 313 |
+
[32] Yuhang Song, Chao Yang, Yeji Shen, Peng Wang, Qin Huang, and C-C Jay Kuo. Spg-net: Segmentation prediction and guidance network for image inpainting. arXiv preprint arXiv:1805.03356, 2018. 1, 2
|
| 314 |
+
[33] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 3.2
|
| 315 |
+
[34] Rafael Grompone Von Gioi, Jeremie Jakubowicz, Jean-Michel Morel, and Gregory Randall. Lsd: A fast line segment detector with a false detection control. IEEE transactions on pattern analysis and machine intelligence, 32(4):722-732, 2008. 2
|
| 316 |
+
[35] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. High-resolution image synthesis and semantic manipulation with conditional gans. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8798-8807, 2018. 3.2
|
| 317 |
+
[36] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600-612, 2004. 4.1
|
| 318 |
+
[37] Wei Xiong, Jiahui Yu, Zhe Lin, Jimei Yang, Xin Lu, Connelly Barnes, and Jiebo Luo. Foreground-aware image inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5840-5848, 2019. 4
|
| 319 |
+
[38] Nan Xue, Tianfu Wu, Song Bai, Fudong Wang, Gui-Song Xia, Liangpei Zhang, and Philip HS Torr. Holistically-attracted wireframe parsing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2788-2797, 2020. 1, 2, 3.1
|
| 320 |
+
|
| 321 |
+
[39] Jie Yang, Zhiquan Qi, and Yong Shi. Learning to incorporate structure knowledge for image inpainting. In AAAI, pages 12605-12612, 2020. 1, 2, 3.2
|
| 322 |
+
[40] Zili Yi, Qiang Tang, Shekoofeh Azizi, Daesik Jang, and Zhan Xu. Contextual residual aggregation for ultra high-resolution image inpainting. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020. 1
|
| 323 |
+
[41] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. 3.2
|
| 324 |
+
[42] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Generative image inpainting with contextual attention. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5505-5514, 2018. 3.2
|
| 325 |
+
[43] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Free-form image inpainting with gated convolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 4471-4480, 2019. 1, 1, 2, 3.1, 3.2, 3.2, 3.4, 4, 4.1
|
| 326 |
+
[44] Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo. Learning pyramid-context encoder network for high-quality image inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1486-1494, 2019. 1
|
| 327 |
+
[45] Yu Zeng, Zhe Lin, Jimei Yang, Jianming Zhang, Eli Shechtman, and Huchuan Lu. High-resolution image inpainting with iterative confidence feedback and guided upsampling. In European Conference on Computer Vision, pages 1-17. Springer, 2020. 3.1, 4
|
| 328 |
+
[46] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 586-595, 2018. 4.1
|
| 329 |
+
[47] Richard Zhang, Jun-Yan Zhu, Phillip Isola, Xinyang Geng, Angela S Lin, Tianhe Yu, and Alexei A Efros. Real-time user-guided image colorization with learned deep priors. ACM Transactions on Graphics (TOG), 9(4), 2017. 2
|
| 330 |
+
[48] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452-1464, 2017. 1, 4
|
| 331 |
+
[49] Yichao Zhou, Haozhi Qi, and Yi Ma. End-to-end wireframe parsing. In Proceedings of the IEEE International Conference on Computer Vision, pages 962-971, 2019. 2, 3, 4.2
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:878340e055986d846fb8ba06b791be5efc2f6964fc319bd360239748923f7d5d
|
| 3 |
+
size 843162
|
learningasketchtensorspaceforimageinpaintingofmanmadescenes/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f1846205de3ef0f3f8201c0f12b17765bccb490669253d0345fd496d548e1245
|
| 3 |
+
size 420274
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57841fb53b9fd26c788d7450984605185324fca2488558bf3bbd87b7e45106ea
|
| 3 |
+
size 80776
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5eda4231ec7a109112d62f061a3bb53afe2e86368a15025a80c1eb17d91a9e4e
|
| 3 |
+
size 99057
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/944d4805-ff15-4986-bc52-1f53322d407a_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ac3cba4e867b10f40b9ef2358d1cfb5a55bce63b050635b9ce9d599e0a7c188
|
| 3 |
+
size 815905
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/full.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning by Aligning:
|
| 2 |
+
Visible-Infrared Person Re-identification using Cross-Modal Correspondences
|
| 3 |
+
|
| 4 |
+
Hyunjong Park*
|
| 5 |
+
|
| 6 |
+
Sanghoon Lee*
|
| 7 |
+
|
| 8 |
+
Junghyup Lee
|
| 9 |
+
|
| 10 |
+
Bumsub Ham†
|
| 11 |
+
|
| 12 |
+
School of Electrical and Electronic Engineering, Yonsei University
|
| 13 |
+
|
| 14 |
+
https://cvlab.yonsei.ac.kr/projects/LbA
|
| 15 |
+
|
| 16 |
+
# Abstract
|
| 17 |
+
|
| 18 |
+
We address the problem of visible-infrared person re-identification (VI-reID), that is, retrieving a set of person images, captured by visible or infrared cameras, in a cross-modal setting. Two main challenges in VI-reID are intraclass variations across person images, and cross-modal discrepancies between visible and infrared images. Assuming that the person images are roughly aligned, previous approaches attempt to learn coarse image- or rigid part-level person representations that are discriminative and generalizable across different modalities. However, the person images, typically cropped by off-the-shelf object detectors, are not necessarily well-aligned, which distract discriminative person representation learning. In this paper, we introduce a novel feature learning framework that addresses these problems in a unified way. To this end, we propose to exploit dense correspondences between cross-modal person images. This allows to address the cross-modal discrepancies in a pixel-level, suppressing modality-related features from person representations more effectively. This also encourages pixel-wise associations between cross-modal local features, further facilitating discriminative feature learning for VI-reID. Extensive experiments and analyses on standard VI-reID benchmarks demonstrate the effectiveness of our approach, which significantly outperforms the state of the art.
|
| 19 |
+
|
| 20 |
+
# 1. Introduction
|
| 21 |
+
|
| 22 |
+
Person re-identification (reID) aims at retrieving person images, captured across multiple cameras, with the same identity as a query person. It provides a wide range of applications, including surveillance, security, and pedestrian analysis, and has gained a lot of attention over the last decade [40, 47]. Most reID methods formulate the task as a single-modality retrieval problem, and focus on finding matches, e.g., between RGB images. Visible cameras are incapable of capturing appearances of persons, particularly
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 1: An example of dense cross-modal correspondences between RGB and IR images from the SYSU-MM01 dataset [36]. For the visualization purpose only, we show the top 20 matches according to similarities between local person representations learned without (left) and with (right) our approach. Our person representations are robust to the cross-modal discrepancies, while being highly discriminative, especially for person regions. (Best viewed in color.)
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
|
| 29 |
+
important for person reID, under poor-illumination conditions (e.g., at night time or dark indoors). Infrared (IR) cameras, on the other hand, work well, regardless of visual light, capturing an overall scene layout, while not taking scene details, such as texture and color. Accordingly, visible-IR person re-identification (VI-reID), that is, retrieving IR person images of the same identity as an RGB query and vice versa, has recently been of great interest [36].
|
| 30 |
+
|
| 31 |
+
VI-reID is extremely challenging due to intra-class variations (e.g. viewpoint, pose, illumination and background clutter), noisy samples (e.g. misalignment and occlusion), and cross-modal discrepancies between RGB and IR images. Visual attributes and statistics of RGB/IR images are significantly different from one another [36]. VI-reID methods based on convolutional neural networks (CNNs) alleviate the discrepancies using cross-modal metric losses [7, 37, 41] along with a modality discriminator [4] to learn person representations robust to the cross-modal discrepancies, and further refine the representations with self-attention [39] or disentanglement techniques [3]. These approaches focus on learning coarse image-level or rigid part-level representations, assuming that person images are roughly aligned.
|
| 32 |
+
|
| 33 |
+
Misaligned features from RGB and IR images, however, have an adverse effect on handling the cross-modal discrepancies, distracting learning person representations.
|
| 34 |
+
|
| 35 |
+
In this paper, we propose to leverage dense correspondences between cross-modal images during training for VI-reID. To this end, we encourage person representations of RGB images to reconstruct those from IR images of the same identity, which often depict different appearances due to viewpoint and pose variations, and vice versa. We achieve this by establishing dense cross-modal correspondences between RGB and IR person images in a probabilistic way. We incorporate parameter-free person masks to focus on the reconstructions of person regions, while discarding others including background or occluded regions. We also introduce novel ID consistency and dense triplet losses using pixel-level associations, allowing the network to learn more discriminative person representations. Dense cross-modal correspondences align pixel-level person representations from RGB and IR image explicitly, which is beneficial to person representation learning for VI-reID due to two main reasons. First, by enforcing semantically similar regions from RGB and IR images to be embedded nearby, we encourage the network to extract features invariant to the input modalities, even from misaligned RGB and IR person images. Second, by encouraging a local association, we enforce the network to focus on extracting discriminative pixel-wise local features, which further facilitates the person representation learning. The network trained using our framework is thus able to offer local features that are robust to cross-modal discrepancies and highly discriminative (Fig. 1), which are aggregated to form a final person representation for VI-reID, without any additional parameters at test time. Experimental results and extensive analyses on standard VI-reID benchmarks demonstrate the effectiveness and efficiency of our approach. The main contributions of this paper can be summarized as follows:
|
| 36 |
+
|
| 37 |
+
- We propose a novel feature learning framework for VIReID using dense cross-modal correspondences that alleviates the discrepancies between multi-modal images effectively, while further enhancing the discriminative power of person representations.
|
| 38 |
+
- We introduce ID consistency and dense triplet losses to train our network end-to-end, which help to extract discriminative person representations using cross-modal correspondences.
|
| 39 |
+
- We achieve a new state of the art on standard VIreID benchmarks and demonstrate the effectiveness and efficiency of our approach through extensive experiments with ablation studies.
|
| 40 |
+
|
| 41 |
+
# 2. Related work
|
| 42 |
+
|
| 43 |
+
In this section, we briefly describe representative works related to ours, including person reID, VI-reID, cross-modal
|
| 44 |
+
|
| 45 |
+
image retrieval and dense correspondence.
|
| 46 |
+
|
| 47 |
+
ReID. Person reID methods typically tackle a single-modality case, that is, RGB-to-RGB matching. They formulate the reID task as a multi-class classification problem [49], where person images of the same identity belong to the same category. A triplet loss is further exploited to encourage person representations obtained from the same identity to be embedded nearby, while those from the different identities to be distant in feature space [12]. Recent methods focus on extracting person representations robust to intra-class variations, exploiting attributes to offer complementary information [19], disentangling identity-related features [9, 48], or incorporating attention techniques to see discriminative regions [18, 46]. Many reID methods leverage part-based representations [8, 32, 33], which further enhance the discriminative power of person features. Specifically, they divide person images into multiple horizontal grids exploiting human body parts implicitly. Local features from the horizontal parts are more robust to intra-class variations, especially for occlusion, than the global one. However, when body parts from corresponding horizontal grids are misaligned, this rather distracts learning person representations. The works of [15, 23, 45, 52] propose to align semantically related regions between person images, by employing auxiliary pose estimators [23, 45] or human semantic parsing techniques [15, 52]. While these auxiliary branches offer reliable estimations to guide the alignment, they have two main drawbacks: First, they typically require additional datasets during training. Second, the auxiliary predictions are required at test time, making the overall pipeline computationally heavy. On the other hand, we perform the alignment during training only, by leveraging dense correspondences, without additional supervisory signals except ID labels, while enabling an efficient pipeline at test time.
|
| 48 |
+
|
| 49 |
+
VI-reID. VI-reID has recently been explored compared to single-modality reID, according to the wide spread of RGB-IR cameras. VI-reID methods focus on handling cross-modal discrepancies between RGB and IR images, while learning discriminative person representations. Early works try to learn discriminative features generalizable across different modalities. They adopt classification and/or triplet losses, widely used in single-modality reID methods [36, 40], which however do not mitigate the cross-modal discrepancies explicitly. To address this problem, recent methods use a cross-modal triplet loss, where positive/negative pairs and an anchor are sampled from person images with different modalities [7, 37, 41]. For example, RGB images are used as anchors, while exploiting IR ones as positive/negative samples. These approaches encourage the features, obtained from person images of the same identity but having different modalities, to be sim
|
| 50 |
+
|
| 51 |
+
ilar, providing person representations robust to the cross-modal discrepancies. More recently, DDAG [39] proposes to leverage a graph attention network in order to consider cross-modal relations between RGB and IR images explicitly. VI-reID methods based on generative adversarial networks (GANs) alleviate the cross-modal discrepancies in an image level. For example, they synthesize novel IR person images, with an identity-preserving constraint [34] or cycle consistency [35], given RGB inputs, in order to compare person images with the same modality. Other approaches to leveraging adversarial learning techniques for VI-reID are to disentangle identity-related features from person representations [3], or to exploit a modality discriminator to better align feature distributions of RGB/IR images [4]. Although GANs better capture discriminative factors for person reID, they require lots of parameters and heuristics to train networks [28]. In contrast to current VI-reID methods, we address the cross-modal discrepancies in a pixel level. To this end, we align semantically related regions explicitly via dense cross-modal correspondences, which also allows discriminative feature learning, even from misaligned person images.
|
| 52 |
+
|
| 53 |
+
Cross-modal image retrieval. VI-reID is closely related to cross-modal image retrieval that focuses on finding matches between images of different modalities, e.g., sketch/natural images [27, 29], and RGB/IR images [1, 20]. Existing works typically employ a siamese network [42] to learn a metric function between input image pairs [1, 29], or disentangle feature representations into modality shared-and specific- embeddings [20, 27]. They attempt to alleviate the cross-modal discrepancies between multi-modal images in an image-level. We instead address the discrepancies in a pixel-level by leveraging dense correspondences.
|
| 54 |
+
|
| 55 |
+
Correspondence. Establishing correspondences between images has long been of particular importance in many computer vision tasks, including depth prediction [13, 43], optical flow [2, 6], 3D scene reconstruction [16, 51], and colorization [11, 44]. In context of person reID, the work of [31] leverages dense correspondences to learn a metric function for single-modality person reID. The learned metric function, however, is required even at test time, demanding large computational power and memory. In contrast, we exploit the correspondences as explicit regularizers to guide the feature learning during training only, enabling a simple cosine distance computation between person representations at test time.
|
| 56 |
+
|
| 57 |
+
# 3. Approach
|
| 58 |
+
|
| 59 |
+
We describe in this section an overview of our framework for VI-reID (Sec. 3.1), and present detailed descriptions of a network architecture (Sec. 3.2) and training losses (Sec. 3.3).
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 2: Overview of our framework for VI-reID. We extract RGB and IR features, denoted by $\mathbf{f}_{\mathrm{RGB}}$ and $\mathbf{f}_{\mathrm{IR}}$ , respectively, using a two-stream CNN. The CMAAlign module computes cross-modal feature similarities and matching probabilities between these features, and aligns the cross-modal features w.r.t each other using soft warping, together with parameter-free person masks to mitigate ambiguous matches between background regions. We exploit both original RGB and IR features and aligned ones ( $\hat{\mathbf{f}}_{\mathrm{RGB}}$ and $\hat{\mathbf{f}}_{\mathrm{IR}}$ ) during training, and incorporate them into our objective function consisting of ID ( $\mathcal{L}_{\mathrm{ID}}$ ), ID consistency ( $\mathcal{L}_{\mathrm{IC}}$ ) and dense triplet ( $\mathcal{L}_{\mathrm{DT}}$ ) terms. At test time, we compute cosine distances between person representations, obtained by pooling RGB and IR features. See text for details.
|
| 63 |
+
|
| 64 |
+
# 3.1. Overview
|
| 65 |
+
|
| 66 |
+
We show in Fig. 2 an overview of our framework for VI-reID. We first extract RGB and IR features from corresponding person images, and then align the features with a CMAlign module. It establishes dense cross-modal correspondences between RGB and IR features, and warps these features w.r.t each other using corresponding matching probabilities. Note that we exploit the CMAlign module at training time only, enabling an efficient inference at test time. To train our framework, we exploit three terms: ID $(\mathcal{L}_{\mathrm{ID}})$ , ID consistency $(\mathcal{L}_{\mathrm{IC}})$ , and dense triplet $(\mathcal{L}_{\mathrm{DT}})$ losses. The ID loss applies to each feature from RGB or IR images, separately, similar to single-modality reID [12]. It enforces the features from person images of the same identity to be the same, while providing different ones for the images of different identities. The ID consistency and dense triplet terms exploit the matching probabilities, and encourage RGB and IR features from the same identity to reconstruct one another in a pixel-level, while those from different identities do not. The person representations obtained using these terms are thus robust to the cross-modal discrepancies between RGB and IR images. Note that we use identification labels alone to train our model, without exploiting auxiliary supervisory signals, such as e.g., body
|
| 67 |
+
|
| 68 |
+
parts [15] or landmarks [23], for the alignment. Note also that all components in our model are fully differentiable, making it possible to train the whole network end-to-end.
|
| 69 |
+
|
| 70 |
+
# 3.2. Network Architecture
|
| 71 |
+
|
| 72 |
+
Feature extractor. We use a two-stream CNN to extract feature maps of size $h \times w \times d$ from a pair of RGB/IR person images, where $h$ , $w$ and $d$ are the height, width and number of channels, respectively. Assuming that the cross-modal discrepancies between RGB/IR images mainly lie in low-level features [36, 40], we use separate parameters specific to the input modalities for shallow layers, while sharing the remaining ones for others.
|
| 73 |
+
|
| 74 |
+
CMAlign. The CMAlign module aligns RGB and IR features bidirectionally, i.e., from RGB to IR and from IR to RGB, using dense cross-modal correspondences in a probabilistic way. In the following, we describe an IR-to-RGB alignment. The other case can be performed similarly.
|
| 75 |
+
|
| 76 |
+
For the IR-to-RGB alignment, we compute local similarities between all pairs of RGB and IR features. Concretely, we compute cosine similarities between RGB and IR features, denoted by $\mathbf{f}_{\mathrm{RGB}} \in \mathbb{R}^{h \times w \times d}$ and $\mathbf{f}_{\mathrm{IR}} \in \mathbb{R}^{h \times w \times d}$ , respectively, as follows:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
C (\mathbf {p}, \mathbf {q}) = \frac {\mathbf {f} _ {\mathrm {R G B}} (\mathbf {p}) ^ {\top} \mathbf {f} _ {\mathrm {I R}} (\mathbf {q})}{\| \mathbf {f} _ {\mathrm {R G B}} (\mathbf {p}) \| _ {2} \| \mathbf {f} _ {\mathrm {I R}} (\mathbf {q}) \| _ {2}}, \tag {1}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\| \cdot \|_2$ computes the L2 norm of a vector. We denote by $\mathbf{f}_{\mathrm{RGB}}(\mathbf{p})$ and $\mathbf{f}_{\mathrm{IR}}(\mathbf{q})$ RGB and IR features of size $d$ at position $\mathbf{p}$ and $\mathbf{q}$ , respectively. Based on the similarities, we compute RGB-to-IR matching probabilities using a softmax function as follows:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
P (\mathbf {p}, \mathbf {q}) = \frac {\exp (\beta C (\mathbf {p} , \mathbf {q}))}{\sum_ {\mathbf {q} ^ {\prime}} \exp (\beta C (\mathbf {p} , \mathbf {q} ^ {\prime}))}, \tag {2}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where we denote by $P$ a matching probability, a 4D tensor of size $h \times w \times h \times w$ , and $\beta$ is a temperature parameter. Note that we can establish dense correspondences explicitly from RGB to IR images, by applying an argmax operator to the matching probabilities for each RGB feature, i.e., $\operatorname{argmax}_{\mathbf{q}} P(\mathbf{p}, \mathbf{q})$ . This offers reliable cross-modal correspondences for semantically similar regions, but aligning IR and RGB features using the hard correspondences is problematic. The correspondences are easily distracted by background clutter and image-specific details (e.g., texture and occlusion), and appearance variations between RGB and IR images are even more significant. Moreover, we could not establish correspondences between different background regions, e.g., from person images captured with different surrounding environments. To alleviate these problems, we instead exploit the matching probabilities, and align IR and RGB features between foreground
|
| 89 |
+
|
| 90 |
+
regions only, typically correspond to persons, via soft warping as follows:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\hat {\mathbf {f}} _ {\mathrm {R G B}} (\mathbf {p}) = \tag {3}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
M _ {\mathrm {R G B}} (\mathbf {p}) \mathcal {W} (\mathbf {f} _ {\mathrm {I R}} (\mathbf {p})) + (1 - M _ {\mathrm {R G B}} (\mathbf {p})) \mathbf {f} _ {\mathrm {R G B}} (\mathbf {p}),
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where we denote by $\hat{\mathbf{f}}_{\mathrm{RGB}} \in \mathbb{R}^{h \times w \times d}$ and $M_{\mathrm{RGB}} \in \mathbb{R}^{h \times w}$ a reconstructed RGB feature by the IR-to-RGB alignment and a person mask, respectively. We denote by $\mathcal{W}$ a soft warping operator that aggregates features using the matching probabilities, defined as follows:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathcal {W} (\mathbf {f} _ {\mathrm {I R}} (\mathbf {p})) = \sum_ {\mathbf {q}} P (\mathbf {p}, \mathbf {q}) \mathbf {f} _ {\mathrm {I R}} (\mathbf {q}). \tag {4}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
The person mask ensures that the features $\hat{\mathbf{f}}_{\mathrm{RGB}}$ , for person regions are reconstructed by aggregating IR features in a probabilistic way, while others come from original RGB features $\mathbf{f}_{\mathrm{RGB}}$ . This reconstruction together with ID consistency and dense triplet losses encourages our model to provide similar person representations, regardless of image modalities, for the corresponding regions. To infer the mask without ground-truth labels, we assume that features, learned with ID labels for the reID task, are highly activated on person regions than other parts, and compute an activation map based on L2 norms of the local feature vectors, denoted by $\mathbf{g}_{\mathrm{RGB}} \in \mathbb{R}^{h \times w}$ for an RGB feature, as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathbf {g} _ {\mathrm {R G B}} (\mathbf {p}) = \left\| \mathbf {f} _ {\mathrm {R G B}} (\mathbf {p}) \right\| _ {2}. \tag {5}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
With the activation map of an RGB feature, $\mathbf{g}_{\mathrm{RGB}}$ , at hand, we define a person mask for an RGB feature as follows:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
M _ {\mathrm {R G B}} = f \left(\mathbf {g} _ {\mathrm {R G B}}\right), \tag {6}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where $f$ performs min-max normalization:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
f (\mathbf {x}) = \frac {\mathbf {x} - \operatorname* {m i n} (\mathbf {x})}{\operatorname* {m a x} (\mathbf {x}) - \operatorname* {m i n} (\mathbf {x})}. \tag {7}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
The CMAlign, which is a non-parametric module that operates directly on the features obtained from the feature extractor, facilitates learning robust person representations by providing the following advantages in VI-reID: First, a cross-modal alignment helps to alleviate the discrepancies between RGB and IR images in a pixel-level, allowing to suppress modality-related features from person representations more effectively, even with misaligned person images; Second, a dense alignment allows our network to focus on learning local features, especially for person regions, further enhancing the discriminative power of person representations. Note that a pair of RGB and IR images does not have to be of the same identity in our framework, enabling exploiting both positive and negative pairs for training.
|
| 125 |
+
|
| 126 |
+
# 3.3. Loss
|
| 127 |
+
|
| 128 |
+
We exploit ground-truth ID labels of person images to train our model with an overall objective function as follows:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\mathcal {L} = \mathcal {L} _ {\mathrm {I D}} + \lambda_ {\mathrm {I C}} \mathcal {L} _ {\mathrm {I C}} + \lambda_ {\mathrm {D T}} \mathcal {L} _ {\mathrm {D T}}, \tag {8}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $\mathcal{L}_{\mathrm{ID}}$ , $\mathcal{L}_{\mathrm{IC}}$ and $\mathcal{L}_{\mathrm{DT}}$ are ID, ID consistency, and dense triplet losses, respectively. $\lambda_{\mathrm{IC}}$ and $\lambda_{\mathrm{DT}}$ are hyperparameters to balance corresponding terms. In the following, we present a detailed description of each term in the loss.
|
| 135 |
+
|
| 136 |
+
ID loss $(\mathcal{L}_{\mathrm{ID}})$ . As an ID loss, we adopt a sum of classification and hard triplet losses [12] using image-level person representations, which have shown the effectiveness on learning discriminative person features in single-modality person reID. We denote by $\phi(\mathbf{f}_{\mathrm{RGB}}) \in \mathbb{R}^d$ and $\phi(\mathbf{f}_{\mathrm{IR}}) \in \mathbb{R}^d$ image-level person representations for the RGB and IR features, respectively, which are obtained by applying a GeM pooling operation [26] to each feature. To compute the classification term, we feed each image-level feature, $\phi(\mathbf{f}_{\mathrm{RGB}})$ and $\phi(\mathbf{f}_{\mathrm{IR}})$ , into a same classifier to predict class probabilities, that is, likelihoods of being particular identities for the image-level feature, where the classifier consists of a Batch Normalization layer [14], followed by a fully-connected layer with a softmax activation [22]. We then compute a cross-entropy between the class probabilities and ground-truth identities. The hard triplet term is also computed using image-level person representations, obtained from anchor, positive, and negative images, where the anchor and positive ones share the same ID label, while other pairs do not. Note that the ID loss does not address the cross-modal discrepancies between RGB and IR images explicitly.
|
| 137 |
+
|
| 138 |
+
ID consistency loss $(\mathcal{L}_{\mathrm{IC}})$ . We design a term to consider the cross-modal discrepancies between RGB and IR features in an image-level. Suppose that we have a positive pair with the same identity but having different modalities, i.e., RGB and IR images are of the same identity. The features $\hat{\mathbf{f}}_{\mathrm{RGB}}$ for person regions are reconstructed by aggregating IR features $\mathbf{f}_{\mathrm{IR}}$ , suggesting that the identity of the reconstruction $\hat{\mathbf{f}}_{\mathrm{RGB}}$ should be the same as ground-truth identity for the original features $\mathbf{f}_{\mathrm{RGB}}$ and $\mathbf{f}_{\mathrm{IR}}$ . More specifically, image-level representations of $\phi(\hat{\mathbf{f}}_{\mathrm{RGB}})$ and $\phi(\hat{\mathbf{f}}_{\mathrm{IR}})$ should have the same ID labels as corresponding positive counterparts of different modalities, $\mathbf{f}_{\mathrm{IR}}$ and $\mathbf{f}_{\mathrm{RGB}}$ , respectively. To implement this idea, we define an ID consistency loss as a cross-entropy using image-level representations, similar to the classification term in the ID loss. We instead exploit reconstructed features, $\phi(\hat{\mathbf{f}}_{\mathrm{RGB}})$ and $\phi(\hat{\mathbf{f}}_{\mathrm{IR}})$ . Note that we use the same classifier as in the ID loss. The ID consistency loss enforces ID predictions from person images of the same identity but with different modalities to be consistent, allowing to suppress modality-related features from person representations. Moreover, the reconstructions, $\phi(\hat{\mathbf{f}}_{\mathrm{RGB}})$ and $\phi(\hat{\mathbf{f}}_{\mathrm{IR}})$ provide an effect of offering additional samples to train the classifier, further guiding the discriminative person representation learning.
|
| 139 |
+
|
| 140 |
+
Dense triplet loss $(\mathcal{L}_{\mathrm{DT}})$ . The ID loss facilitates learning discriminative person representations, and the ID con
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 3: Visualization of person masks for IR and RGB images, $M_{\mathrm{IR}}$ (left) and $M_{\mathrm{RGB}}$ (right), and a corresponding co-attention map, $A_{\mathrm{IR}}$ (middle). We overlay the masks and the attention map over corresponding images from SYSU-MM01 [36]. We can see that the IR image depicts a person with fully visible body parts, whereas the person of the same identity in the RGB image is partially occluded (lower body). The co-attention map highlights image regions that are mutually visible in both images and suppresses others using dense cross-modal alignments via soft warping. (Best viewed in color.)
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
|
| 151 |
+
sistency term alleviates the cross-modal discrepancies explicitly. They, however, focus on learning image-level person representations, which prohibits discriminative feature learning, especially when the person images are occluded or misaligned. To address this problem, we introduce a dense triplet loss. It locally compares original features and reconstructed ones using the features of different modalities, encouraging final image-level person representations to be discriminative, while alleviating the cross-modal discrepancies in a pixel-level. A straight-forward approach is to compute L2 distances between local features, which is, however, suboptimal in that this does not take occluded regions into consideration. This is particularly problematic when each of person images in a pair depicts disassociated human parts. Enforcing local alignments between the entire person regions in this case is infeasible, and maybe even harmful. To circumvent this issue, we incorporate a coattention map highlighting person regions visible in both RGB and IR images. This considers feature alignments within mutually visible foreground regions only to compute the dense triplet loss. We define a co-attention map, denoted by $A_{\mathrm{RGB}} \in \mathbb{R}^{h \times w}$ for an RGB image, as follows:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
A _ {\mathrm {R G B}} (\mathbf {p}) = M _ {\mathrm {R G B}} (\mathbf {p}) \mathcal {W} \left(M _ {\mathrm {I R}} (\mathbf {p})\right). \tag {9}
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
For $\mathcal{W}(M_{\mathrm{IR}}(\mathbf{p}))$ , in this case, we compute the matching probabilities $P$ between $\mathbf{f}_{\mathrm{RGB}}$ and $\mathbf{f}_{\mathrm{IR}}$ , similar to (4), whereas the person masks are exploited for soft warping. Namely, the co-attention map $A_{\mathrm{RGB}}$ is an intersection of the RGB person mask $M_{\mathrm{RGB}}(\mathbf{p})$ and the warped IR one, w.r.t the RGB image, $\mathcal{W}(M_{\mathrm{IR}}(\mathbf{p}))$ . We compute a coattention map for an IR image similarly, and show in Fig. 3 an example of a co-attention map. Note that we define coattention maps between positive pairs of the same identity
|
| 158 |
+
|
| 159 |
+
only. Note also that we perform min-max normalization $f$ on the obtained co-attention map, which we omit for notational brevity.
|
| 160 |
+
|
| 161 |
+
To facilitate training with the dense triplet term, we sample a triplet of anchor, positive, and negative images, where the anchor and other two images have different modalities $e.g.$ , an RGB image for the anchor, and IR images for a pair of positive and negative samples. We use the superscripts, a, p, and n to indicate features from anchor, positive, and negative images, respectively. For example, we denote by $\hat{\mathbf{f}}_{\mathrm{RGB}}^{\mathrm{p}}$ a reconstructed RGB feature using an anchor $\mathbf{f}_{\mathrm{RGB}}^{\mathrm{a}}$ and a positive pair $\mathbf{f}_{\mathrm{IR}}^{\mathrm{p}}$ with the same identity as the anchor $\mathbf{f}_{\mathrm{RGB}}^{\mathrm{a}}$ . Similarly, $\hat{\mathbf{f}}_{\mathrm{IR}}^{\mathrm{n}}$ is a reconstructed IR feature using an anchor $\mathbf{f}_{\mathrm{IR}}^{\mathrm{a}}$ and a negative pair $\mathbf{f}_{\mathrm{RGB}}^{\mathrm{n}}$ with the different identity from the anchor $\mathbf{f}_{\mathrm{IR}}^{\mathrm{a}}$ . With co-attention maps at hand, we define the dense triplet loss as follows:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\mathcal {L} _ {\mathrm {D T}} = \sum_ {i \in \{\text {R G B , I R} \}} \sum_ {\mathbf {p}} A _ {i} (\mathbf {p}) \left[ d _ {i} ^ {+} (\mathbf {p}) - d _ {i} ^ {-} (\mathbf {p}) + \alpha \right] _ {+}, \tag {10}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
where $\alpha$ is a pre-defined margin and the operation $[\cdot]_{+}$ indicates $\max(0, \cdot)$ . $d_{i}^{+}(\mathbf{p})$ and $d_{i}^{-}(\mathbf{p})$ compute local distances between an anchor feature and reconstructed ones from positive and negative images, respectively, as follows:
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
d _ {i} ^ {+} (\mathbf {p}) = \left\| \mathbf {f} _ {i} ^ {\mathrm {a}} (\mathbf {p}) - \hat {\mathbf {f}} _ {i} ^ {\mathrm {p}} (\mathbf {p}) \right\| _ {2}, d _ {i} ^ {-} (\mathbf {p}) = \left\| \mathbf {f} _ {i} ^ {\mathrm {a}} (\mathbf {p}) - \hat {\mathbf {f}} _ {i} ^ {\mathrm {n}} (\mathbf {p}) \right\| _ {2}. \tag {11}
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
Note that the reconstructions, $\hat{\mathbf{f}}_i^{\mathrm{p}}$ and $\hat{\mathbf{f}}_i^{\mathrm{n}}$ , are the aggregations of similar features w.r.t the anchor $\mathbf{f}_i^{\mathrm{a}}$ from positive and negative images, respectively. We can thus interpret that our loss enforces an aggregation of similar features from negative images to be distant in the embedding space, compared to its positive counterpart by a margin. This is similar to the typical triplet loss [12, 30], but ours penalizes incorrect distances for all local features visible in both anchor and positive images in a soft manner. Note that this local association is possible due to the CMAAlign module that performs the dense cross-modal alignment between RGB and IR person images in a probabilistic way.
|
| 174 |
+
|
| 175 |
+
# 4. Experiments
|
| 176 |
+
|
| 177 |
+
In this section, we present a detailed analysis and evaluation of our approach including ablation studies on different losses and network architectures.
|
| 178 |
+
|
| 179 |
+
# 4.1. Implementation details
|
| 180 |
+
|
| 181 |
+
Dataset. We use two benchmarks for evaluation: 1) The RegDB dataset [24] contains 412 persons, where each person has 10 visible and 10 far-infrared images collected by dual camera systems. Following the experimental protocol in [24], we divide the dataset into training and test splits randomly, each of which includes non-overlapping 206 identities. We test our model in both visible-to-IR and IR-to-visible settings, which correspond to retrieving IR images
|
| 182 |
+
|
| 183 |
+
from RGB ones and RGB images from IR ones, respectively, and report the results averaged over 10 trials with different training/test splits. 2) SYSU-MM01 [36] is a large-scale dataset for VI-reID, consisting of RGB and IR images obtained by four visible and two near-infrared sensors, respectively. Concretely, it contains 22,258 visible and 11,909 near-infrared images with 395 identities for training. The test set contains 96 identities with 3,803 near-infrared images for a query set and 301 visible images for a gallery set. We adopt the evaluation protocol in [36], which uses all-search and indoor-search modes for testing, where the gallery sets for the former and the latter contain images captured by all four and two indoor visible cameras, respectively. Note that all our results are obtained by taking an average value over 4 training and test runs.
|
| 184 |
+
|
| 185 |
+
Training. Following the previous VI-reID methods [3, 21, 39], we adopt ResNet50 [10], trained for ImageNet classification [5], as our backbone network. The backbone networks for visible and infrared images share the parameters, except for the first residual blocks that take images of different modalities, and the stride of the last convolutional block is set to 1. We resize each person image to the size of 288 $\times$ 144, and apply horizontal flipping for data augmentation. We set the size of a person representation $d$ to 2,048. For a mini-batch, we randomly choose 8 identities from each modality and sample 4 person images for each identity. We train our model for 80 epochs with a batch size of 64, using the SGD optimizer with momentum of 0.9 and weight decay of 5e-4. We use a warm-up strategy [22], gradually raising learning rates for the backbones and other parts of the network up to 1e-2 and 1e-1, respectively, which are then decayed by a factor of 10 at the 20th and 50th epochs. We use a grid search to set hyper-parameters: $\lambda_{\mathrm{IC}} = 1$ , $\lambda_{\mathrm{DT}} = 0.5$ , $\alpha = 0.3$ , $\beta = 50$ . Note that we employ BNN trick [22] during training only, exploiting ResNet50 [10] at test time without any additional parameters. We implement our model with PyTorch [25] and train it end-to-end, taking about 6 and 8 hours for RegDB [24] and SYSU-MM01 [36], respectively, with a Geforce RTX 2080 Ti GPU.
|
| 186 |
+
|
| 187 |
+
# 4.2. Results
|
| 188 |
+
|
| 189 |
+
Comparison with the state of the art. We present in Table 1 a quantitative comparison of our method with the state of the art for VI-reID [3, 4, 17, 21, 34, 35, 36, 37, 38, 39]. We report mean average precision (mAP) (\%) and rank-1 accuracy (\%) for a single-shot setting on RegDB [24] and SYSU-MM01 [36]. From the table, we can see that our model sets a new state of the art for VI-reID, except for an indoor-search mode on SYSU-MM01 [36], where DDAG [39] shows better results. This method, however, requires additional parameters, other than the ResNet50 [10] backbone, for a feature refinement with self-attention at test
|
| 190 |
+
|
| 191 |
+
Table 1: Quantitative comparison with the state of the art for VI-reID. We measure mAP (%) and rank-1 accuracy (%) on the RegDB [24] and SYSU-MM01 [36] datasets and report the average and standard deviations over 4 training and test runs. Numbers in bold indicate the best performance and underscored ones indicate the second best.
|
| 192 |
+
|
| 193 |
+
<table><tr><td rowspan="3">Methods</td><td colspan="4">RegDB [24]</td><td colspan="4">SYSU-MM01 [36]</td></tr><tr><td colspan="2">Visible to Infrared</td><td colspan="2">Infrared to Visible</td><td colspan="2">All-search</td><td colspan="2">Indoor-search</td></tr><tr><td>mAP</td><td>rank-1</td><td>mAP</td><td>rank-1</td><td>mAP</td><td>rank-1</td><td>mAP</td><td>rank-1</td></tr><tr><td>One-stream [36]</td><td>14.02</td><td>13.11</td><td>-</td><td>-</td><td>13.67</td><td>12.04</td><td>22.95</td><td>16.94</td></tr><tr><td>Two-stream [36]</td><td>13.42</td><td>12.43</td><td>-</td><td>-</td><td>12.85</td><td>11.65</td><td>21.49</td><td>15.60</td></tr><tr><td>Zero-Pad [36]</td><td>18.90</td><td>17.75</td><td>17.82</td><td>16.63</td><td>15.95</td><td>14.80</td><td>26.92</td><td>20.58</td></tr><tr><td>TONE [37]</td><td>14.92</td><td>16.87</td><td>-</td><td>-</td><td>14.42</td><td>12.52</td><td>26.38</td><td>20.82</td></tr><tr><td>HCML [37]</td><td>20.08</td><td>24.44</td><td>22.24</td><td>21.70</td><td>16.16</td><td>14.32</td><td>30.08</td><td>24.52</td></tr><tr><td>cmGAN [4]</td><td>-</td><td>-</td><td>-</td><td>-</td><td>31.49</td><td>26.97</td><td>42.19</td><td>31.63</td></tr><tr><td>BDTR [38]</td><td>32.76</td><td>33.56</td><td>31.96</td><td>32.92</td><td>27.32</td><td>27.32</td><td>41.86</td><td>31.92</td></tr><tr><td>D²RL [35]</td><td>44.10</td><td>43.40</td><td>-</td><td>-</td><td>29.20</td><td>28.90</td><td>-</td><td>-</td></tr><tr><td>AlignGAN [34]</td><td>53.60</td><td>57.90</td><td>53.40</td><td>56.30</td><td>40.70</td><td>42.40</td><td>54.30</td><td>45.90</td></tr><tr><td>Xmodal [17]</td><td>60.18</td><td>62.21</td><td>61.80</td><td>68.06</td><td>50.73</td><td>49.92</td><td>-</td><td>-</td></tr><tr><td>Hi-CMD [3]</td><td>66.04</td><td>70.93</td><td>-</td><td>-</td><td>35.94</td><td>34.94</td><td>-</td><td>-</td></tr><tr><td>cm-SSFT [21]</td><td>63.00</td><td>62.20</td><td>-</td><td>-</td><td>52.10</td><td>52.40</td><td>-</td><td>-</td></tr><tr><td>DDAG [39]</td><td>63.46</td><td>69.34</td><td>61.80</td><td>68.06</td><td>53.02</td><td>54.75</td><td>67.98</td><td>61.02</td></tr><tr><td>Ours</td><td>67.64 ± 0.08</td><td>74.17 ± 0.04</td><td>65.46 ± 0.18</td><td>72.43 ± 0.42</td><td>54.14 ± 0.33</td><td>55.41 ± 0.18</td><td>66.33 ± 1.27</td><td>58.46 ± 0.67</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 2: Comparison of the average runtime for extracting a final person representation and the number of parameters required at test time.
|
| 196 |
+
|
| 197 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">Model size (M)</td><td colspan="2">Runtime (ms)</td></tr><tr><td>RGB</td><td>IR</td><td>RGB</td><td>IR</td></tr><tr><td>AlignGAN [34]</td><td>30.71</td><td>24.66</td><td>7.57</td><td>3.32</td></tr><tr><td>Hi-CMD [3]</td><td>52.63</td><td>52.63</td><td>4.43</td><td>4.43</td></tr><tr><td>DDAG [39]</td><td>40.32</td><td>40.32</td><td>2.03</td><td>2.03</td></tr><tr><td>Ours</td><td>23.52</td><td>23.52</td><td>1.90</td><td>1.90</td></tr></table>
|
| 198 |
+
|
| 199 |
+
time, while being outperformed by ours in other benchmarks. We can also see that our model achieves better results than $\mathrm{cm - SSFT}^1$ [21] by a significant margin on both datasets. Note that cm-SSFT [21] uses multiple RGB and IR images to extract person representations, even at test time. That is, it exploits additional images of different modalities, e.g., multiple IR images to extract features from an RGB input. cm-SSFT [21] is thus computationally expensive, and requires a lot of memory. Overall, the experimental results on the standard benchmarks demonstrate that our approach provides person representations robust to the cross-modal discrepancies and intra-class variations across RGB and IR images. Qualitative comparisons along with rank-10 accuracy (\%) can be found in the supplementary material.
|
| 200 |
+
|
| 201 |
+
Parameter and runtime analysis. We compare in Table 2 the average runtime to extract a final person representation. For fair comparison, we measure the average runtime over 50 executions, for person images of the size $288 \times 144$ on the same machine with a Geforce RTX 2080
|
| 202 |
+
|
| 203 |
+
Table 3: Quantitative comparison for variants of our model on the SYSU-MM01 dataset [36] (All-search mode).
|
| 204 |
+
|
| 205 |
+
<table><tr><td>\( \mathcal{L}_{\text{IC}} \)</td><td>\( \mathcal{L}_{\text{DT}} \)</td><td>A</td><td>Layer</td><td>mAP</td><td>rank-1</td></tr><tr><td>X</td><td>X</td><td>-</td><td>-</td><td>49.54</td><td>50.43</td></tr><tr><td>✓</td><td>X</td><td>-</td><td>4, 5</td><td>52.88</td><td>54.44</td></tr><tr><td>X</td><td>✓</td><td>X</td><td>4, 5</td><td>50.08</td><td>50.38</td></tr><tr><td>X</td><td>✓</td><td>✓</td><td>4, 5</td><td>51.23</td><td>51.06</td></tr><tr><td>✓</td><td>✓</td><td>X</td><td>4, 5</td><td>52.78</td><td>53.44</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>4</td><td>53.02</td><td>54.63</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>5</td><td>53.81</td><td>54.66</td></tr><tr><td>✓</td><td>✓</td><td>✓</td><td>4, 5</td><td>54.14</td><td>55.41</td></tr></table>
|
| 206 |
+
|
| 207 |
+
Ti GPU. Table 2 also compares the number of network parameters required at test time. Our method is fastest among the state of the art, and uses the smallest number of parameters, as it does not use any additional parameters, except the ones for a backbone network, at test time. Other methods on the contrary exploit additional layers or networks.
|
| 208 |
+
|
| 209 |
+
# 4.3. Discussion
|
| 210 |
+
|
| 211 |
+
Ablation study. We show in Table 3 an ablation analysis on training losses and the CMAAlign module. We train variants of our model using different combinations of loss terms, $\mathcal{L}_{\mathrm{IC}}$ and $\mathcal{L}_{\mathrm{DT}}$ , and co-attention map $A$ , while adding CMAAlign modules to different layers of the backbone network. We compare the performance in terms of mAP and rank-1 accuracy on SYSU-MM01 [36] under the all-search mode. For the baseline model in the first row, we exclude the CMAAlign module and train it using the ID loss alone. Overall, we can see that the baseline shows the worst performance, indicating that incorporating the CMAAlign module is beneficial for VI-reID. For example, exploiting the CMAAlign module with either the ID consistency term (the second
|
| 212 |
+
|
| 213 |
+
row) or the dense triplet term coupled with the co-attention map (the fourth row) boosts the performance significantly. This is because the ID consistency term mainly addresses cross-modal discrepancies in an image-level and the dense triplet term handles them in a pixel-level, while further enhancing the discriminative power of person representations. From the second, fourth, and last rows, we can observe that using all losses and the co-attention map gives the best results, suggesting that they are complementary to each other. Note that the co-attention map is particularly important for the dense triplet term, as shown in the fifth and last rows. Computing the loss on distinctive regions (e.g., occlusions and background clutter) may hinder learning discriminative representations. We also compare in the last three rows our models involving the CMAAlign modules in different layers of the backbone network, where the modules are added on top of conv4-6 and/or conv5-3 of ResNet50 [10]. We can see that adding the modules to both conv4-6 and conv5-3 gives the best results, as this allows to consider cross-modal discrepancies in multiple levels of features.
|
| 214 |
+
|
| 215 |
+
Visualizations of dense correspondences. We show in Fig. 4 examples of cross-modal correspondences between RGB and IR images on SYSU-MM01 [36]. We can see that the matches are established well between persons of the same identity, and they are not influenced by cross-modal discrepancies, appearance variations, and background clutter. Specifically, our model provides local features that are robust against scale variations (Fig. 4(a)) and occlusions (Fig. 4(b)). This implies that our model is able to extract discriminative person representations with rich semantics, which are important for the person reID task, while alleviating the cross-modal discrepancies. In particular, our model offers local features that are robust to viewpoint variations (Fig. 4(c)), where a person's sweatshirt or trousers often matches to its pair regardless of front or side view. This indicates that our network provides local person features that are robust to viewpoint variations, which is particularly useful for VI-reID. This aspect of correspondences for reID is in contrast to typical correspondence tasks, e.g., stereo matching and optical flow estimation, that favor viewpoint-specific matches. We also provide in Fig. 5 a visual comparison of correspondences for different configurations of losses. Our model trained with the ID loss alone is unable to establish reliable matches between cross-modal images and easily distracted by background clutter (Fig. 5(a)), mainly due to cross-modal discrepancies and a lack of discriminative power in local feature representations, particularly for person regions. The ID consistency loss handles the cross-modal discrepancies, establishing correspondences between local person representations from different modalities (Fig. 5(b)). The dense triplet loss further encourages each local feature to be discriminative, which in turn offers matching results focusing on person re
|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
(a) Scale variation
|
| 219 |
+
|
| 220 |
+

|
| 221 |
+
(b) Occlusion
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
(c) Viewpoint variation
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
Figure 4: Visualization of correspondences between RGB and IR images on SYSU-MM01 [36]. We show the top 20 matches chosen by matching probabilities. Our local person representations are robust to scale variations (a), occlusion (b), and viewpoint variations (c). (Best viewed in color.)
|
| 228 |
+
(a) $\mathcal{L}_{\mathrm{ID}}$
|
| 229 |
+
Figure 5: Visual comparison of correspondences for different configurations of losses: (a) $\mathcal{L}_{\mathrm{ID}}$ ; (b) $\mathcal{L}_{\mathrm{ID}} + \mathcal{L}_{\mathrm{IC}}$ ; (c) $\mathcal{L}_{\mathrm{ID}} + \mathcal{L}_{\mathrm{IC}} + \mathcal{L}_{\mathrm{DT}}$ . Our models in (b-c) exploit CMAAlign modules. ID consistency and dense triplet terms help to alleviate the cross-modal discrepancies between RGB and IR images, while further enhancing the discriminative power of person features. (Best viewed in color.)
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
(b) $\mathcal{L}_{\mathrm{ID}} + \mathcal{L}_{\mathrm{IC}}$
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
(c) $\mathcal{L}_{\mathrm{ID}} + \mathcal{L}_{\mathrm{IC}} + \mathcal{L}_{\mathrm{DT}}$
|
| 236 |
+
|
| 237 |
+
gions (Fig. 5(c)). The features trained by leveraging dense cross-modal correspondences are more discriminative, establishing matches focusing on person regions, while being robust to the cross-modal discrepancies. More examples can be found in the supplementary material.
|
| 238 |
+
|
| 239 |
+
# 5. Conclusion
|
| 240 |
+
|
| 241 |
+
We have introduced a novel feature learning framework for VI-reID that exploits dense correspondences between cross-modal person images, allowing to learn person representations that are robust to intra-class variations and cross-modal discrepancies across RGB and IR person images. We have also proposed ID consistency and dense triplet losses exploiting pixel-level associations, enabling our model to learn more discriminative person representations. We set a new state of the art on standard benchmarks, outperforming other VI-reID methods by a significant margin. Extensive experimental results clearly demonstrate the effectiveness of our approach.
|
| 242 |
+
|
| 243 |
+
Acknowledgements. This research was partly supported by R&D program for Advanced Integrated-intelligence for Identification (AIID) through the National Research Foundation of KOREA (NRF) funded by Ministry of Science and ICT (NRF2018M3E3A1057289), Institute for Information and Communications Technology Promotion (IITP) funded by the Korean Government (MSIP) under Grant 2016-0-00197, and Yonsei University Research Fund of 2021 (2021-22-0001).
|
| 244 |
+
|
| 245 |
+
# References
|
| 246 |
+
|
| 247 |
+
[1] Cristhian A Aguilera, Francisco J Aguilera, Angel D Sappa, Cristhian Aguilera, and Ricardo Toledo. Learning cross-spectral similarity measures with deep convolutional neural networks. In CVPR Workshop, 2016. 3
|
| 248 |
+
[2] Thomas Brox and Jitendra Malik. Large displacement optical flow: Descriptor matching in variational motion estimation. IEEE TPAMI, 2010. 3
|
| 249 |
+
[3] Seokeon Choi, Sumin Lee, Youngeun Kim, Taekyung Kim, and Changick Kim. Hi-CMD: Hierarchical cross-modality disentanglement for visible-infrared person re-identification. In CVPR, 2020. 1, 3, 6, 7
|
| 250 |
+
[4] Pingyang Dai, Rongrong Ji, Haibin Wang, Qiong Wu, and Yuyu Huang. Cross-modality person re-identification with generative adversarial training. In *IJCAI*, 2018. 1, 3, 6, 7
|
| 251 |
+
[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In CVPR, 2009. 6
|
| 252 |
+
[6] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick Van Der Smagt, Daniel Cremers, and Thomas Brox. FlowNet: Learning optical flow with convolutional networks. In ICCV, 2015. 3
|
| 253 |
+
[7] Zhanxiang Feng, Jianhuang Lai, and Xiaohua Xie. Learning modality-specific representations for visible-infrared person re-identification. IEEE TIP, 2019. 1, 2
|
| 254 |
+
[8] Yang Fu, Yunchao Wei, Yuqian Zhou, Honghui Shi, Gao Huang, Xinchao Wang, Zhiqiang Yao, and Thomas Huang. Horizontal pyramid matching for person re-identification. In AAAI, 2019. 2
|
| 255 |
+
[9] Yixiao Ge, Zhuowan Li, Haiyu Zhao, Guojun Yin, Shuai Yi, Xiaogang Wang, et al. FD-GAN: Pose-guided feature distilling GAN for robust person re-identification. In NeurIPS, 2018. 2
|
| 256 |
+
[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6, 8
|
| 257 |
+
[11] Mingming He, Dongdong Chen, Jing Liao, Pedro V Sander, and Lu Yuan. Deep exemplar-based colorization. ACM TOG, 2018. 3
|
| 258 |
+
[12] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. 2, 3, 5, 6
|
| 259 |
+
[13] Asmaa Hosni, Christoph Rhemann, Michael Bleyer, Carsten Rother, and Margrit Gelautz. Fast cost-volume filtering for visual correspondence and beyond. IEEE TPAMI, 2012. 3
|
| 260 |
+
[14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 5
|
| 261 |
+
[15] Mahdi M Kalayeh, Emrah Basaran, Muhittin Gokmen, Mustafa E Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In CVPR, 2018. 2, 4
|
| 262 |
+
[16] Angjoo Kanazawa, David W Jacobs, and Manmohan Chandraker. WarpNet: Weakly supervised matching for single-view reconstruction. In CVPR, 2016. 3
|
| 263 |
+
[17] Diangang Li, Xing Wei, Xiaopeng Hong, and Yihong Gong. Infrared-visible cross-modal person re-identification with an x modality. In AAAI, 2020. 6, 7
|
| 264 |
+
|
| 265 |
+
[18] Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In CVPR, 2018. 2
|
| 266 |
+
[19] Yutian Lin, Liang Zheng, Zhedong Zheng, Yu Wu, Zhilan Hu, Chenggang Yan, and Yi Yang. Improving person re-identification by attribute and identity learning. PR, 2019. 2
|
| 267 |
+
[20] Fangcen Liu, Chenqiang Gao, Yongqing Sun, Yue Zhao, Feng Yang, Anyong Qin, and Deyu Meng. Infrared and visible cross-modal image retrieval through shared features. IEEE TCSVT, 2021. 3
|
| 268 |
+
[21] Yan Lu, Yue Wu, Bin Liu, Tianzhu Zhang, Baopu Li, Qi Chu, and Nenghai Yu. Cross-modality person re-identification with shared-specific feature transfer. In CVPR, 2020. 6, 7
|
| 269 |
+
[22] Hao Luo, Youzhi Gu, Xingyu Liao, Shenqi Lai, and Wei Jiang. Bag of tricks and a strong baseline for deep person re-identification. In CVPR Workshop, 2019. 5, 6, 7
|
| 270 |
+
[23] Jiaxu Miao, Yu Wu, Ping Liu, Yuhang Ding, and Yi Yang. Pose-guided feature alignment for occluded person re-identification. In ICCV, 2019. 2, 4
|
| 271 |
+
[24] Dat Tien Nguyen, Hyung Gil Hong, Ki Wan Kim, and Kang Ryoung Park. Person recognition system based on a combination of body images from visible light and thermal cameras. Sensors, 2017. 6, 7
|
| 272 |
+
[25] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. 2017. 6
|
| 273 |
+
[26] Filip Radenovic, Giorgos Tolias, and Ondrej Chum. Finetuning CNN image retrieval with no human annotation. IEEE TPAMI, 2018. 5
|
| 274 |
+
[27] Aneeshan Sain, Ayan Kumar Bhunia, Yongxin Yang, Tao Xiang, and Yi-Zhe Song. Stylemeup: Towards style-agnostic sketch-based image retrieval. In CVPR, 2021. 3
|
| 275 |
+
[28] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NeurIPS, 2016. 3
|
| 276 |
+
[29] Patsorn Sangkloy, Nathan Burnell, Cusuh Ham, and James Hays. The sketchy database: learning to retrieve badly drawn bunnies. ACM TOG, 2016. 3
|
| 277 |
+
[30] Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. 6
|
| 278 |
+
[31] Yantao Shen, Tong Xiao, Hongsheng Li, Shuai Yi, and Xiaogang Wang. End-to-end deep kronecker-product matching for person re-identification. In CVPR, 2018. 3
|
| 279 |
+
[32] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In ECCV, 2018. 2
|
| 280 |
+
[33] Guanshuo Wang, Yufeng Yuan, Xiong Chen, Jiwei Li, and Xi Zhou. Learning discriminative features with multiple granularities for person re-identification. In ACM MM, 2018. 2
|
| 281 |
+
[34] Guan'an Wang, Tianzhu Zhang, Jian Cheng, Si Liu, Yang Yang, and Zengguang Hou. RGB-infrared cross-modality person re-identification via joint pixel and feature alignment. In ICCV, 2019. 3, 6, 7
|
| 282 |
+
[35] Zhixiang Wang, Zheng Wang, Yinqiang Zheng, Yung-Yu Chuang, and Shin'ichi Satoh. Learning to reduce dual-level
|
| 283 |
+
|
| 284 |
+
discrepancy for infrared-visible person re-identification. In CVPR, 2019. 3, 6, 7
|
| 285 |
+
[36] Ancong Wu, Wei-Shi Zheng, Hong-Xing Yu, Shaogang Gong, and Jianhuang Lai. RGB-infrared cross-modality person re-identification. In ICCV, 2017. 1, 2, 4, 5, 6, 7, 8
|
| 286 |
+
[37] Mang Ye, Xiangyuan Lan, Jiawei Li, and Pong C Yuen. Hierarchical discriminative learning for visible thermal person re-identification. In AAAI, 2018. 1, 2, 6, 7
|
| 287 |
+
[38] Mang Ye, Xiangyuan Lan, Zheng Wang, and Pong C Yuen. Bi-directional center-constrained top-ranking for visible thermal person re-identification. IEEE TIFS, 2019. 6, 7
|
| 288 |
+
[39] Mang Ye, Jianbing Shen, David J. Crandall, Ling Shao, and Jiebo Luo. Dynamic dual-attentive aggregation learning for visible-infrared person re-identification. In ECCV, 2020. 1, 3, 6, 7
|
| 289 |
+
[40] Mang Ye, Jianbing Shen, Gaojie Lin, Tao Xiang, Ling Shao, and Steven CH Hoi. Deep learning for person re-identification: A survey and outlook. IEEE TPAMI, 2021. 1, 2, 4
|
| 290 |
+
[41] Mang Ye, Zheng Wang, Xiangyuan Lan, and Pong C Yuen. Visible thermal person re-identification via dual-constrained top-ranking. In *IJCAI*, 2018. 1, 2
|
| 291 |
+
[42] Sergey Zagoruyko and Nikos Komodakis. Learning to compare image patches via convolutional neural networks. In CVPR, 2015. 3
|
| 292 |
+
[43] Jure Zbontar and Yann LeCun. Stereo matching by training a convolutional neural network to compare image patches. JMLR, 2016. 3
|
| 293 |
+
[44] Bo Zhang, Mingming He, Jing Liao, Pedro V Sander, Lu Yuan, Amine Bermak, and Dong Chen. Deep exemplar-based video colorization. In CVPR, 2019. 3
|
| 294 |
+
[45] Zhizheng Zhang, Cuiling Lan, Wenjun Zeng, and Zhibo Chen. Densely semantically aligned person re-identification. In CVPR, 2019. 2
|
| 295 |
+
[46] Zhizheng Zhang, Cuiling Lan, Wenjun Zeng, Xin Jin, and Zhibo Chen. Relation-aware global attention for person re-identification. In CVPR, 2020. 2
|
| 296 |
+
[47] Liang Zheng, Yi Yang, and Alexander G Hauptmann. Person re-identification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. 1
|
| 297 |
+
[48] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In CVPR, 2019. 2
|
| 298 |
+
[49] Zhedong Zheng, Liang Zheng, and Yi Yang. A discriminatively learned CNN embedding for person re-identification. ACM TOMM, 2017. 2
|
| 299 |
+
[50] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In AAAI, 2020. 7
|
| 300 |
+
[51] Tinghui Zhou, Yong Jae Lee, Stella X Yu, and Alyosha A Efros. FlowWeb: Joint image set alignment by weaving consistent, pixel-wise correspondences. In CVPR, 2015. 3
|
| 301 |
+
[52] Kuan Zhu, Haiyun Guo, Zhiwei Liu, Ming Tang, and Jinqiao Wang. Identity-guided human semantic parsing for person re-identification. In ECCV, 2020. 2
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2439d6fca89620c820115e6db81438a7d02d6b6f5d1da978e6fe16686170315
|
| 3 |
+
size 372827
|
learningbyaligningvisibleinfraredpersonreidentificationusingcrossmodalcorrespondences/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c66e56f3db8f58da04d730d56fb4a666fb464fd0d30072eb6c9ee223a64b56e
|
| 3 |
+
size 391368
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b524a8794732a789c5ed1054dee9278e7a18de9e4df2a310aea642b45c3dc9a1
|
| 3 |
+
size 77081
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:901a8080e7b278d9aa730b32c37ac546dd7b033b43850be070dc37ca08eed476
|
| 3 |
+
size 96832
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/a52a64d2-29b0-4409-8985-64e23b45dcf7_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92136c9bdf6b647f4937c27509bcd66f36a57b282b0cb9378c176e0c77aeed0c
|
| 3 |
+
size 1199377
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/full.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning Conditional Knowledge Distillation for Degraded-Reference Image Quality Assessment
|
| 2 |
+
|
| 3 |
+
Heliang Zheng $^{1*}$ , Huan Yang $^{2}$ , Jianlong Fu $^{2}$ , Zheng-Jun Zha $^{1}$ , Jiebo Luo $^{3}$
|
| 4 |
+
|
| 5 |
+
<sup>1</sup>University of Science and Technology of China, Hefei, China
|
| 6 |
+
|
| 7 |
+
$^{2}$ Microsoft Research, Beijing, China
|
| 8 |
+
|
| 9 |
+
<sup>3</sup>University of Rochester, Rochester, NY
|
| 10 |
+
|
| 11 |
+
zhenghl@mail.ustc.edu.cn, {huayan, jianf} @microsoft.com, zhazj@ustc.edu.cn, jluo@cs.rochester.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
An important scenario for image quality assessment (IQA) is to evaluate image restoration (IR) algorithms. The state-of-the-art approaches adopt a full-reference paradigm that compares restored images with their corresponding pristine-quality images. However, pristine-quality images are usually unavailable in blind image restoration tasks and real-world scenarios. In this paper, we propose a practical solution named degraded-reference IQA (DR-IQA), which exploits the inputs of IR models, degraded images, as references. Specifically, we extract reference information from degraded images by distilling knowledge from pristine-quality images. The distillation is achieved through learning a reference space, where various degraded images are encouraged to share the same feature statistics with pristine-quality images. And the reference space is optimized to capture deep image priors that are useful for quality assessment. Note that pristine-quality images are only used during training. Our work provides a powerful and differentiable metric for blind IRs, especially for GAN-based methods. Extensive experiments show that our results can even be close to the performance of full-reference settings.
|
| 16 |
+
|
| 17 |
+
# 1. Introduction
|
| 18 |
+
|
| 19 |
+
Digital images may be subject to various quality degradations during processing, compression, transmission, etc. [36]. And image restoration (IR) algorithms are developed to improve the quality of degraded images [18, 35, 38, 41, 43, 46, 47]. A consequential question is how to assess the quality of restored images and evaluate IR algorithms. The state-of-the-art IQA approaches adopt a full-reference paradigm (FR-IQA), which learns to compare restored images with their corresponding pristine-quality im
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1. (a) Pristine-quality images can provide strong reference information for IQA. When pristine-quality images are unavailable, (b) directly regressing restored images to quality scores causes a dramatic drop in performance. To this end, (c) we propose to extract reference information from degraded images and make such a solution effective. FR, NR, DR, S, and SRCC indicate full-reference, no-reference, degraded-reference, quality score, and Spearman's Rank order Correlation Coefficients [30], respectively.
|
| 25 |
+
|
| 26 |
+
ages (as shown in Figure 1 (a)). FR-IQA algorithms have been widely adopted as IR evaluation metrics, e.g., PSNR, SSIM [36], and LPIPS [45]. However, they cannot be applied to blind image restoration tasks and real-world applications, where pristine-quality images are unavailable. In this paper, we study the problem of evaluating IR models without relying on pristine-quality images.
|
| 27 |
+
|
| 28 |
+
To evaluate IR models without pristine-quality images, no-reference IQA (NR-IQA) methods provide a solution, that is, directly regressing restored images to quality scores, i.e., mean opinion scores (MOS) [2, 13, 20, 32]. However, the absence of reference information makes the problem much more challenging and causes a dramatic drop in performance, e.g., 0.1409 SRCC (Spearman's Rank order Correlation Coefficients [30]) drops. This motivates us to seek available reference information. We find that the in
|
| 29 |
+
|
| 30 |
+
puts of IR models (i.e., degraded images) are usually free to be obtained, and it has been verified that degraded images also contain useful image priors like pristine-quality images for solving under-constrained problems in computer vision [25, 33]. To this end, we propose a new solution named degraded-reference IQA (DR-IQA). However, directly replacing the pristine-quality references of existing FR-IQA models [5] by degraded references causes 0.1239 SRCC drops, because the noises involved by various degradations make it difficult to mine and leverage reference information from degraded images.
|
| 31 |
+
|
| 32 |
+
To leverage degraded images and improve the effectiveness of DR-IQA, we propose a Conditional Knowledge Distillation Network (CKDN). As shown in Figure 2, CKDN consists of three modules, i.e., a degradation-tolerant embedding module (DTE), a quality-sensitive embedding module (QSE), and a convolutional score predictor (CSP). The DTE is the key module, which aims to effectively extract reference information for IQA from degraded images. Specifically, it learns a reference space, where various degraded images are optimized to share the same feature statistics with pristine-quality images. Such space is learned in the condition of conducting quality assessments with the QSE and CSP, where the QSE learns discriminative features from restored images, and the CSP maps feature differences to human-annotated scores. Moreover, we find that pre-training such conditions can help to learn quality-sensitive features and further advance the optimization of the reference space. In particular, we propose a relative score regression task that can enlarge the space of training data by creating data pairs.
|
| 33 |
+
|
| 34 |
+
We conduct extensive experiments to evaluate our proposed solution. It is shown that our proposed CKDN enables DR-IQA to achieve comparable performance to the full-reference setting on various IR tasks, e.g., traditional/GAN-based super-resolution, de-noising, etc. Moreover, we further study the influence of reference quality and the performance of current IQA methods on evaluating different IR tasks. We draw three conclusive insights: 1) our CKDN works well with a large range of degradation types, 2) reference images are extremely important for evaluating GAN-based images, and 3) current IQA methods can provide around $85\%$ reliable judgments for evaluating IR algorithms. Please refer to Section 5 for more details. Our main contributions can be summarized as follows: 1) To the best of our knowledge, we are the first to leverage degraded images for IQA. 2) We formulate this practical setting and propose an effective conditional knowledge distillation network to solve this problem. 3) Extensive analyses show that degraded references are of great help for evaluating GAN-based images. Overall, we believe our work would contribute to the IQA and the blind SR communities, and providing insights for evaluating GAN-based models.
|
| 35 |
+
|
| 36 |
+
# 2. Related Work
|
| 37 |
+
|
| 38 |
+
No-reference Image Quality Assessment. NR-IQA aims to predict the perceived quality of distorted images without referring to pristine-quality images. Getting rid of reference images makes such a setting more practical in many applications and therefore receives more and more attention in recent years. Early works in the literature of NR-IQA proposed to model statistics of natural images and regress parametric deviations to image degradations [22, 23, 29]. In recent years, deep neural networks (DNNs) show promising capacity and are leveraged to fit distorted images to quality scores for NR-IQA [2, 13, 20, 32]. Considering the problem of limited training data, dipIQ proposed to learn-to-rank large-scale unlabeled image pairs in a self-supervised manner [19]. Inspired by FR-IQA, Hallucinated-IQA proposed to compare the distorted images to hallucinated references, which are restored from the distorted images by adversarial training [3, 17, 28]. And some researchers also propose to generate a quality map for NR-IQA [24]. There are three differences compared to these works: 1) Compared to hallucinated references that generated from assessed images, degraded references are independent of assessed images and can provide additional information. 2) Previous works use a handcraft space (i.e., RGB image/SSIM map), while we learn deep embeddings end-to-end. 3) previous works try to "distill" all the information instead of only reference information for IQA.
|
| 39 |
+
|
| 40 |
+
Full-reference Image Quality Assessment. The full-reference setting significantly simplifies the IQA problem by converting it to two sub-problems, i.e., calculating the distance between restored and reference images and mapping such distance to quality scores [21, 36, 37, 44]. Here we mainly review the full-reference IQA methods that have been widely used to evaluate IR models [36, 45]. PSNR and SSIM [36] are appealing because they are simple to calculate and have clear physical meanings. But they do not correlate well with perceived visual quality [5, 27, 45], especially for evaluating the images generated by GANs [4]. LPIPS [45] analyzed the unreasonable effectiveness of deep features as a perceptual metric, which has been adopted by more and more IR models as a perceptual metric [7, 18]. And SWDN further improves LPIPS by taking the spatial misalignment for GAN-based distortion into consideration [5, 6]. Different from FR-IQA, our proposed DR-IQA only requires degraded images as reference, and we proposed a Conditional Knowledge Distillation Network to leverage deep image priors from the degraded images. Note that our proposed DR-IQA is also different from traditional reduced-reference IQA (RR-IQA), which extracts predefined features, such as frequency domain coefficients and image gradients, as references under the scenario of visual communication systems [16, 34].
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2. Overview of the proposed Conditional Knowledge Distillation Network (CKDN). CKDN consists of three components, i.e., a degradation-tolerant embedding module (DTE) in (b), a quality-sensitive embedding module (QSE) in (d), and a convolutional score predictor (CSP) in (e). The DTE embeds the degraded image in (a) to a reference space in (h) by optimizing a conditional knowledge distillation (CKD) loss. Such a loss learns reference information from pristine-quality images in (g) and minimizes the difference between the features of degraded and pristine-quality images. Note that the QSE and CSP provide conditions to learn the reference space, and the learned representation of degraded images provides reference information for IQA.
|
| 44 |
+
|
| 45 |
+
# 3. Approach
|
| 46 |
+
|
| 47 |
+
In this section, we will introduce the setting of DR-IQA and our proposed model for DR-IQA. Our model takes as input a degraded image in Figure 2 (a) (i.e., the input of IR models) and a restored image in Figure 2 (c) (i.e., the output of IR models), and aims to predict a quality score for the restored image in Figure 2 (f). Similar to FR-IQA, the basic idea is to compare the restored image to the reference and further map the learned difference to a quality score. However, the reference images in DR-IQA are noisy due to degradations. To solve this problem, we propose to learn a reference space in Figure 2 (h) to capture deep image priors that are useful for quality assessment. In particular, our proposed Conditional Knowledge Distillation Network (CKDN) consists of a degradation-tolerant embedding module (DTE) in Figure 2 (b), a quality-sensitive embedding module (QSE) in Figure 2 (d), and a convolutional score predictor (CSP) in Figure 2 (e). We propose a conditional knowledge distillation (CKD) loss to guide the learning of the reference space. Moreover, we propose a relative score regression loss to pre-train the QSE (shown in Figure 4). We will introduce the details in the following.
|
| 48 |
+
|
| 49 |
+
# 3.1. Formulations
|
| 50 |
+
|
| 51 |
+
Formulation of DR-IQA. Given a pristine-quality image $\mathbf{H}$ ; the degraded image can be denoted as $\mathbf{D}$ ; image restoration (IR) algorithms can be applied to obtain restored images, i.e., $\mathbf{R}$ ; and the human annotated quality score, i.e., mean opinion score (MOS) can be denoted as $s$ . In the training phase, all of these $\{\mathbf{H}, \mathbf{D}, \mathbf{R}, s\}$ are available. While in
|
| 52 |
+
|
| 53 |
+
the testing phase, the model takes as input only $\{\mathbf{D},\mathbf{R}\}$ and predicts the quality score $s$
|
| 54 |
+
|
| 55 |
+
Formulation of CKDN. CKDN consists of three modules, i.e., a degradation-tolerant embedding module (DTE), a quality-sensitive embedding module (QSE), and a convolutional score predictor (CSP), which are denoted as $\mathcal{E}_1$ , $\mathcal{E}_2$ , $S$ , respectively. We can obtain the quality score by:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
s = \mathcal {S} \left(\mathcal {E} _ {1} (\mathbf {D}) - \mathcal {E} _ {2} (\mathbf {R})\right), \tag {1}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\mathbf{D},\mathbf{R}$ , and $s$ are the degraded image, restored image, and quality score of the restored image, respectively.
|
| 62 |
+
|
| 63 |
+
Special designs of CKDN for DR-IQA. Compared to the state-of-the-art FR-IQA models [27, 45], the proposed CKDN has two advantages for the DR-IQA problem (as shown in Figure 3). 1) FR-IQA models extract the restored image features and reference features with the same parameters, while our CKDN learns task-specific embeddings (i.e., the DTE and QSE). 2) FR-IQA models focus on extracting feature difference, while we pay more attention (by stacking residual blocks in the CSP) to mapping feature difference to quality scores. Such designs can better handle the degradation of reference images.
|
| 64 |
+
|
| 65 |
+
# 3.2. Learning quality-sensitive embedding
|
| 66 |
+
|
| 67 |
+
Learning quality-sensitive features for restored images is important for image quality assessment. We propose to learn a quality-sensitive embedding (QSE) to extract such discriminative features. Regressing absolute quality scores is the most intuitive loss function to optimize the QSE, i.e.,
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 3. Comparison of (a) FR-IQA models and (b) DR-IQA model (CKDN). FR-IQA models focus on calculating difference between restored and reference images, while DR-IQA requires 1) different embeddings for restored and reference images and 2) convolutional layers for mapping feature difference to scores.
|
| 71 |
+
|
| 72 |
+
training the model to fit the input data $\{\mathbf{D},\mathbf{R}\}$ to the absolute quality score $s$ . Specifically, we minimize the Mean Square Error (MSE) for such a regression problem:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
L _ {a} = \frac {1}{N} \sum_ {i} \| s _ {i} - \mathcal {S} (\mathcal {E} _ {1} (\mathbf {D}) - \mathcal {E} _ {2} (\mathbf {R} _ {i})) \| _ {2} ^ {2}, \tag {2}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $N$ is the number of training images. Note that in this paper, we show the case of single content with single degradation for simplicity.
|
| 79 |
+
|
| 80 |
+
# 3.3. Learning degradation-tolerant embedding
|
| 81 |
+
|
| 82 |
+
In this subsection, we will introduce how to learn the DTE, which is the key module of our model. The DTE is supposed to capture reference information from degraded images. Our basic idea is to learn reference information from pristine-quality images and use the learned knowledge to guide the learning of DTE. To achieve this, we propose a conditional knowledge distillation loss and design an effective pre-training method.
|
| 83 |
+
|
| 84 |
+
Conditional knowledge distillation. Knowledge distillation is powerful tool for feature learning [11, 39, 48, 49]. Our extended conditional knowledge distillation leverages restored images as context information (condition), which is important in various vision tasks [40, 42]. Equation 2 shows the basic objective function for learning CKDN. Let us consider training CKDN in a full-reference setting:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
L _ {a} ^ {H} = \frac {1}{N} \sum_ {i} \| s _ {i} - \mathcal {S} ^ {H} \left(\mathcal {E} _ {1} ^ {H} (\mathbf {H}) - \mathcal {E} _ {2} ^ {H} (\mathbf {R} _ {i})\right) \| _ {2} ^ {2}, \tag {3}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $L_{a}^{H}$ , $\mathcal{E}_1^H (\cdot)$ , $\mathcal{E}_2^H (\cdot)$ , and $S^H (\cdot)$ denote the score regression loss, degradation-tolerant embedding module, quality-sensitive embedding module, and the convolutional score predictor that trained with pristine-quality images.
|
| 91 |
+
|
| 92 |
+
Compared to degraded images, it is much easier to learn deep image priors for IQA from pristine-quality images, i.e., $\mathcal{E}_1^H (\mathbf{H})$ is supposed to be better than $\mathcal{E}_1(\mathbf{D})$ . Such an observation motivates us to guide the learning of $\mathcal{E}_1(\mathbf{D})$ by
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 4. An illustration of pre-training the QSE by the proposed relative score regression loss.
|
| 96 |
+
|
| 97 |
+
$\mathcal{E}_1^H (\mathbf{H})$ . Specifically, our proposed conditional knowledge distillation loss can be denoted as:
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\begin{array}{l} L _ {c k d} = L _ {a} + L _ {a} ^ {H} + \lambda \left\| \mathcal {E} _ {1} ^ {H} (\mathbf {H}) - \mathcal {E} _ {1} (\mathbf {D}) \right\| _ {2} ^ {2}, \tag {4} \\ s. t., \quad \mathcal {E} _ {2} ^ {H} = \mathcal {E} _ {2}, \quad \mathcal {S} ^ {H} = \mathcal {S}, \\ \end{array}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where $L_{ckd}$ is the conditional knowledge distillation loss. $L_{a}$ , and $L_{a}^{H}$ are the score regression loss, which are shown in Equation 2 and Equation 3, respectively. $\lambda$ is the loss weight. $\mathcal{E}_2^H = \mathcal{E}_2$ , and $S^H = S$ are the constraints. Note that such constraints are essential to achieve effective distillation for DR-IQA, which can ensure $\mathcal{E}_1(\mathbf{D})$ and $\mathcal{E}_1^H (\mathbf{H})$ to be in the same latent space. In other words, the learning of embeddings for pristine-quality and degraded images should be in the same condition.
|
| 104 |
+
|
| 105 |
+
Pre-training for conditional knowledge distillation. The objective function in Equation 4 can be applied to train the CKDN in an end-to-end manner, where the parameters are initialized by ImageNet [14] pre-trained parameters. Taking one step further, we study how the condition in Equation 4 influences the knowledge distillation performance. We find that pre-training the QSE, i.e., $\mathcal{E}_2$ , can advance the optimization and achieve better performance. That is, before training the CKDN by Equation 4, we first learn the QSE by a relative score regression loss. Specifically, we train the model by comparing two restored images, e.g., $\mathbf{R_i}$ , $\mathbf{R_j}$ , and regressing the possibility of $s_i > s_j$ . Such loss can be denoted as:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
L _ {r} = \frac {1}{N} \sum_ {i, j} \| \Pr \left(s _ {i} > s _ {j}\right) - \mathcal {S} \left(\mathcal {E} _ {2} \left(\mathbf {R} _ {i}\right) - \mathcal {E} _ {2} \left(\mathbf {R} _ {j}\right)\right) \| _ {2} ^ {2}, \tag {5}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
where $N$ is the number of training pairs, $\operatorname{Pr}(s_i > s_j)$ can be obtained by $\operatorname{Pr}(s_i > s_j) = 1 / (1 + 10^{(s_j - s_i) / M})$ [5], $M$ is a dataset-specific parameter of the distribution, and $M = 400$ in the dataset we used.
|
| 112 |
+
|
| 113 |
+
We call such training stage "pre-training" because the relative score regression loss enlarges the training data by creating pairs. And the pre-trained QSE can provide a better condition for the subsequent knowledge distillation.
|
| 114 |
+
|
| 115 |
+
Comparisons to previous work. We analyze the difference between our proposed conditional knowledge dis
|
| 116 |
+
|
| 117 |
+
Table 1. The details of the subset of PIPAL [5] dataset that used in our experiments. # IR indicates the number of IR models and settings, and #Img means the number of distorted images.
|
| 118 |
+
|
| 119 |
+
<table><tr><td>IR tasks</td><td>Sub-tasks</td><td># IR</td><td>#Img</td></tr><tr><td>SR</td><td>(a) interpolation(b) traditional SR(c) PSNR-oriented SR(d) GAN-based SR</td><td>62</td><td>12,400</td></tr><tr><td>Denoise</td><td>(e) mean filtering(f) traditional denoising(g) Deep Denoising</td><td>13</td><td>2,600</td></tr><tr><td>Mixture</td><td>(h) noisy images SR(i) SR after denoising(j) SR after decompression</td><td>14</td><td>2,800</td></tr></table>
|
| 120 |
+
|
| 121 |
+
tillation and previous arts, e.g., data augmentation, vanilla knowledge distillation [11], and hallucinated reference [17].
|
| 122 |
+
|
| 123 |
+
The data augmentation method adds the $\{\mathbf{H},\mathbf{R_i}\}$ pair to training data, which would improve the generality of the model. Such a strategy can be regarded as an indirect knowledge distillation in a parameter-sharing manner.
|
| 124 |
+
|
| 125 |
+
The vanilla knowledge distillation method optimizes the model by Equation 4 without additional constraints. Such a strategy distills unaligned feature distributions from the teacher network (trained with pristine-quality images) to the student network (trained with degraded images).
|
| 126 |
+
|
| 127 |
+
Hallucinated reference methods can be applied to DR-IQA by generating hallucinated references from the degraded images, and use the generated reference to conduct IQA. Such a solution tries to "distill" all the information from pristine-quality images to degraded images.
|
| 128 |
+
|
| 129 |
+
Compared to data augmentation and vanilla knowledge distillation, our method is more direct and effective with well-aligned features. And compared to hallucinated reference methods, our selectively feature distillation is easier to learn as it is an ill-posed problem to recover all information from degraded images to pristine-quality images.
|
| 130 |
+
|
| 131 |
+
# 4. Experiments
|
| 132 |
+
|
| 133 |
+
# 4.1. Experiment setup
|
| 134 |
+
|
| 135 |
+
Datasets. We evaluate our model on the Perceptual Image Processing ALgorithms dataset (PIPAL) [5], which is the largest IQA dataset with 1.13 million human annotations. PIPAL contains two types of images which are traditional distorted images (e.g., JPEG compression, noise, spatial warping, etc.) and images restored by IR algorithms. Since our proposed IQA method is designed for evaluating IR algorithms, we remove the traditional distorted images and use a subset of the released PIPAL, which contains three important image restoration tasks (i.e., super-resolution, denoising, and mixture restoration). We split training and validation sets in a manner that is consistent with the real-world
|
| 136 |
+
|
| 137 |
+
Table 2. Comparisons to previous works. We implement FR-IQA models to our DR-IQA setting, $\uparrow$ indicates the higher the better.
|
| 138 |
+
|
| 139 |
+
<table><tr><td></td><td>Methods</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td rowspan="4">NR-IQA</td><td>DIQaM [2]</td><td>0.6255</td><td>0.6019</td></tr><tr><td>NIMA [32]</td><td>0.6330</td><td>0.6540</td></tr><tr><td>Hall-IQA [17]</td><td>0.6390</td><td>0.6167</td></tr><tr><td>MEON [20]</td><td>0.6436</td><td>0.6610</td></tr><tr><td rowspan="6">DR-IQA</td><td>PSNR</td><td>0.3231</td><td>0.3516</td></tr><tr><td>SSIM [36]</td><td>0.3573</td><td>0.3509</td></tr><tr><td>PieAPP [27]</td><td>0.6563</td><td>0.5937</td></tr><tr><td>LPIPS [45]</td><td>0.6650</td><td>0.5872</td></tr><tr><td>SWDN [5]</td><td>0.6729</td><td>0.6052</td></tr><tr><td>CKDN (Ours)</td><td>0.7669</td><td>0.7514</td></tr></table>
|
| 140 |
+
|
| 141 |
+
scenario for developing novel IR algorithms. Specifically, we randomly split 200 reference images into 175 training images and 25 validation images, which can ensure us to validate our model on unseen image contents. Moreover, we further split 89 IR algorithms into 50 algorithms for training and 39 algorithms for validation, which can ensure validating on unseen algorithms. Note that we split old algorithms for training and recent algorithms for validation. More details can be found in Table 1.
|
| 142 |
+
|
| 143 |
+
Evaluation metrics. We follow previous works [2, 5, 20], to use two most widely obtained IQA metrics, i.e., Spearman's Rank order Correlation Coefficients (SRCC) [30] and Pearson Linear Correlation Coefficients (PLCC). SRCC evaluates the monotonicity of two lists, i.e., whether the order of predicted scores is consistent with human-annotated orders. And PLCC considers both orders and values.
|
| 144 |
+
|
| 145 |
+
Baselines. We compared our method to previous methods in image quality assessment, including both NR-IQA and FR-IQA methods. In the following, the first four methods are NR-IQA models, and the latter five are FR-IQA models. We compare to them, due to their state-of-the-art performance and high relevance.
|
| 146 |
+
|
| 147 |
+
- DIQaM [2]: Propose to jointly learn the local quality and local weights, i.e., the relative importance of local quality to the global quality estimate.
|
| 148 |
+
- MEON [20]: Formulate the NR-IQA to a multi-task training problem, i.e., a distortion identification task and a quality prediction task.
|
| 149 |
+
- NIMA [32]: Propose to predict the distribution of MOS and introduced an EMD-based loss that penalizes misclassifications based on class distances.
|
| 150 |
+
- Hall-IQA [17]: Propose to compare the distorted images to hallucinated references, which are restored from the distorted images by GAN.
|
| 151 |
+
- PSNR: Peak signal-to-noise ratio (PSNR) is an extension of mean square error (MSE), which further considers the ratio between the signal and noise.
|
| 152 |
+
|
| 153 |
+
Table 3. Ablation experiments for main components.
|
| 154 |
+
|
| 155 |
+
<table><tr><td>Methods</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td>FR model [5]</td><td>0.6729</td><td>0.6052</td></tr><tr><td>CKDN</td><td>0.7127</td><td>0.6606</td></tr><tr><td>CKDN + CKD</td><td>0.7549</td><td>0.7473</td></tr><tr><td>CKDN + CKD + Pret.</td><td>0.7669</td><td>0.7514</td></tr><tr><td>FR upper bound</td><td>0.7922</td><td>0.8233</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 4. Ablation experiments on conv. blocks w/o CKD.
|
| 158 |
+
|
| 159 |
+
<table><tr><td>Methods</td><td>Conv. blocks</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td>FR model [5]</td><td>VGG</td><td>0.6729</td><td>0.6052</td></tr><tr><td>CKDN (Ours)</td><td>VGG</td><td>0.7006</td><td>0.6420</td></tr><tr><td>CKDN (Ours)</td><td>Residual</td><td>0.7127</td><td>0.6606</td></tr></table>
|
| 160 |
+
|
| 161 |
+
- SSIM [36]: The structural similarity index measure (SSIM) considers image degradation as a perceived change in structural information.
|
| 162 |
+
- PieAPP [27]: Perceptual Image-Error Assessment through Pairwise Preference (PieAPP) proposed a pairwise-learning framework.
|
| 163 |
+
- LPIPS [45]: Learned Perceptual Image Patch Similarity (LPIPS) proposed to use a learned weighted sum of deep features as a perceptual metric.
|
| 164 |
+
- SWDN [5]: Space Warping Difference IQA Network (SWDN) proposed to consider the robustness of spatial misalignment, especially for GAN-based distortions.
|
| 165 |
+
|
| 166 |
+
Implementation details. We follow previous work [5] and set the input image resolution to $288 \times 288$ . The learning rate is set to 0.15, and we use a constant learning rate strategy with a warm-up. We first train 10 epochs to initialize the quality-sensitive embedding, and then we train the CKDN by 20 epochs. We find the loss weight $\lambda$ in Equation 4 is robust to optimization, which is empirically set to 10. All the distortions are combined during training, and our model is trained end-to-end. The model size is 103MB and the training memory is 6.8GB (the batch size is 8 per GPU). We use PyTorch [26] as our codebase. Our CKDN is efficient, and each experiment can be finished in 30 minutes on 8 Tesla V100 GPUs.
|
| 167 |
+
|
| 168 |
+
Architectures of CKDN. We implement the two embeddings, i.e., the DTE and QSE, by a convolutional layer and three residual blocks [10]; and we implement the convolutional score predictor by four residual blocks and three fully connected layers. Note that although the DTE and QSE share the same architecture, their training strategies are different and specifically designed.
|
| 169 |
+
|
| 170 |
+
# 4.2. Comparisons
|
| 171 |
+
|
| 172 |
+
To evaluate our proposed CKDN, we implement the methods proposed for both NR-IQA and FR-IQA tasks. Specifically, for NR-IQA models, we only use the restored images for validation; and for FR-IQA models, we keep the same setting as our model and used the degraded im
|
| 173 |
+
|
| 174 |
+
Table 5. Ablation experiments on model architectures.
|
| 175 |
+
|
| 176 |
+
<table><tr><td>Embedding</td><td>Feature size</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td>Shared</td><td>72 × 72</td><td>0.7311</td><td>0.6926</td></tr><tr><td>Unshared</td><td>36 × 36</td><td>0.7436</td><td>0.7387</td></tr><tr><td>Unshared</td><td>18 × 18</td><td>0.7234</td><td>0.7176</td></tr><tr><td>Unshared</td><td>72 × 72</td><td>0.7669</td><td>0.7514</td></tr></table>
|
| 177 |
+
|
| 178 |
+
Table 6. Ablation experiments on knowledge distillations.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Methods</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td>w/o distillation</td><td>0.7127</td><td>0.6606</td></tr><tr><td>Data augmentation</td><td>0.7469</td><td>0.7087</td></tr><tr><td>Hallucinated reference</td><td>0.7348</td><td>0.7087</td></tr><tr><td>Knowledge distillation</td><td>0.7338</td><td>0.7093</td></tr><tr><td>Conditional knowledge distillation</td><td>0.7669</td><td>0.7514</td></tr></table>
|
| 181 |
+
|
| 182 |
+
ages as references. We train and validate all the models on the same train/validation split to keep the comparison fair. The results can be found in Table 2. It can be observed that our proposed CKDN outperforms all previous works with a clear margin, which yields the best solution when pristine-quality images are not available. PSNR and SSIM cannot work well with degraded references as the distance calculated by these methods are not robust for degradations. Moreover, without well-designed mechanisms for degraded reference, FR-IQA models cannot leverage such information and can only slightly outperform NR-IQA models in the term of SRCC. FR-IQA models even perform worse in the term of PLCC. Since PLCC is influenced by the value of scores, different reference images (e.g., $2 \times$ and $4 \times$ downsampled LR images) would cause disturbances and be considered as noises. However, with our proposed method, the degraded images can be leveraged to achieve 0.0940 SRCC gains compared to the state-of-the-art model [5].
|
| 183 |
+
|
| 184 |
+
# 4.3. Ablation Studies
|
| 185 |
+
|
| 186 |
+
Main components. We evaluate the main components of our proposed CKDN in Table 3. It can be observed that our proposed backbone works well for DR-IQA, which outperforms previous FR models by 0.0398 SRCC. Moreover, the proposed conditional knowledge distillation mechanism can further boost the performance by 0.0422 SRCC, which demonstrates the effectiveness of guiding DTE by pristine-quality images. Our proposed pre-training method can improve more than 0.01 SRCC, which makes our DR setting's performance close to the full reference upper bound.
|
| 187 |
+
|
| 188 |
+
Model architectures. We study core techniques for model design in Table 5. Sharing parameters for the quality-sensitive embedding and the degradation-tolerant embedding would cause 0.0358 SRCC drops, which show the necessity of learning unshared embeddings. Moreover, we want to emphasize that the spatial information of feature difference is important, which is ignored by FR-IQA models. Specifically, by down-sampling the input feature of
|
| 189 |
+
|
| 190 |
+
Table 7. Ablation experiments on pre-training in the term of SRCC. "Pret." indicates pre-training.
|
| 191 |
+
|
| 192 |
+
<table><tr><td>Epochs</td><td>5</td><td>7</td><td>10</td><td>15</td></tr><tr><td>ImageNet Pret.</td><td>0.7549</td><td>0.7549</td><td>0.7549</td><td>0.7549</td></tr><tr><td>LaPret.</td><td>0.7561</td><td>0.7574</td><td>0.7536</td><td>0.7543</td></tr><tr><td>LrPret.</td><td>0.7587</td><td>0.7629</td><td>0.7669</td><td>0.7643</td></tr></table>
|
| 193 |
+
|
| 194 |
+
Table 8. Extensive experiments for robustness evaluation by different train/validation splits (SRCC).
|
| 195 |
+
|
| 196 |
+
<table><tr><td>Train/VAL Split</td><td>Baseline</td><td>Ours</td><td>FR setting</td></tr><tr><td>50 train + 39 val</td><td>0.6729</td><td>0.7669</td><td>0.7922</td></tr><tr><td>54 train + 35 val</td><td>0.6884</td><td>0.7794</td><td>0.8011</td></tr><tr><td>59 train + 30 val</td><td>0.6561</td><td>0.7697</td><td>0.7943</td></tr></table>
|
| 197 |
+
|
| 198 |
+
CSP, we can observe 0.0233 SRCC drops. Last but not least, Table 4 shows that it is the formulation of CKDN that matters and the influence of specific architectures (e.g., residual or VGG [31] blocks) are marginal.
|
| 199 |
+
|
| 200 |
+
Knowledge distillation. Table 6 shows the effectiveness of different knowledge distillation methods. As analyzed in Section 3, our proposed conditional knowledge distillation can more effectively distill useful information for quality assessment into the degradation-tolerant embedding. We find that hallucinated references even bring a performance drop, which would be caused by involving feature noises when restoring the hallucinated references.
|
| 201 |
+
|
| 202 |
+
Pre-training methods. Table 7 shows how different pretraining methods (pre-trained by different loss with different epochs) influence the performance. It can be observed that the proposed relative score regression loss performs better than the absolute score regression loss and ImageNet pre-training. Such improvements show the effectiveness of training on highly related tasks with enlarged pairwise data.
|
| 203 |
+
|
| 204 |
+
Robustness on train/validation splits. We further explored how train/validation splits influence the effectiveness of the proposed methods. First, we study various train/validation splits from the aspect of image contents. We find that different train/validation splits lead to comparable performance (within 0.01 SRCC). Moreover, we study three different train/validation splits from the aspect of distortion types. The results can be found in Table 8, where the "Baseline" indicates SWDN [5]. It can be observed that our proposed method can achieve consistent improvements on all three settings, and are close to the performance achieved by using pristine-quality images.
|
| 205 |
+
|
| 206 |
+
CKDN can improve SR algorithms as a loss term. Specifically, we follow the setting of NTIRE 2020 challenge winner [12], i.e., use DIV8K [9] dataset and obtain LPIPS [45] as a metric. The results (85k iterations) can be found in Table 9. It can be observed that our CKDN can improve the SR performance. We only conduct experiments on the above settings, and more extensive experi
|
| 207 |
+
|
| 208 |
+
Table 9. CKDN can be used as a loss term. "Baseline" and "VGG" indicate ESRGAN [35] and Perceptual Loss, respectively.
|
| 209 |
+
|
| 210 |
+
<table><tr><td>Method</td><td>Baseline</td><td>Baseline + VGG</td><td>Baseline + CKDN</td></tr><tr><td>LPIPS ↓</td><td>0.5380</td><td>0.5039</td><td>0.4957</td></tr></table>
|
| 211 |
+
|
| 212 |
+
Table 10. Experiments on cross dataset evaluation. 2AFC scores are the original metric of BAPPS [45].
|
| 213 |
+
|
| 214 |
+
<table><tr><td>Reference</td><td>FR-IQA (LPIPS)</td><td>×2 LR</td><td>×4 LR</td></tr><tr><td>2AFC scores ↑</td><td>69.80</td><td>69.71</td><td>68.98</td></tr><tr><td>Reference</td><td>×8 LR</td><td>L25 noise</td><td>L50 noise</td></tr><tr><td>2AFC scores ↑</td><td>68.38</td><td>68.58</td><td>67.63</td></tr></table>
|
| 215 |
+
|
| 216 |
+
Table 11. The results in practice: use CKDN as a SR metric. The results are in the format of PI $\downarrow$ /LPIPS $\downarrow /\left( {1 - \mathrm{{CKDN}}}\right) \downarrow$ .
|
| 217 |
+
|
| 218 |
+
<table><tr><td>Method</td><td>Set5</td><td>Set14</td><td>BSD100</td></tr><tr><td>Bicubic</td><td>7.36/0.34/0.48</td><td>7.02/0.43/0.41</td><td>7.00/0.52/0.51</td></tr><tr><td>SRGAN</td><td>3.98/0.08/0.40</td><td>3.08/0.16/0.35</td><td>2.54/0.19/0.43</td></tr><tr><td>SPSR</td><td>3.27/0.06/0.36</td><td>2.90/0.13/0.32</td><td>2.35/0.16/0.40</td></tr></table>
|
| 219 |
+
|
| 220 |
+
ments would be conducted in future work.
|
| 221 |
+
|
| 222 |
+
CKDN can generalize well across datasets. We test our model on an unseen dataset BAPPS [45], and Table 10 shows that our model can achieve comparable performance even with degraded references and without fine-tuning.
|
| 223 |
+
|
| 224 |
+
CKDN can help in practice. In Table 11, we replace subjective image quality experiments from the state-of-the-art SPSR [18]. The baseline is SRGAN [15]. CKDN delivers the same conclusion as PI [1] and LPIPS [45]. We also find some inconsistent results, when evaluating comparable IR algorithms. And this problem would be further studied in the future.
|
| 225 |
+
|
| 226 |
+
# 5. Discussions
|
| 227 |
+
|
| 228 |
+
In this section, we conduct extensive experiments and detailed analyses to 1) evaluate the robustness of CKDN, 2) show the extreme effectiveness of reference images for evaluating images generated by GANs, and 3) provide an intuitive comprehension of how well current IQA models can be used as IR metrics.
|
| 229 |
+
|
| 230 |
+
The proposed method works well on degraded references with a large range of degradation types. We proposed to use IR inputs, i.e., degraded images, to help to assess the quality of restored images, which is practical in real-world scenarios. We further studied using the same degraded image (e.g., $4\times$ downsampled LR image) as a reference for assessing all the restored (e.g., SR, Denoised) images. Such a setting is not practical, while it can intuitively show the influence of reference quality on IQA performance. The results can be found in Table 12 and an illustration can be found in Figure 5. We choose the most common 5 degradations in the dataset. It can be observed that the proposed method performs well with a large range of degradation, e.g., $2\times$ downsample, $4\times$ downsam
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
8x Downsampled LR Image (↑0.0591)
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Gaussian noise, Level: 50 (↑0.1289)
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
JPEG compression, Q: 10 (↑0.1331)
|
| 240 |
+
Figure 5. An illustration of the SRCC improvements obtained by different types of reference images. The percentage numbers marked in green is the SRCC improvements compared to no-reference settings.
|
| 241 |
+
|
| 242 |
+

|
| 243 |
+
Pristine-quality Image (↑0.1409)
|
| 244 |
+
|
| 245 |
+
Table 12. Extensive experiments on how the quality of reference images influence IQA performances.
|
| 246 |
+
|
| 247 |
+
<table><tr><td colspan="2">Reference</td><td>SRCC↑</td><td>PLCC↑</td></tr><tr><td colspan="2">NR baseline</td><td>0.6513</td><td>0.6312</td></tr><tr><td rowspan="3">LR images</td><td>2×</td><td>0.7859</td><td>0.8286</td></tr><tr><td>4×</td><td>0.7639</td><td>0.7806</td></tr><tr><td>8×</td><td>0.7104</td><td>0.7251</td></tr><tr><td rowspan="2">Gauss. noise</td><td>Level: 25</td><td>0.7888</td><td>0.8291</td></tr><tr><td>Level: 50</td><td>0.7802</td><td>0.8190</td></tr><tr><td rowspan="2">JPEG</td><td>Q: 30</td><td>0.7911</td><td>0.8239</td></tr><tr><td>Q: 10</td><td>0.7844</td><td>0.8288</td></tr><tr><td colspan="2">IR inputs (our DR setting)</td><td>0.7669</td><td>0.7514</td></tr><tr><td colspan="2">FR upper bound</td><td>0.7922</td><td>0.8233</td></tr></table>
|
| 248 |
+
|
| 249 |
+
ple, Gaussian noise with levels: 25 and 50, JPEG compression with quality of 30 and 10. The performance dropped on the $8 \times$ downsample setting, while still outperforms the no-reference setting by 0.0591 SRCC.
|
| 250 |
+
|
| 251 |
+
Reference images is extremely important for evaluating images generated by GANs. Evaluating GAN-based IR models attracts lots of attention in recent years [8, 5, 45] as the artifacts generated by GANs yield new challenges for IQA. We study the performance of our model on GAN-based images in Table 13 and find introducing reference (e.g., full reference or degraded reference) can significantly benefit assessing GAN-based images (with 0.3101 SRCC gains). Such a result is reasonable as the textures generated by GANs may confuse NR-IQA models on distinguishing the artifacts and image contents. Thus reference images can provide strong guidance to disentangle quality-sensitive factors from image contents.
|
| 252 |
+
|
| 253 |
+
Current IQA methods can provide around $85\%$ reliable judgments when they are adopted as IR metrics. We provide an intuitive comprehension of how well current IQA models can be used as IR metrics. In particular, we use IQA models to compare IR algorithms under the same task and setting (e.g., the $\times 4$ SR task by GAN) and calculate the accuracy of the predicted judgments. We train all the settings by the same backbone, i.e., our CKDN, for fair comparisons. The results in Table 13 show that the accuracy of
|
| 254 |
+
|
| 255 |
+
Table 13. Extensive experiments on evaluating GAN-based images by SRCC and accuracy. Accuracy: we use IQA models to compare the output images of two IR algorithms (which one is better), and calculates the percentage of right judgments (the same as human judgments). $\uparrow$ indicates the higher the better.
|
| 256 |
+
|
| 257 |
+
<table><tr><td>Metrics</td><td>NR-IQA</td><td>DR-IQA</td><td>FR-IQA</td></tr><tr><td>SRCC↑</td><td>0.4081</td><td>0.7182</td><td>0.7560</td></tr><tr><td>Accuracy ↑</td><td>0.6853</td><td>0.8507</td><td>0.8580</td></tr></table>
|
| 258 |
+
|
| 259 |
+
the FR-IQA setting is around $85\%$ , which means $85\%$ preferences of the IQA model are consistent with human judgments. Moreover, DR-IQA can achieve comparable results with the FR-IQA setting, while the NR-IQA setting causes $17.27\%$ accuracy drops.
|
| 260 |
+
|
| 261 |
+
# 6. Conclusion
|
| 262 |
+
|
| 263 |
+
In this paper, we study the problem of evaluating IR models without pristine-quality images. We present a degraded-reference solution (DR-IQA) that introduces IR inputs to boost the quality assessment performance. We find it is nontrivial to leverage degraded images as reference, and by learning a Conditional Knowledge Distillation Network (CKDN), promising performance can be achieved. We have conducted extensive evaluations to demonstrate the effectiveness of our proposed method. Moreover, we draw three valuable conclusions about IQA and IR metrics: 1) our CKDN works well with a large range of degradation types, 2) reference images are extremely important for evaluating GAN-based images, and 3) current IQA methods can provide around $85\%$ reliable judgments for evaluating IR algorithms. In the future, we will focus on 1) extending our model to evaluate other conditional GAN tasks (e.g., in-painting, and semantic segmentation to images), and 2) further studying the problem of using our model as a loss/metric for IR algorithms.
|
| 264 |
+
|
| 265 |
+
# 7. Acknowledgement
|
| 266 |
+
|
| 267 |
+
This work was supported by the National Key R&D Program of China under Grand 2020AAA0105702, National Natural Science Foundation of China (NSFC) under Grants U19B2038, the University Synergy Innovation Program of Anhui Province under Grants GXXT-2019-025.
|
| 268 |
+
|
| 269 |
+
# References
|
| 270 |
+
|
| 271 |
+
[1] Yochai Blau and Tomer Michaeli. The perception-distortion tradeoff. In CVPR, pages 6228-6237, 2018.
|
| 272 |
+
[2] Sebastian Bosse, Dominique Maniry, Klaus-Robert Müller, Thomas Wiegand, and Wojciech Samek. Deep neural networks for no-reference and full-reference image quality assessment. TIP, 27(1):206-219, 2017.
|
| 273 |
+
[3] Diqi Chen, Yizhou Wang, and Wen Gao. No-reference image quality assessment: An attention driven approach. TIP, 29:6496-6506, 2020.
|
| 274 |
+
[4] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, pages 2672-2680, 2014.
|
| 275 |
+
[5] Jinjin Gu, Haoming Cai, Haoyu Chen, Xiaoxing Ye, Ren Jimmy S, and Chao Dong. PIPAL: A large-scale image quality assessment dataset for perceptual image restoration. In ECCV, pages 633-651, 2020.
|
| 276 |
+
[6] Jinjin Gu, Haoming Cai, Haoyu Chen, Xiaoxing Ye, Jimmy Ren, and Chao Dong. Image quality assessment for perceptual image restoration: A new dataset, benchmark and metric. arXiv preprint arXiv:2011.15002, 2020.
|
| 277 |
+
[7] Jinjin Gu and Chao Dong. Interpreting super-resolution networks with local attribution maps. In CVPR, 2021.
|
| 278 |
+
[8] Shuyang Gu, Jianmin Bao, Dong Chen, and Fang Wen. GIQA: Generated image quality assessment. In ECCV, pages 369-385, 2020.
|
| 279 |
+
[9] Shuhang Gu, Andreas Lugmayr, Martin Danelljan, Manuel Fritsche, Julien Lamour, and Radu Timofte. DIV8K: Diverse 8k resolution image dataset. In ICCVW, pages 3512-3516, 2019.
|
| 280 |
+
[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016.
|
| 281 |
+
[11] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. In NeurIPSW, 2014.
|
| 282 |
+
[12] Younghyun Jo, Sejong Yang, and Seon Joo Kim. Investigating loss functions for extreme super-resolution. In CVPRW, pages 424-425, 2020.
|
| 283 |
+
[13] Le Kang, Peng Ye, Yi Li, and David Doermann. Convolutional neural networks for no-reference image quality assessment. In CVPR, pages 1733-1740, 2014.
|
| 284 |
+
[14] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, volume 25, pages 1097-1105, 2012.
|
| 285 |
+
[15] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In CVPR, pages 4681-4690, 2017.
|
| 286 |
+
[16] Qiang Li and Zhou Wang. Reduced-reference image quality assessment using divisive normalization-based image representation. JSTSP, 3(2):202-211, 2009.
|
| 287 |
+
[17] Kwan-Yee Lin and Guanxiang Wang. Hallucinated-IQA: No-reference image quality assessment via adversarial learning. In CVPR, pages 732-741, 2018.
|
| 288 |
+
|
| 289 |
+
[18] Cheng Ma, Yongming Rao, Yean Cheng, Ce Chen, Jiwen Lu, and Jie Zhou. Structure-preserving super resolution with gradient guidance. In CVPR, pages 7769-7778, 2020.
|
| 290 |
+
[19] Kede Ma, Wentao Liu, Tongliang Liu, Zhou Wang, and Dacheng Tao. dipIQ: Blind image quality assessment by learning-to-rank discriminable image pairs. TIP, 26(8):3951-3964, 2017.
|
| 291 |
+
[20] Kede Ma, Wentao Liu, Kai Zhang, Zhengfang Duanmu, Zhou Wang, and Wangmeng Zuo. End-to-end blind image quality assessment using deep neural networks. TIP, 27(3):1202-1213, 2017.
|
| 292 |
+
[21] Rafal Mantiuk, Kil Joong Kim, Allan G Rempel, and Wolfgang Heidrich. HDR-VDP-2: A calibrated visual metric for visibility and quality predictions in all luminance conditions. TOG, 30(4):1-14, 2011.
|
| 293 |
+
[22] Anish Mittal, Anush K Moorthy, and Alan C Bovik. No-reference image quality assessment in the spatial domain. TIP, 21(12):4695-4708, 2012.
|
| 294 |
+
[23] Anish Mittal, Rajiv Soundararajan, and Alan C Bovik. Making a "completely blind" image quality analyzer. IEEE Signal processing letters, 20(3):209-212, 2012.
|
| 295 |
+
[24] Da Pan, Ping Shi, Ming Hou, Zefeng Ying, Sizhe Fu, and Yuan Zhang. Blind predicting similar quality map for image quality assessment. In CVPR, pages 6373-6382, 2018.
|
| 296 |
+
[25] Xingang Pan, Xiaohang Zhan, Bo Dai, Dahua Lin, Chen Change Loy, and Ping Luo. Exploiting deep generative prior for versatile image restoration and manipulation. In ECCV, pages 262-277, 2020.
|
| 297 |
+
[26] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, pages 8024-8035, 2019.
|
| 298 |
+
[27] Ekta Prashnani, Hong Cai, Yasamin Mostofi, and Pradeep Sen. PieAPP: Perceptual image-error assessment through pairwise preference. In CVPR, pages 1808-1817, 2018.
|
| 299 |
+
[28] Hongyu Ren, Diqi Chen, and Yizhou Wang. RAN4IQA: Restorative adversarial nets for no-reference image quality assessment. In AAAI, volume 32, 2018.
|
| 300 |
+
[29] Michele A Saad, Alan C Bovik, and Christophe Charrier. Blind image quality assessment: A natural scene statistics approach in the DCT domain. TIP, 21(8):3339-3352, 2012.
|
| 301 |
+
[30] Hamid R Sheikh, Muhammad F Sabir, and Alan C Bovik. A statistical evaluation of recent full reference image quality assessment algorithms. TIP, 15(11):3440-3451, 2006.
|
| 302 |
+
[31] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 303 |
+
[32] Hossein Talebi and Peyman Milanfar. NIMA: Neural image assessment. TIP, 27(8):3998-4011, 2018.
|
| 304 |
+
[33] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In CVPR, pages 9446-9454, 2018.
|
| 305 |
+
[34] Shiqi Wang, Xiang Zhang, Siwei Ma, and Wen Gao. Reduced reference image quality assessment using entropy of primitives. In PCS, pages 193-196, 2013.
|
| 306 |
+
[35] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. ESRGAN:
|
| 307 |
+
|
| 308 |
+
Enhanced super-resolution generative adversarial networks. In ECCVW, pages 0-0, 2018.
|
| 309 |
+
[36] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: From error visibility to structural similarity. TIP, 13(4):600-612, 2004.
|
| 310 |
+
[37] Zhou Wang, Eero P Simoncelli, and Alan C Bovik. Multiscale structural similarity for image quality assessment. In ACSSC, volume 2, pages 1398-1402, 2003.
|
| 311 |
+
[38] Fuzhi Yang, Huan Yang, Jianlong Fu, Hongtao Lu, and Baining Guo. Learning texture transformer network for image super-resolution. In CVPR, pages 5791-5800, 2020.
|
| 312 |
+
[39] Junho Yim, Donggyu Joo, Jihoon Bae, and Junmo Kim. A gift from knowledge distillation: Fast optimization, network minimization and transfer learning. In CVPR, pages 4133-4141, 2017.
|
| 313 |
+
[40] Jiahui Yu, Zhe Lin, Jamei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Generative image inpainting with contextual attention. In CVPR, pages 5505-5514, 2018.
|
| 314 |
+
[41] Yanhong Zeng, Jianlong Fu, Hongyang Chao, and Baining Guo. Learning pyramid-context encoder network for high-quality image inpainting. In CVPR, pages 1486-1494, 2019.
|
| 315 |
+
[42] Zheng-Jun Zha, Daqing Liu, Hanwang Zhang, Yongdong Zhang, and Feng Wu. Context-aware visual policy network for fine-grained image captioning. TPAMI, 2019.
|
| 316 |
+
[43] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. TIP, 26(7):3142-3155, 2017.
|
| 317 |
+
[44] Lin Zhang, Lei Zhang, Xuanqin Mou, and David Zhang. FSIM: A feature similarity index for image quality assessment. TIP, 20(8):2378-2386, 2011.
|
| 318 |
+
[45] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, pages 586-595, 2018.
|
| 319 |
+
[46] Wenlong Zhang, Yihao Liu, Chao Dong, and Yu Qiao. RankSRGAN: Generative adversarial networks with ranker for image super-resolution. In ICCV, pages 3096-3105, 2019.
|
| 320 |
+
[47] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, pages 286-301, 2018.
|
| 321 |
+
[48] Ziqi Zhang, Yaya Shi, Chunfeng Yuan, Bing Li, Peijin Wang, Weiming Hu, and Zheng-Jun Zha. Object relational graph with teacher-recommended learning for video captioning. In CVPR, pages 13278-13288, 2020.
|
| 322 |
+
[49] Heliang Zheng, Jianlong Fu, Zheng-Jun Zha, and Jiebo Luo. Looking for the devil in the details: Learning trilinear attention sampling network for fine-grained image recognition. In CVPR, pages 5012-5021, 2019.
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d144593aa8159235911d22a382d54b17a682034c68ac005e675b065492cb7b3
|
| 3 |
+
size 572427
|
learningconditionalknowledgedistillationfordegradedreferenceimagequalityassessment/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:474216d582427aaaa69a3cb81429a7b72c309170e917178d7f480df09e2103df
|
| 3 |
+
size 374600
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:744f1cd76e00a2b1d003eef8532cbd82f641991173ac52fa6937e2ff7fe8aeb4
|
| 3 |
+
size 82634
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b4d997b0988ab10ff33395aee3732f1429292344b3fab5a4d68ad8aca0e39ce
|
| 3 |
+
size 106767
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/d219473c-e7f6-4c20-b05f-c7dabd155c35_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69087c5a2a01970ef9e4226a6d13d6f240d3ad78de3660f5ec41d10d01cb2915
|
| 3 |
+
size 4178999
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/full.md
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning Cross-Modal Contrastive Features for Video Domain Adaptation
|
| 2 |
+
|
| 3 |
+
Dongyun Kim $^{1}$ , Yi-Hsuan Tsai $^{2}$ , Bingbing Zhuang $^{2}$ , Xiang Yu $^{2}$
|
| 4 |
+
|
| 5 |
+
Stan Sclaroff<sup>1</sup>, Kate Saenko<sup>1,3</sup>, Manmohan Chandraker<sup>2</sup>
|
| 6 |
+
|
| 7 |
+
$^{1}$ Boston University, $^{2}$ NEC Labs America, $^{3}$ MIT-IBM Watson AI Lab
|
| 8 |
+
|
| 9 |
+
$^{1}$ {donhk, sclaroff, saenko}@bu.edu, $^{2}$ {ytsai, bzhuang, xiangyu, manu}@nec-labs.com
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Learning transferable and domain adaptive feature representations from videos is important for video-relevant tasks such as action recognition. Existing video domain adaptation methods mainly rely on adversarial feature alignment, which has been derived from the RGB image space. However, video data is usually associated with multi-modal information, e.g., RGB and optical flow, and thus it remains a challenge to design a better method that considers the cross-modal inputs under the cross-domain adaptation setting. To this end, we propose a unified framework for video domain adaptation, which simultaneously regularizes cross-modal and cross-domain feature representations. Specifically, we treat each modality in a domain as a view and leverage the contrastive learning technique with properly designed sampling strategies. As a result, our objectives regularize feature spaces, which originally lack the connection across modalities or have less alignment across domains. We conduct experiments on domain adaptive action recognition benchmark datasets, i.e., UCF, HMDB, and EPIC-Kitchens, and demonstrate the effectiveness of our components against state-of-the-art algorithms.
|
| 14 |
+
|
| 15 |
+
# 1. Introduction
|
| 16 |
+
|
| 17 |
+
Recently, domain adaptation has gained a lot of attention due to its efficiency during training without the need of collecting ground truth labels in the target domain. Existing methods have made significant progress in image-based tasks, such as classification [33, 14, 54, 42], semantic segmentation [16, 53, 56, 31, 38] and object detection [8, 43, 24, 17]. While several works have sought to extend this success to video-based tasks like action recognition by aligning appearance (e.g., RGB) features through adversarial learning [6, 9, 37], challenges persist in video adaptation tasks due to the greater complexity of the video data. Moreover, different from the image data, domain shifts in videos for action recognition often involve more complicated environments, which increases the difficulty for adaptation. For
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1. We propose a cross-modal contrastive learning framework for video domain adaptation. Our framework consists of two contrastive learning objectives: (1) cross-modal contrastive learning to align cross-modal representations from the same video, and (2) cross-domain contrastive learning to align representations between the source and target domains in each modality.
|
| 21 |
+
|
| 22 |
+
example, the "fencing" action usually happens in a stadium, but it can happen in other places such as home or outdoors. Also, different actions can take place under the same background. Therefore, purely relying on aligning RGB features can be biased to the background and affect the performance.
|
| 23 |
+
|
| 24 |
+
In addition to the appearance cue, other modalities such as motion, audio, and text are considered in (self-)supervised learning methods on the video data [46, 2, 26, 39]. In this work, we focus on appearance and motion as the two most common modalities in the cross-domain action recognition task, in which the motion modality (i.e., optical flow) is shown to be more domain-invariant (e.g., background changes) than RGB [36]. As a result, motion can better capture background-irrelevant information, while RGB can identify semantically meaningful information under different camera setups, e.g., camera perspective.
|
| 25 |
+
|
| 26 |
+
As shown in Figure 1, with two modalities across two domains, adaptation becomes a task of how to explore the relationship of cross-modal and cross-domain features, to fully exploit the multi-modal property for video domain
|
| 27 |
+
|
| 28 |
+
adaptation. That is, given either the source video $V_{s}$ or the target one $V_{t}$ , they can be associated to either the appearance feature $F^{a}$ or the motion feature $F^{m}$ , which results in four combinations of feature spaces, i.e., $F_{s}^{a}, F_{t}^{a}, F_{s}^{m}, F_{t}^{m}$ . Thus, the ensuing task is to design an effective adaptation mechanism for dealing with these four feature spaces. Since each modality has its characteristics and benefit (e.g., flow is more domain-invariant and RGB can capture semantic cues), it is of great interest to enable feature learning across the two modalities. Our key contribution stems from the observation that typical adversarial feature alignment schemes used in e.g. [6, 10] may not be directly applied in the cross-modal setting. For example, it is not reasonable to directly align the RGB feature $F_{s}^{a}$ in the source domain with the flow feature $F_{s}^{m}$ or $F_{t}^{m}$ in either domain.
|
| 29 |
+
|
| 30 |
+
To tackle this issue, motivated by the recent advancements in self-supervised multi-view learning [50] that achieves powerful feature representations, we propose to treat each modality as a view, while introducing the cross-domain video data in our multi-modal learning framework. To this end, we leverage the contrastive learning objectives for performing feature regularization mutually among those four feature spaces (see Figure 1) under the video domain adaptation setting. We note that the prior work [36] also adopts a multi-modal framework, but it focuses on typical adversarial alignment and a self-supervised objective to predict whether the RGB/flow modality comes from the same video clip, without the exploration of jointly regularizing cross-modal and cross-domain features like our work.
|
| 31 |
+
|
| 32 |
+
More specifically, our framework is allowed to contrast features across modalities within a domain (e.g., between $F_{s}^{a}$ and $F_{s}^{m}$ ) or across domains using one modality (e.g., between $F_{s}^{a}$ and $F_{t}^{a}$ ). Two kinds of loss functions are designed accordingly: 1) a cross-modal loss that considers each modality as one view in a video while contrasting views in other videos from the same domain; 2) a cross-domain loss that considers one modality at a time and contrasts features based on the (pseudo) class labels of videos across two domains. There are several benefits of the proposed contrastive learning-based feature regularization strategies: 1) it is a unified framework that allows the interplay across features in different modalities and domains, while still enjoying the benefits of each modality; 2) it enables sampling strategies of selecting multiple positive and negative samples in the loss terms, coupled with memory banks to record large variations in video clips; 3) our cross-domain loss can be considered as a soft version of pseudo-label self-training with the awareness of class labels, which performs more robustly than typical adaptation methods.
|
| 33 |
+
|
| 34 |
+
We conduct experiments in video action recognition benchmark datasets, including the UCF [47] $\leftrightarrow$ HMDB [27] setting, and the EPIC-Kitchens [11, 36] dataset. We show that including either our cross-modal or cross-domain con
|
| 35 |
+
|
| 36 |
+
trastive learning objective improves accuracy while combining these two strategies in a unified framework obtains the best results. Moreover, our method performs favorably against state-of-the-art domain adaptation techniques, e.g., adversarial feature alignment [6, 36], self-learning scheme [10], and pseudo-label self-training. The main contributions of this work are summarized as follows.
|
| 37 |
+
|
| 38 |
+
- We propose a new multi-modal framework for video domain adaptation that leverages the property in four different feature spaces across modalities and domains.
|
| 39 |
+
- We leverage the contrastive learning technique with well-designed sampling strategies and demonstrate the application to adaptation for cross-domain action recognition by exploiting appearance and flow modalities.
|
| 40 |
+
- We show the effectiveness of both the cross-modal and cross-domain contrastive objectives, by achieving state-of-the-art results on UCF-HMDB and EPIC-Kitchens adaptation benchmarks with extensive analysis.
|
| 41 |
+
|
| 42 |
+
# 2. Related Work
|
| 43 |
+
|
| 44 |
+
In this section, we discuss existing fully-supervised and domain adaptation methods for action recognition, as well as methods on unsupervised learning for video representations.
|
| 45 |
+
|
| 46 |
+
Supervised Action Recognition. Action recognition is one of the important tasks for understanding video representations. With the recent advancements in deep learning, early works either adopt 2D [22] or 3D [19] convolutional networks on RGB video frames, which achieve significant progress. To improve upon the single-modal framework, optical flow is commonly used as the temporal cue to greatly improve the action recognition accuracy [46]. Following this multi-modal pipeline, several methods are proposed to further incorporate the long-term temporal context [58, 12] and structure [52, 66, 57], or extend to the 3D convolutional networks [4, 51]. Moreover, recent approaches show the benefit of adopting 1D/2D separable convolutional networks [52, 63], while other methods [12, 20] focus on improving the 3D convolutional architecture for action recognition, to be computationally efficient. Despite the promising performance of these methods in a fully-supervised manner, our focus is to develop an effective action recognition framework under the unsupervised domain adaptation setting.
|
| 47 |
+
|
| 48 |
+
Domain Adaptation for Action Recognition. Due to the convenience of recording videos under various conditions, there is an increasing demand for developing approaches for cross-domain action recognition. Previous methods focus on the setting of cross-domain transfer learning [49, 65, 64] or tackle the problem of view-point variance in videos [25, 29, 41, 45]. However, unsupervised domain adaptation (UDA) for action recognition has received less attention until
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2. An overview of our cross-modal contrastive learning framework. We use a two-stream network for RGB and flow. Each stream takes video clips and outputs feature vectors for each domain and modality $(F_s^a, F_t^a, F_s^m, F_t^m)$ . For cross-modal contrastive learning, we add the projection head $(h)$ to learn an embedding where the flow and RGB features from the same video are matched (e.g., $h(F_{s_i}^a)$ , $h(F_{s_i}^m)$ ). For cross-domain contrastive learning, we match the cross-domain features of the same class without the projection head (e.g. $F_{s_i}^a$ , $F_{t_j}^a$ ) in the same modality. For the unlabeled target domain, we use high-confidence pseudo-labels $\hat{Y}_t$ to find positive samples in the source domain.
|
| 52 |
+
|
| 53 |
+
Table 1. Summary of notations.
|
| 54 |
+
|
| 55 |
+
<table><tr><td>Notation</td><td>Meaning</td></tr><tr><td>{Vs, Vt}</td><td>{Source, Target} video clips</td></tr><tr><td>Fs^a</td><td>Source appearance feature</td></tr><tr><td>Fs^m</td><td>Source motion feature</td></tr><tr><td>F^a_t</td><td>Target appearance feature</td></tr><tr><td>F^m_t</td><td>Target motion feature</td></tr><tr><td>h(·)</td><td>Shared projection head</td></tr><tr><td>Ŷ_t</td><td>Target pseudo-label</td></tr></table>
|
| 56 |
+
|
| 57 |
+
recently. Early attempts align distributions across the source and target domains using hand-crafted features [3, 67], while recent deep learning based methods [18, 37, 9, 6, 10, 36] leverage the insight from UDA on image classification and extend it to the video case. For instance, approaches [6, 37] utilize adversarial feature alignment [14, 54] and propose a temporal version with attention modules. Moreover, self-supervised learning strategies are adopted by considering the video properties, such as clip orders [10], sequential domain prediction [5], and modality correspondence prediction [36] in videos. Similar to [36], our method also considers the multi-modal property, but focuses on a different problem regime. To be specific, we propose a contrastive learning framework that can better exploit the multi-modality to regularize the feature spaces simultaneously across modalities and across domains, which is previously unstudied.
|
| 58 |
+
|
| 59 |
+
# Self-supervised Learning for Video Representation.
|
| 60 |
+
|
| 61 |
+
Learning from unlabeled videos is beneficial for video representations as video labeling is expensive. For instance, numerous approaches are developed via exploiting the temporal structure in videos [13, 60], e.g., temporal order verification [34] and sorting sequences [28]. By leveraging the temporal connection across frames, patch tracking over time [59] or prediction of future frames [48] also facilitates feature learning in videos. Moreover, to incorporate the multi-modal information into learning, RGB frames, audio,
|
| 62 |
+
|
| 63 |
+
and optical flow are used to align with each other for self-learning [2, 26, 39, 15, 1, 35, 40]. After the learning process, such methods are usually served as a pre-training step for the downstream tasks. In this paper, we study the UDA setting for cross-domain and cross-modal action recognition, which involves a labeled source dataset and unlabeled target videos.
|
| 64 |
+
|
| 65 |
+
# 3. Proposed Method
|
| 66 |
+
|
| 67 |
+
In this section, we first introduce the overall pipeline of the proposed approach for video domain adaptation. Then we describe individual modules for cross-modal and cross-domain feature regularization, followed by the complete objective in a unified framework using contrastive learning.
|
| 68 |
+
|
| 69 |
+
# 3.1. Algorithm Overview
|
| 70 |
+
|
| 71 |
+
Given the source dataset that contains videos $\{s_i\} \in V_s$ with its action label set $Y_{s}$ , our goal is to learn an action recognition model that is able to perform reasonably well on the unlabeled target video set $\{t_i\} \in V_t$ . Since we aim to investigate an effective way to construct a domain adaptive model that leverages the benefit of multi-modal information (i.e., RGB and flow) across domains, we utilize a two-stream network [36] that takes the RGB and flow images as the input. As a result, the two-stream network would output the RGB modality feature $F^{a}$ and the flow modality feature $F^{m}$ , which forms four different feature spaces across the modality and domain, i.e., $F_{s}^{a}, F_{t}^{a}, F_{s}^{m}, F_{t}^{m}$ .
|
| 72 |
+
|
| 73 |
+
In our contrastive learning framework, we jointly consider the relationship of these four spaces via two kinds of contrastive loss functions to regularize features as shown in Figure 1. First, we treat each modality as a view, extract the RGB/flow features from the same domain (either source or target), and contrast them based on whether the features come from the same video, e.g., the cross-modal features of one video, $F_{s}^{a}$ and $F_{s}^{m}$ , should be closer to each other in an embedding space than others extracted from different
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 3. An overview of cross-modal contrastive learning. We pull an RGB feature and a flow feature from the same video clip as positives but push cross-modal features from different video clips.
|
| 77 |
+
|
| 78 |
+
video clips. Second, for features across the domains, e.g., $F_{s}^{a}$ and $F_{t}^{a}$ , but within the same modality, we contrast them based on whether the videos are likely to share the same action label. To this end, we calculate the pseudo-labels $\hat{Y}_{t}$ on target videos and form positive/negative samples to perform contrastive learning. Figure 2 illustrates our overall framework and Table 2 summarizes the notations.
|
| 79 |
+
|
| 80 |
+
# 3.2. Cross-modal Regularization
|
| 81 |
+
|
| 82 |
+
Motivated by the unsupervised multi-view feature learning method [50], we treat each modality as a view and form positive training samples within the same video, as well as negative samples from different videos. However, the difference is that we cannot directly apply negative pairing to all the videos, as in our problem, the videos from two different domains under the same view could still be largely different because of the domain gap. Therefore, it would not be proper to mix source and target videos, and instead, we form a contrastive objective in each domain separately.
|
| 83 |
+
|
| 84 |
+
Sampling Strategy. It has been studied that the sampling strategy is crucial in image-based contrastive learning [21]. Considering videos from one domain in our case, we select positive training samples from the same video but with different modalities, while sampling the negative ones when the RGB and flow frames are from different videos, regardless of their action labels. An illustration of cross-modal sampling for the source domain is in Figure 3, and a similar strategy is used for the target domain.
|
| 85 |
+
|
| 86 |
+
In addition, since one video clip contains many frames, every time we need to randomly sample a window of consecutive frames within a video clip, following the setting in [10, 36]. To account for the large intra-variation within a video clip, we do not assume that the RGB and flow modality need to have the same window of frames. For example, given a video clip, the RGB frames can be randomly sampled from the time window $t \sim t + 15$ , while the flow frames can be different, e.g., $t + 5 \sim t + 20$ . Empirically, we find that
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 4. Based on pseudo-labels, we pull source and target features sharing the same labels but push cross-domain features otherwise.
|
| 90 |
+
|
| 91 |
+
such a sampling strategy is especially beneficial for our contrastive learning objective, which is aware of the variation within video clips in the embedding space.
|
| 92 |
+
|
| 93 |
+
Similarity Between Samples. Another important aspect in contrastive learning is the feature similarity. Taking the source domain as one example, we have features from RGB and flow, i.e., $F_{s}^{a}$ and $F_{s}^{m}$ . Since each modality maintains its own feature characteristic, directly contrasting these two features may make the negative impact on the feature representation and reduce the recognition accuracy. To this end, given source features $F_{s_i}$ and $F_{s_j}$ from two videos $\{s_i,s_j\} \in V_s$ , we apply an additional projection head $h(\cdot)$ in a way similar to SimCLR [7], and then we can define the similarity function $\phi^s (\cdot)$ between samples with a temperature parameter $\tau$ as:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\phi^ {s} \left(F _ {s _ {i}} ^ {k}, F _ {s _ {j}} ^ {l}\right) _ {k, l \in \{a, m \}} = \exp \left(h \left(F _ {s _ {i}} ^ {k}\right) ^ {\top} h \left(F _ {s _ {j}} ^ {l}\right) / \tau\right). \tag {1}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $\{a, m\}$ represents either the appearance (RGB) or motion (flow) modality.
|
| 100 |
+
|
| 101 |
+
Loss Function. Based on the aforementioned sampling strategy and similarity measurement as depicted in Figure 3, the loss function for the source domain is written as:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\mathcal {L} _ {m o} ^ {s} = - \log \frac {\sum_ {s _ {i} \in V _ {s}} \phi^ {s} \left(F _ {s _ {i}} ^ {k} , F _ {s _ {i} +} ^ {l}\right) _ {k \neq l}}{\sum_ {s _ {i} \in V _ {s}} \phi^ {s} \left(F _ {s _ {i}} ^ {k} , F _ {s _ {i} +} ^ {l}\right) _ {k \neq l} + \phi^ {s} \left(F _ {s _ {i}} ^ {k} , F _ {s _ {j} -} ^ {l}\right) _ {k \neq l}}, \tag {2}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $F_{s_i+}$ is the positive sample with a different view (modality) from the same video clip $F_{s_i}$ , while $F_{s_j-}$ is the negative sample with another view of a different video from $F_{s_i}$ , regardless of their action labels. Here, we omit the notation $k, l \in \{a, m\}$ to have a concise presentation.
|
| 108 |
+
|
| 109 |
+
On the other hand, for videos in the target domain, we construct another loss $\mathcal{L}_{mo}^t$ similar to (2) with the same projection head $h(\cdot)$ , where the similarity measurement $\phi^t$ between features of target videos $\{t_i,t_j\} \in V_t$ is defined as:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\phi^ {t} \left(F _ {t _ {i}} ^ {k}, F _ {t _ {j}} ^ {l}\right) _ {k, l \in \{a, m \}} = \exp \left(h \left(F _ {t _ {i}} ^ {k}\right) ^ {\top} h \left(F _ {t _ {j}} ^ {l}\right) / \tau\right). \tag {3}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
Here, to consider individual domain characteristics, we find that the key is to form the cross-modal loss for each domain separately, while these two loss functions can still share the same projection head $h^1$ . The projection head helps to prevent overfitting to this regularization. Without it, the RGB and flow features would be aligned to be the same, so that they are not complementary to each other anymore. Therefore, by combining these two loss functions in each of the source and target domains (i.e., $\mathcal{L}_{mo}^s$ and $\mathcal{L}_{mo}^t$ ), features within the same video but from different modalities are closer in an embedding space, which is also served as a feature regularization on unlabeled target videos.
|
| 116 |
+
|
| 117 |
+
# 3.3. Cross-domain Regularization
|
| 118 |
+
|
| 119 |
+
In addition to the cross-modal regularization introduced in the previous section, we find that there is a missing connection between features across domains. To further exploit the interplay between four feature spaces $(F_{s}^{a}, F_{t}^{a}, F_{s}^{m}, F_{t}^{m})$ , we propose to use another contrastive learning objective for cross-domain samples.
|
| 120 |
+
|
| 121 |
+
Sampling Strategy via Pseudo-labels. Taking one modality, RGB, as the example, we consider cross-domain features of $F_{s}^{a}$ and $F_{t}^{a}$ in a similar contrastive learning setup as described in Section 3.2. Here, an intuitive way to form positive samples is to find the videos with the same label across domains. However, since we do not know the action label in the target domain, we first apply our two-stream action recognition model and obtain the prediction score of the target-domain video. Then, if the score is larger than a certain threshold $T$ (e.g., $T = 0.8$ in our setting), we obtain the pseudo-label of this target sample and sample other source videos with the same action label from positive samples (otherwise they are negative samples). The procedure for the RGB modality is illustrated in Figure 4, while a similar way is used for the flow modality.
|
| 122 |
+
|
| 123 |
+
Similarity Between Samples. To measure the sample similarity in our contrastive objective, we adopt $\phi^{st}$ to calculate the similarity between cross-domain features:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\phi^ {s t} \left(F _ {t _ {i}} ^ {k}, F _ {s _ {i}} ^ {k}\right) _ {k \in \{a, m \}} = \exp \left(F _ {t _ {i}} ^ {k \top} F _ {s _ {i}} ^ {k} / \tau\right), \tag {4}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where the modality $k$ can be appearance or motion in our work. Note that, for cross-domain feature regularization, in order to align features, we do not use an additional projection head $h(\cdot)$ like Section 3.2 or Figure 3 (explained as the follows).
|
| 130 |
+
|
| 131 |
+
Loss Function. The corresponding loss function with respect to the sampling strategy (Figure 4) and the similarity
|
| 132 |
+
|
| 133 |
+
measurement $\phi^{st}$ for the RGB modality is defined as:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\mathcal {L} _ {d o} ^ {a} = - \log \frac {\sum_ {t _ {i} \in \hat {V} _ {t}} \phi^ {s t} \left(F _ {t _ {i}} ^ {a} , F _ {s _ {i} +} ^ {a}\right)}{\sum_ {t _ {i} \in \hat {V} _ {t}} \phi^ {s t} \left(F _ {t _ {i}} ^ {a} , F _ {s _ {i} +} ^ {a}\right) + \phi^ {s t} \left(F _ {t _ {i}} ^ {a} , F _ {s _ {i} -} ^ {a}\right)}, \tag {5}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
where $t_i \in \hat{V}_t$ is the set of target videos with a more confident pseudo labels $\hat{Y}_t$ . $F_{s_i+}^a$ are the positive samples of source videos $s_i \in V_s$ with the same class label as $\hat{Y}_t$ , while $F_{s_i-}^a$ are the negative samples with different class labels. Similarly, when the modality is flow, the loss function is:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\mathcal {L} _ {d o} ^ {m} = - \log \frac {\sum_ {t _ {i} \in \hat {V} _ {t}} \phi^ {s t} \left(F _ {t _ {i}} ^ {m} , F _ {s _ {i} +} ^ {m}\right)}{\sum_ {t _ {i} \in \hat {V} _ {t}} \phi^ {s t} \left(F _ {t _ {i}} ^ {m} , F _ {s _ {i} +} ^ {m}\right) + \phi^ {s t} \left(F _ {t _ {i}} ^ {m} , F _ {s _ {i} -} ^ {m}\right)}. \tag {6}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
We also note that the choice without using the projection head $h(\cdot)$ is reasonable as our objectives in (5) and (6) essentially try to make features with the same action labels closer to each other, which is consistent with the final goal for performing action recognition.
|
| 146 |
+
|
| 147 |
+
Connections to Pseudo-label Self-training. Using pseudo labels on the target sample to self-train the model is one commonly used approach in domain adaptation [69, 68, 32]. In the proposed cross-domain contrastive learning, we also adopt pseudo labels to form positive samples. However, these two methods are distinct, in terms of the way that reshapes the feature space.
|
| 148 |
+
|
| 149 |
+
Given the target video $V_{t}$ , one can produce a pseudo-label $\hat{Y}_{t}$ and use it for training the action recognition network with the standard cross-entropy loss. Therefore, such supervision is a strong signal that forces the feature $F_{t}$ to map into the space of action label $\hat{Y}_{t}$ , which is sensitive to noisy labels such as pseudo-labels. On the contrary, using contrastive learning with pseudo-labels is similar in spirit to the soft nearest-neighbor loss [44, 61], which encourages soft feature alignments, rather than enforcing the hard final classification, hence more robust to potential erroneous pseudo-labels. Similar observations are also presented in the recent work, which shows that the supervised contrastive loss [23] is more robust than the cross-entropy loss in image classification. In our case, we utilize such property and show that cross-domain contrastive learning can be achieved by using pseudo-labels in video domain adaptation, and is more robust than pseudo-label self-training. More empirical comparisons will follow in the experiments.
|
| 150 |
+
|
| 151 |
+
# 3.4. A Contrastive Learning Framework
|
| 152 |
+
|
| 153 |
+
In previous sections, we have introduced how we incorporate cross-modal and cross-domain contrastive loss functions to regularize features extracted from RGB/flow branches across the source and target domains. Next, we introduce the entire objective.
|
| 154 |
+
|
| 155 |
+
Overall Objective. Overall, we include loss functions in Section 3.2 and 3.3 without using any supervisions, and a standard supervised cross-entropy loss $\mathcal{L}_{src}$ on source videos $V_{s}$ with action labels $Y_{s}$ . To obtain the final output from the two-stream network, we average the outputs from individual classifiers of RGB and flow branches (see Figure 2).
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\begin{array}{l} \mathcal {L} _ {\text {a l l}} = \mathcal {L} _ {\text {s r c}} \left(V _ {s}, Y _ {s}\right) + \tag {7} \\ \lambda \left(\mathcal {L} _ {m o} ^ {s} \left(V _ {s}\right) + \mathcal {L} _ {m o} ^ {t} \left(V _ {t}\right) + \mathcal {L} _ {d o} \left(V _ {s}, V _ {t}, \hat {Y} _ {t}\right)\right), \\ \end{array}
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
where $\lambda$ is the weight to balance the terms. Here, we treat loss functions in (5) and (6) as one term: $\mathcal{L}_{do} = \mathcal{L}_{do}^{a} + \mathcal{L}_{do}^{m}$ , as they are with the same form but using different modalities. Since all the loss terms are with a similar form, it does not require heavy tuning on each of them, so that we use the same $\lambda$ for cross-modal and cross-domain losses (i.e., $\lambda = 1.25$ in this paper).
|
| 162 |
+
|
| 163 |
+
Leveraging Memory Banks. To compute the cross-modal and cross-domain loss functions, we need to compute all feature representations summed from video sets $V_{s}$ and $V_{t}$ . However, it is impossible to obtain all the features at every training iteration. Therefore, we store the features in the memory banks following [62], i.e., an individual memory bank for a domain and a modality, totally with four combinations $M_{s}^{a}, M_{s}^{m}, M_{t}^{a}$ , and $M_{t}^{m}$ . Given the features in a batch (i.e., $F_{s_i}^a, F_{s_i}^m, F_{t_j}^a$ , and $F_{t_j}^m$ ), we pull out features from the memory banks for positive and negative features (e.g., $F_{s_i+}^a$ or $F_{s_i-}^a$ in (5) is replaced by $M_{s_i+}^a$ and $M_{s_i-}^a$ ). Then, the memory bank features are updated with the features in the batch at the end of each iteration. We use a momentum update $\delta = 0.5$ following [62]:
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
M _ {s _ {i}} ^ {a} = \delta M _ {s _ {i}} ^ {a} + (1 - \delta) F _ {s _ {i}} ^ {a}. \tag {8}
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
The other memory banks, $M_s^m$ , $M_t^a$ , and $M_t^m$ , are also updated in the same way. Using the momentum update also encourages smoothness in training dynamics [62]. In our case, during the training process, we randomly sample consecutive frames in a video clip. Therefore, by using the memory banks, our model can also encourage the temporal smoothness within each clip in feature learning.
|
| 170 |
+
|
| 171 |
+
# 4. Experimental Results
|
| 172 |
+
|
| 173 |
+
In this section, we show performance comparisons on numerous domain adaptation benchmark scenarios for action recognition, followed by comprehensive ablation studies to validate the effectiveness of our cross-domain and cross-modal feature regularization. Please refer to the supplementary material for more results and analysis.
|
| 174 |
+
|
| 175 |
+
# 4.1. Datasets and Experimental Setting
|
| 176 |
+
|
| 177 |
+
We use the three standard benchmark datasets for video domain adaptation, UCF [47], HMDB [27], and EPIC-Kitchens [11]. We then show that our method is a general
|
| 178 |
+
|
| 179 |
+
Table 2. Performance comparisons on UCF $\leftrightarrow$ HMDB.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Setting</td><td>Two-stream</td><td>UCF → HMDB</td><td>HMDB → UCF</td></tr><tr><td>Source-only [6]</td><td></td><td>80.6</td><td>88.8</td></tr><tr><td>TA3N [6]</td><td></td><td>81.4</td><td>90.5</td></tr><tr><td>Supervised-target [6]</td><td></td><td>93.1</td><td>97.0</td></tr><tr><td>TCoN [37]</td><td></td><td>87.2</td><td>89.1</td></tr><tr><td>Source-only [10]</td><td></td><td>80.3</td><td>88.8</td></tr><tr><td>SAVA [10]</td><td></td><td>82.2</td><td>91.2</td></tr><tr><td>Supervised-target [10]</td><td></td><td>95.0</td><td>96.8</td></tr><tr><td>Source-only</td><td>✓</td><td>82.8</td><td>90.7</td></tr><tr><td>MM-SADA [36]</td><td>✓</td><td>84.2</td><td>91.1</td></tr><tr><td>Ours (cross-modal)</td><td>✓</td><td>84.7</td><td>92.5</td></tr><tr><td>Ours (cross-domain)</td><td>✓</td><td>83.6</td><td>91.1</td></tr><tr><td>Ours (final)</td><td>✓</td><td>84.7</td><td>92.8</td></tr><tr><td>Supervised-target</td><td>✓</td><td>98.8</td><td>95.0</td></tr></table>
|
| 182 |
+
|
| 183 |
+
framework to work for different types of action recognition settings: UCF $\leftrightarrow$ HMDB for human activity recognition, as well as EPIC-Kitchens for fine-grained action recognition in egocentric videos.
|
| 184 |
+
|
| 185 |
+
UCF $\leftrightarrow$ HMDB. Chen et al. [6] release the UCF $\leftrightarrow$ HMDB dataset for studying video domain adaptation. This dataset has 3209 videos with 12 action classes. All the videos come from the original UCF [47] and HMDB [27] datasets, which sample the overlapping 12 classes out of 101/51 classes from UCF/HMDB, respectively. There are two settings of interest, UCF $\rightarrow$ HMDB and HMDB $\rightarrow$ UCF. We show the performance of our method in both settings following the official split provided by the authors [6].
|
| 186 |
+
|
| 187 |
+
EPIC-Kitchens. This dataset contains fine-grained action classes with videos recorded in different kitchens from the egocentric view. We follow the train/test split used in [36] for the domain adaptation task. There are 8 action categories in the three largest kitchens, i.e., D1, D2, and D3, and we use all the pairs of them as source/target domains. Note that, compared to UCF $\leftrightarrow$ HMDB, EPIC-Kitchens is more challenging as it has more fined-grained classes (e.g., "Take", "Put", "Open", "Close") and imbalanced class distributions. We report the top-1 accuracy on the test set averaged over the last 9 epochs following [36].
|
| 188 |
+
|
| 189 |
+
Implementation Details. Our entire framework is implemented in PyTorch using 2 TITANXP GPUs. We use an I3D two-stream network [4] composed of an RGB stream and a flow stream, where the network is pre-trained on Kinetics following [10]. During training, we use the same setting as [10, 36] to randomly sample 16 consecutive frames out of a video clip. Then each RGB and flow stream takes these 16 frames with a size of $224 \times 224$ . Each stream is followed by a fully-connected layer to compute individual output logits. Then the logits from each stream are averaged to predict the final class scores. To optimize the entire network, we use the SGD optimizer with a learning rate of 0.01. We set the temperature $\tau = 0.1$ and $\delta = 0.5$ for all experiments following [62]. For UCF $\leftrightarrow$ HMDB, we follow the setting as [10] for batch size, total training epochs, learning rate, etc. For EPIC-Kitchens, we implement it upon the official code
|
| 190 |
+
|
| 191 |
+
Table 3. Performance comparisons on EPIC-Kitchens.
|
| 192 |
+
|
| 193 |
+
<table><tr><td>Setting</td><td>D2 → D1</td><td>D3 → D1</td><td>D1 → D2</td><td>D3 → D2</td><td>D1 → D3</td><td>D2 → D3</td><td>Mean</td><td>Gain</td></tr><tr><td>Source-only</td><td>42.5</td><td>44.3</td><td>42.0</td><td>56.3</td><td>41.2</td><td>46.5</td><td>45.5</td><td></td></tr><tr><td>AdaBN [30]</td><td>44.6</td><td>47.8</td><td>47.0</td><td>54.7</td><td>40.3</td><td>48.8</td><td>47.2</td><td>+1.7</td></tr><tr><td>MMD [33]</td><td>43.1</td><td>48.3</td><td>46.6</td><td>55.2</td><td>39.2</td><td>48.5</td><td>46.8</td><td>+1.3</td></tr><tr><td>MCD [42]</td><td>42.1</td><td>47.9</td><td>46.5</td><td>52.7</td><td>43.5</td><td>51.0</td><td>47.3</td><td>+1.8</td></tr><tr><td>MM-SADA [36]</td><td>47.4</td><td>48.6</td><td>50.8</td><td>56.9</td><td>42.5</td><td>53.3</td><td>49.9</td><td>+4.4</td></tr><tr><td>Ours (modality)</td><td>44.3</td><td>50.2</td><td>49.5</td><td>56.6</td><td>43.0</td><td>48.8</td><td>48.7</td><td>+3.2</td></tr><tr><td>Ours (domain)</td><td>47.4</td><td>52.8</td><td>52.4</td><td>56.1</td><td>41.7</td><td>49.9</td><td>50.1</td><td>+4.6</td></tr><tr><td>Ours (final)</td><td>49.5</td><td>51.5</td><td>50.3</td><td>56.3</td><td>46.3</td><td>52.0</td><td>51.0</td><td>+5.5</td></tr><tr><td>Supervised-target</td><td>62.8</td><td>62.8</td><td>71.7</td><td>71.7</td><td>74.0</td><td>74.0</td><td>69.5</td><td></td></tr></table>
|
| 194 |
+
|
| 195 |
+
of [36] but set the batch size as 32 to fit the memory of 2 GPUs and train the model for 6K iterations. The learning rate decreases by a factor of 10 every 3K iterations.
|
| 196 |
+
|
| 197 |
+
# 4.2. Results on UCF $\leftrightarrow$ HMDB
|
| 198 |
+
|
| 199 |
+
We show experimental results for UCF $\rightarrow$ HMDB and HMDB $\rightarrow$ UCF in Table 2, comparing with state-of-the-art methods — TA $^3$ N [6], TCoN [37], SAVA [10], and MM-SADA [36].
|
| 200 |
+
|
| 201 |
+
Comparisons with State-of-the-art Methods. In each group of Table 2, in addition to the result for each method, we show the "Source-only" model that only trains on videos in the source domain, and the "Supervised-target" model that trains on target videos with ground truths, which serves as an upper bound. We also implement [36] on UCF-HMDB in the same setup for fair comparisons. Different from the $\mathrm{TA}^3\mathrm{N}$ , TCoN, and SAVA that only exploit the single modality via adversarial feature alignment and self-learning schemes, our method leverages both the RGB and flow modalities in a domain adaptation framework, which achieves the state-of-the-art performance. We also notice that our source-only model performs slightly better than the other source-only baselines, due to the usage of the flow stream. Despite that the domain gap is reduced by leveraging the flow modality, our approach still obtains comparable performance gains with respect to the source-only model and performs better than MM-SADA [36] that adopts the same two-stream model. For example, on UCF $\rightarrow$ HMDB, the gain for $\mathrm{TA}^3\mathrm{N}$ and SAVA is $0.8\%$ and $1.9\%$ , respectively, while our gain is the same as SAVA and is much higher than $\mathrm{TA}^3\mathrm{N}$ .
|
| 202 |
+
|
| 203 |
+
Ablation Study. In the fourth group of Table 2, we show model variants to validate the usefulness of individual components in our contrastive learning framework, i.e., cross-modal and cross-domain feature regularization. From the results, the two modules consistently improve the performance over the source-only baseline. By combining both, it provides the highest accuracy. Here, interestingly, we find that the cross-domain module is less helpful than the cross-modal one. One reason is that on UCF $\leftrightarrow$ HMDB, these two domains already share a high similarity, which reduces the impact of using the cross-domain loss. However, this
|
| 204 |
+
|
| 205 |
+
Table 4. Ablation study on EPIC-Kitchens.
|
| 206 |
+
|
| 207 |
+
<table><tr><td>Setting</td><td>Modality</td><td>Domain</td><td>Mean</td><td>Gain</td></tr><tr><td>Source-only</td><td></td><td></td><td>45.5</td><td></td></tr><tr><td>MM-SADA [36]</td><td>✓</td><td></td><td>47.9</td><td>+2.4</td></tr><tr><td>Ours</td><td>✓</td><td></td><td>48.7</td><td>+3.2</td></tr><tr><td>MM-SADA [36]</td><td></td><td>✓</td><td>49.4</td><td>+3.9</td></tr><tr><td>Pseudo-labeling</td><td></td><td>✓</td><td>49.0</td><td>+3.5</td></tr><tr><td>Ours</td><td></td><td>✓</td><td>50.1</td><td>+4.6</td></tr><tr><td>MM-SADA [36]</td><td>✓</td><td>✓</td><td>49.9</td><td>+4.4</td></tr><tr><td>Ours</td><td>✓</td><td>✓</td><td>51.0</td><td>+5.5</td></tr></table>
|
| 208 |
+
|
| 209 |
+
also shows the importance of incorporating the proposed two modules, in which the cross-modal loss can still provide effective regularization, even when the domain gap is smaller. In the next section, we will show a different scenario, where both modules are important.
|
| 210 |
+
|
| 211 |
+
# 4.3. Results on EPIC-Kitchens
|
| 212 |
+
|
| 213 |
+
We present results on the EPIC-Kitchens benchmark for domain adaptation [36], including comparisons with state-of-the-art methods, ablation study, and more analysis.
|
| 214 |
+
|
| 215 |
+
Comparisons with State-of-the-art Methods. In Table 3, we present several domain adaptation methods, including distribution alignment via adversarial learning [33], maximum classifier discrepancy [42], and adaptive batch normalization [30], and a recently proposed method that uses a self-learning objective [36]. We note that these results are reported from [36] using the same two-stream feature extractor as ours, and they share the same "Source-only" model and "Supervised-target" upper bound in Table 3. For fair comparisons, we reproduce results of MM-SADA [36] using their official implementation and the same computing resources as ours, and show that our final model performs better than MM-SADA by $1.1\%$ on average. The results show the advantages of our contrastive learning framework. More detailed analysis is provided as follows.
|
| 216 |
+
|
| 217 |
+
Ablation Study. In Table 4, we ablate the two components for our cross-modal and cross-domain loss functions with other approaches that consider the similar aspect. For fair comparisons, we use the same two-stream backbone, implementation, and computing resources for generating all the results. Considering only modality or domain, our method consistently performs better than MM-SADA [36], in which it uses a self-learning module to predict whether the RGB/flow modality comes from the same video clip and a typical adversarial learning scheme to align cross-domain features. Combining these two factors, our method improves the "Source-only" model the most, which shows the effectiveness of the proposed unified framework using contrastive learning. In addition, it is worth mentioning that our cross-domain loss performs better than pseudo-label self-training by $1.1\%$ , which validates the discussion in Section 3.3 on
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
Blue: Source RGB Green: Source Flow
|
| 221 |
+
(a)
|
| 222 |
+
Figure 5. t-SNE visualization on cross-modal and cross-domain features after the projection head $h(\cdot)$ on UCF $\rightarrow$ HMDB, i.e. $h(F_s^a)$ , $h(F_s^m)$ , $h(F_t^a)$ , $h(F_t^m)$ . In (a)(b), we show the visualization for individual domains, where each domain contains the multi-modality features. In (c)(d), we visualize features for each modality, and each plot uses the features from two domains. (e) includes all the features from two domains and two modalities, where each color represents one action class.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Blue: Target RGB Green: Target Flow
|
| 226 |
+
(b)
|
| 227 |
+
|
| 228 |
+

|
| 229 |
+
Red: Source RGB Black: Target RGB
|
| 230 |
+
(c)
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
Red: Source Flow Black: Target Flow
|
| 234 |
+
(d)
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
Each color represents one category
|
| 238 |
+
(e)
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
Figure 6. Cross-domain retrievals using the RGB feature. Given the target feature $F_{t}^{a}$ , we retrieve the closest neighbor $F_{s}^{a}$ in the source domain. Our model correctly aligns videos of the same class under view-angle (1st row) and background (2nd row) differences.
|
| 242 |
+
|
| 243 |
+
the difference of leveraging pseudo-labels.
|
| 244 |
+
|
| 245 |
+
Sampling Strategy. In Table 5, we present the ablation for sampling strategy in the cross-modal loss (see Section 3.2), where we do not assume that the RGB and flow modality have the same window of frames, which handles the large intra-variation within a video clip. When applying this strategy in MM-SADA [36], acting as a way for data augmentation, the performance gain is smaller than ours (i.e., $0.5\%$ vs $1.1\%$ ). This validates our sampling strategy with the proposed contrastive learning objective that enriches feature regularization under the domain adaptation setting.
|
| 246 |
+
|
| 247 |
+
# 4.4. More Results and Analysis
|
| 248 |
+
|
| 249 |
+
We present more analysis including the feature visualizations using t-SNE [55], and example results for cross-domain retrieval to understand our model predictions.
|
| 250 |
+
|
| 251 |
+
t-SNE Visualizations. In this paper, we use a projection head $h(\cdot)$ to project RGB/flow features to an embedding space for cross-modal loss in our framework. Therefore, it is of great interest to understand how the features behave in this embedding space. To this end, we samples features from both domains across two modalities, and perform t-SNE visualizations on UCF $\rightarrow$ HMDB in Figure 5.
|
| 252 |
+
|
| 253 |
+
Here, although our cross-modal loss is calculated in each domain, the projection head is shared across the domains. Therefore, we provide different combinations of the feature spaces to visualize how the four feature spaces look like, i.e., $h(F_s^a), h(F_s^m), h(F_t^a), h(F_t^m)$ . First, in Figure 5(a)(b), it
|
| 254 |
+
|
| 255 |
+
Table 5. Ablation study on the sampling strategy.
|
| 256 |
+
|
| 257 |
+
<table><tr><td>Setting</td><td>Sampling</td><td>Mean</td><td>Gain via sampling</td></tr><tr><td rowspan="2">MM-SADA [36]</td><td rowspan="2">✓</td><td>49.4</td><td></td></tr><tr><td>49.9</td><td>+0.5</td></tr><tr><td rowspan="2">Ours</td><td rowspan="2">✓</td><td>49.9</td><td></td></tr><tr><td>51.0</td><td>+1.1</td></tr></table>
|
| 258 |
+
|
| 259 |
+
is not surprising to observe that in each domain, features from different modalities are aligned together (e.g., Source RGB/Flow in Figure 5(a)), as it is exactly what the cross-modal objective in (2) optimizes for.
|
| 260 |
+
|
| 261 |
+
More interestingly, if we consider each modality at a time in Figure 5(c)(d), e.g., Source RGB and Target RGB, their features are also aligned well, even we do not explicitly have an objective to align them in the embedding space via $h(\cdot)$ . This shows the merit of our framework that enables feature regularization and interplay across four feature spaces. Also, we present a visualization on the distribution for each class, including all the source and target features across two modalities in Figure 5(e). This illustrates that features from the same category are aligned well.
|
| 262 |
+
|
| 263 |
+
Cross-domain Retrievals. In Figure 6, we show the cross-domain video retrievals using the RGB feature. Based on the target feature in HMDB, we show the nearest neighbor one from UCF. We show that our method can correctly retrieve the videos of the same class, either having the same context background but from a different view-angle or acting in a similar movement but with a different background.
|
| 264 |
+
|
| 265 |
+
# 5. Conclusions
|
| 266 |
+
|
| 267 |
+
We investigate the video domain adaptation task with our cross-modal contrastive learning framework. To this end, we leverage the multi-modal, RGB and flow information, and exploit their relationships. In order to handle feature spaces across modalities and domains, we propose two objectives to regularize such feature spaces, namely cross-modal and cross-domain contrastive losses, that learn better feature representations for domain adaptive action recognition. Moreover, our framework is modular, so it can be applicable to other domain adaptive multi-modal applications, which will be considered as the future work.
|
| 268 |
+
|
| 269 |
+
# References
|
| 270 |
+
|
| 271 |
+
[1] Humam Alwassel, Dhruv Mahajan, Bruno Korbar, Lorenzo Torresani, Bernard Ghanem, and Du Tran. Self-supervised learning by cross-modal audio-video clustering. In NeurIPS, 2020. 3
|
| 272 |
+
[2] Relja Arandjelovic and Andrew Zisserman. Look, listen and learn. In ICCV, 2017. 1, 3
|
| 273 |
+
[3] Liangliang Cao, Zicheng Liu, and Thomas S Huang. Cross-dataset action detection. In CVPR, 2010. 3
|
| 274 |
+
[4] J. Carreira and A. Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017. 2, 6
|
| 275 |
+
[5] M.H. Chen, B. Li, Y. Bao, G. AlRegib, and Z. Kira. Action segmentation with joint self-supervised temporal domain adaptation. In CVPR, 2020. 3
|
| 276 |
+
[6] Min-Hung Chen, Zsolt Kira, Ghassan AlRegib, Jaekwon Yoo, Ruxin Chen, and Jian Zheng. Temporal attentive alignment for large-scale video domain adaptation. In ICCV, 2019. 1, 2, 3, 6, 7
|
| 277 |
+
[7] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020. 4
|
| 278 |
+
[8] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, 2018. 1
|
| 279 |
+
[9] Jinwoo Choi, Gaurav Sharma, Manmohan Chandraker, and Jia-Bin Huang. Unsupervised and semi-supervised domain adaptation for action recognition from drones. In WACV, 2020. 1, 3
|
| 280 |
+
[10] Jinwoo Choi, Gaurav Sharma, Samuel Schulter, and Jia-Bin Huang. Shuffle and attend: Video domain adaptation. In ECCV, 2020. 2, 3, 4, 6, 7
|
| 281 |
+
[11] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, and Will Price. Scaling egocentric vision: The epic-kitchens dataset. In ECCV, 2018. 2, 6
|
| 282 |
+
[12] C. Feichtenhofer, H. Fan, J. Malik, and K. He. Slowfast networks for video recognition. In ICCV, 2019. 2
|
| 283 |
+
[13] Basura Fernando, Hakan Bilen, Efstratios Gavves, and Stephen Gould. Self-supervised video representation learning with odd-one-out networks. In CVPR, 2017. 3
|
| 284 |
+
[14] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. In JMLR, 2016. 1, 3
|
| 285 |
+
[15] Tengda Han, Weidi Xie, and Andrew Zisserman. Self-supervised co-training for video representation learning. In NeurIPS, 2020. 3
|
| 286 |
+
[16] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A. Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In ICML, 2018. 1
|
| 287 |
+
[17] Cheng-Chun Hsu, Yi-Hsuan Tsai, Yen-Yu Lin, and Ming-Hsuan Yang. Every pixel matters: Center-aware feature alignment for domain adaptive object detector. In ECCV, 2020. 1
|
| 288 |
+
|
| 289 |
+
[18] Arshad Jamal, Vinay P Namboodiri, Dipti Deodhare, and KS Venkatesh. Deep domain adaptation in action space. In BMVC, 2018. 3
|
| 290 |
+
[19] S. Ji, W. Xu, M. Yang, and K. Yu. 3d convolutional neural networks for human action recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(1):221-231, 2013. 2
|
| 291 |
+
[20] Boyuan Jiang, MengMeng Wang, Weihao Gan, Wei Wu, and Junjie Yan. Stm: Spatiotemporal and motion encoding for action recognition. In ICCV, 2019. 2
|
| 292 |
+
[21] Yannis Kalantidis, Mert Bulent Sariyildiz, Noe Pion, Philippe Weinzaepfel, and Diane Larlus. Hard negative mixing for contrastive learning. In NeurIPS, 2020. 4
|
| 293 |
+
[22] Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014. 2
|
| 294 |
+
[23] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In NeurIPS, 2020. 5
|
| 295 |
+
[24] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In CVPR, 2019. 1
|
| 296 |
+
[25] Y. Kong, Z. Ding, J. Li, and Y. Fu. Deeply learned view-invariant features for cross-view action recognition. IEEE Transactions on Image Processing, 26(6):3028-3037, 2017. 2
|
| 297 |
+
[26] Bruno Korbar, Du Tran, , and Lorenzo Torresani. Cooperative learning of audio and video models from self-supervised synchronization. In NeurlPS, 2018. 1, 3
|
| 298 |
+
[27] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. Hmdb: A large video database for human motion recognition. In ICCV, 2011. 2, 6
|
| 299 |
+
[28] Hsin-Ying Lee, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Unsupervised representation learning by sorting sequences. In ICCV, 2017. 3
|
| 300 |
+
[29] Junnan Li, Yongkang Wong, Qi Zhao, and Mohan Kankanhalli. Unsupervised learning of view-invariant action representations. In NeurIPS, 2018. 2
|
| 301 |
+
[30] Yanghao Li, Naiyan Wang, Jianping Shi, Xiaodi Hou, and Jiaying Liu. Adaptive batch normalization for practical domain adaptation. Pattern Recognition, 80:109 - 117, 2018. 7
|
| 302 |
+
[31] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, 2019. 1
|
| 303 |
+
[32] Qing Lian, Fengmao Lv, Lixin Duan, and Boqing Gong. Constructing self-motivated pyramid curriculums for cross-domain semantic segmentation: A non-adversarial approach. In ICCV, 2019. 5
|
| 304 |
+
[33] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. 1, 7
|
| 305 |
+
[34] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In ECCV, 2016. 3
|
| 306 |
+
|
| 307 |
+
[35] Pedro Morgado, Yi Li, and Nuno Vasconcelos. Learning representations from audio-visual spatial alignment. In NeurIPS, 2020. 3
|
| 308 |
+
[36] Jonathan Munro and Dima Damen. Multi-modal domain adaptation for fine-grained action recognition. In CVPR, 2020. 1, 2, 3, 4, 6, 7, 8
|
| 309 |
+
[37] Boxiao Pan, Zhangjie Cao, Ehsan Adeli, and Juan Carlos Niebles. Adversarial cross-domain action recognition with co-attention. In AAAI, 2020. 1, 3, 6, 7
|
| 310 |
+
[38] Sujoy Paul, Yi-Hsuan Tsai, Samuel Schulter, Amit K. Roy-Chowdhury, and Manmohan Chandraker. Domain adaptive semantic segmentation using weak labels. In ECCV, 2020. 1
|
| 311 |
+
[39] AJ Piergiovanni, Anelia Angelova, and Michael S. Ryoo. Evolving losses for unsupervised video representation learning. In CVPR, 2020. 1, 3
|
| 312 |
+
[40] AJ Piergiovanni, Anelia Angelova, and Michael S Ryoo. Evolving losses for unsupervised video representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 133-142, 2020. 3
|
| 313 |
+
[41] Hossein Rahmani and Ajmal Mian. Learning a non-linear knowledge transfer model for cross-view action recognition. In CVPR, 2015. 2
|
| 314 |
+
[42] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, 2018. 1, 7
|
| 315 |
+
[43] Kuniaki Saito1, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, 2019. 1
|
| 316 |
+
[44] Ruslan Salakhutdinov and Geoff Hinton. Learning a nonlinear embedding by preserving class neighbourhood structure. volume 2 of Proceedings of Machine Learning Research, pages 412-419, 2007. 5
|
| 317 |
+
[45] Gunnar A Sigurdsson, Abhinav Gupta, Cordelia Schmid, Ali Farhadi, and Karteek Alahari. Actor and observer: Joint modeling of first and third-person videos. In CVPR, 2018. 2
|
| 318 |
+
[46] K. Simonyan and A Zisserman. Two-stream convolutional networks for action recognition in videos. In NeurIPS, 2014. 1, 2
|
| 319 |
+
[47] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv:1212.0402, 2012. 2, 6
|
| 320 |
+
[48] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using lstms. In ICML, 2015. 3
|
| 321 |
+
[49] Waqas Sultani and Imran Saleemi. Human action recognition across datasets by foreground-weighted histogram decomposition. In CVPR, 2014. 2
|
| 322 |
+
[50] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In ECCV, 2020. 2, 4
|
| 323 |
+
[51] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, 2015. 2
|
| 324 |
+
[52] D. Tran, H. Wang, L. Torresani, J. Ray, Y. LeCun, and M. Paluri. A closer look at spatiotemporal convolutions for action recognition. In CVPR, 2017. 2
|
| 325 |
+
|
| 326 |
+
[53] Yi-Hsuan Tsai, Kihyuk Sohn, Samuel Schulter, and Manmohan Chandraker. Domain adaptation for structured output via discriminative patch representations. In ICCV, 2019. 1
|
| 327 |
+
[54] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, 2017. 1, 3
|
| 328 |
+
[55] Laurens van der Maaten and Geoffrey Hinton. Visualizing high-dimensional data using t-sne. Journal of Machine Learning Research, 9:2579-2605, 2008. 8
|
| 329 |
+
[56] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, 2019. 1
|
| 330 |
+
[57] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016, 2
|
| 331 |
+
[58] X. Wang, R. Girshick, A. Gupta, and K. He. Non-local neural networks. In CVPR, 2018. 2
|
| 332 |
+
[59] Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. 3
|
| 333 |
+
[60] Donglai Wei, Joseph Lim, Andrew Zisserman, and William T. Freeman. Learning and using the arrow of time. In CVPR, 2018. 3
|
| 334 |
+
[61] Zhirong Wu, Alexei A Efros, and Stella Yu. Improving generalization via scalable neighborhood component analysis. In ECCV, 2018. 5
|
| 335 |
+
[62] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pages 3733-3742, 2018. 6
|
| 336 |
+
[63] S. Xie, C. Sun, J. Huang, Z. Tu, and K. Murphy. Rethinking spatiotemporal feature learning for video understanding. In ECCV, 2018. 2
|
| 337 |
+
[64] Tiantian Xu, Fan Zhu, Edward K. Wong, and Yi Fang. Dual many-to-one-encoder-based transfer learning for cross-dataset human action recognition. Image and Vision Computing, 55:127 - 137, 2016. 2
|
| 338 |
+
[65] Xiao-Yu Zhang, Haichao Shi, Changsheng Li, Kai Zheng, Xiaobin Zhu, and Lixin Duan. Learning transferable self-attentive representations for action recognition in untrimmed videos with weak supervision. In AAAI, 2019. 2
|
| 339 |
+
[66] Bolei Zhou, Alex Andonian, Aude Oliva, and Antonio Torralba. Temporal relational reasoning in videos. In ECCV, 2018. 2
|
| 340 |
+
[67] Fan Zhu and Ling Shao. Enhancing action recognition by cross-domain dictionary learning. In BMVC, 2013. 3
|
| 341 |
+
[68] Yang Zou, Zhiding Yu, B. V. K. Vijaya Kumar, and Jinsong Wang. Domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, 2018. 5
|
| 342 |
+
[69] Yang Zou, Zhiding Yu, Xiaofeng Liu, B.V.K. Vijaya Kumar, and Jinsong Wang. Confidence regularized self-training. In ICCV, 2019. 5
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dbe04799d4dadfb05ba4e5c2defb5017248afc65ab3b99ccb3c56f5d3f1ad1ad
|
| 3 |
+
size 421528
|
learningcrossmodalcontrastivefeaturesforvideodomainadaptation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17630a87a11f415268327cf540bbd7ab1e4c5767a0abcace1c1f3540c8724af6
|
| 3 |
+
size 467334
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f22b00e629e993e9661dd2a9276250993ea3915035dc5c16622d52b03f33ee99
|
| 3 |
+
size 85955
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c06cc2d80a549d66aba6afd100f6cd0252ee27e1c05217f0835b6858e4f8d87a
|
| 3 |
+
size 99736
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/ef444c60-4296-4e20-a6bb-eeac0c07e1ea_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38e5fb3f6d928323fa3c8d6c75cf4484a1fca84c43435706a60426ea8ea54ab8
|
| 3 |
+
size 8985502
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/full.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning Deep Local Features with Multiple Dynamic Attentions for Large-Scale Image Retrieval
|
| 2 |
+
|
| 3 |
+
Hui Wu<sup>1</sup> Min Wang<sup>2*</sup> Wengang Zhou<sup>1,2*</sup> Houqiang Li<sup>1,2</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ CAS Key Laboratory of Technology in GIPAS, EEIS Department, University of Science and Technology of China $^{2}$ Institute of Artificial Intelligence, Hefei Comprehensive National Science Center wh241300@mail.ustc.edu.cn, wangmin@iai.ustc.edu.cn, {zhwg, lihq}@ustc.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
In image retrieval, learning local features with deep convolutional networks has been demonstrated effective to improve the performance. To discriminate deep local features, some research efforts turn to attention learning. However, existing attention-based methods only generate a single attention map for each image, which limits the exploration of diverse visual patterns. To this end, we propose a novel deep local feature learning architecture to simultaneously focus on multiple discriminative local patterns in an image. In our framework, we first adaptively reorganize the channels of activation maps for multiple heads. For each head, a new dynamic attention module is designed to learn the potential attentions. The whole architecture is trained as metric learning of weighted-sum-pooled global image features, with only image-level relevance label. After the architecture training, for each database image, we select local features based on their multi-head dynamic attentions, which are further indexed for efficient retrieval. Extensive experiments show the proposed method outperforms the state-of-the-art methods on the Revisited Oxford and Paris datasets. Besides, it typically achieves competitive results even using local features with lower dimensions. Code will be released at https://github.com/CHANWH/MDA.
|
| 10 |
+
|
| 11 |
+
# 1. Introduction
|
| 12 |
+
|
| 13 |
+
Given a large image corpus, instance image retrieval [32, 27, 17, 38, 18, 9, 10, 19] aims to effectively identify images containing the same object or describing the same scene as the query image. This task is challenging due to the various conditions observed in large-scale datasets, such as lighting variation, occlusion, viewpoint changes, etc. To this end, many research efforts are devoted to image representation with descriptive and discriminative local features.
|
| 14 |
+
|
| 15 |
+
Given an image, the extraction of local feature usually
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
(a) DELF
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
(b)HOW
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
(c) Ours
|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
|
| 36 |
+
Figure 1. Attention maps of three methods. (a) and (b): attention maps generated by DELF [23] and HOW [37]. (c): attention maps generated by our method. HOW and DELF only generate a single attention map focusing on limited patterns, while our method focuses on diverse patterns by generating multiple attention maps. involves local region detection and image patch description, where the former identifies salient regions of interest in the image which is further described into a vector of predefined dimension by the latter. Before the advent of deep learning, local visual features are designed in a hand-crafted way [20, 2], which is also regarded as a kind of shallow feature. With the introduction of deep learning to computer vision, tremendous progress [35, 21, 7, 6, 37, 23] has been made on local feature learning in a data-driven paradigm.
|
| 37 |
+
|
| 38 |
+
Early works on deep local feature ignores the local region detection. Some works [35, 21, 7] assume the im
|
| 39 |
+
|
| 40 |
+
age patch is ready from hand-crafted detectors and focus on learning a vector from an image patch with CNNs in a supervised learning way. Some other works [32, 38, 1, 19, 9, 27] directly take the activation map from a convolution layer and regard the channel features in each spatial position of the map as a local feature. Such local feature essentially corresponds to a relatively fixed receptive field in the input image. Recently, more and more research efforts [37, 23, 4, 34] resort to attention learning to discriminate deep local features with only image-level annotation. In those methods, a single attention map is typically extracted to measure the significance of each deep local feature, as illustrated in Fig. 1. Generally, an attention map corresponds to some semantic-aware visual pattern. Considering the diverse content in an image, a single attention map is unlikely to comprehensively capture all potential semantic patterns in an image.
|
| 41 |
+
|
| 42 |
+
To address the above issue, we propose a new framework with multiple dynamic attentions to detect diverse local features corresponding to different semantic patterns. In our method, we make use of intermediate feature maps from CNNs to generate attention maps. To decouple different semantic patterns, we introduce a channel mapping layer to adaptively reorganize the channels of input feature maps into multiple groups, each of which is fed to an attention head. In the attention head, we design a new dynamic attention module. Specially, we introduce a diversity regularization to ensure different heads focus on different patterns within the image. In the training stage, we perform attention pooling with the feature map and the multiple attention maps to generate a set of global representations and the whole network is optimized with image-level label. In the testing stage, we make use of those dynamic attention maps to select deep local features to represent each image. To achieve efficient retrieval on large image database, we quantize those deep local features with a codebook and match images with binarized aggregated match kernel [37].
|
| 43 |
+
|
| 44 |
+
Compared with previous attention-based local feature leaning methods, our approach is able to discover more diverse and distinctive local patterns, which favorably benefit the semantic content matching between images. We evaluate our approach on the Revisited Oxford and Paris datasets, which are further mixed with a million distractors. Ablation studies justify the effectiveness of the channel mapping layer, dynamic attention module, and diversity regularization loss. Our approach achieves superior performance over the existing state-of-the-art methods under similar setting.
|
| 45 |
+
|
| 46 |
+
# 2. Related Work
|
| 47 |
+
|
| 48 |
+
# 2.1. Local feature learning
|
| 49 |
+
|
| 50 |
+
Traditional local features [20, 2] are extracted with handcrafted detectors and descriptors based on low-level visual
|
| 51 |
+
|
| 52 |
+
information, which limits the discriminative power of local features. More recently, many methods have been proposed to learn the descriptors or detectors with deep neural networks. Savinov et al. [30] train a Quad-network for keypoint detection. Tian et al. [35] introduce second-order similarity to improve patch descriptors for image matching. Mishchuk et al. [21] propose a loss which maximizes the distance between the closest positive and closest negative example in the batch to learn powerful descriptors. Recently, D2-Net [8] and SuperPoint [6] propose an end-to-end framework to detect keypoints and compute descriptors. Although convincing results have been reported, these methods are not designed for the image retrieval task. They focus on image matching or image registration while our work focuses on large-scale image retrieval where memory requirements matter.
|
| 53 |
+
|
| 54 |
+
The most relevant works to ours come from [23, 34, 37]. Noh et al. [23] first explore learning local features for image retrieval with visual attention and image-level annotation. The locations with the strongest values on the attention map are selected, while the descriptors are slices of the feature map at selected locations. Based on DELF, Teichmann et al. [34] introduce region proposal network [28] (RPN) to detect objects presented in the image. They only consider local features in the region of interest and filter out irrelevant features. Tolias et al. [37] propose a non-parametric attention module and integrate dimensionality reduction into the network, which is trained by contrastive loss. Compared with the above methods, our work generates multiple disentangled attention maps independently for a single image. This prevents the model from focusing only on limited patterns of the image, thereby ignoring some patterns that may be helpful for image retrieval.
|
| 55 |
+
|
| 56 |
+
# 2.2. Local Feature Aggregation
|
| 57 |
+
|
| 58 |
+
Due to a large amount of memory required to store local features, many methods have been proposed to aggregate local features into a compact descriptor, such as BOW [33], Hamming Embedding [13], VLAD [14], FV [15] Triangulation [16] and ASMK [36]. Recently, some novel deep local feature aggregation methods are proposed to reorganize deep local features into a compact descriptor. Tolias et al. [38] use sliding windows to extract regional information, and then max-pooling is applied to the activation of each region. Babenko and Lempitsky [1] first propose to use sum-pooling, which performs well due to the subsequent descriptor whitening. Kalantidis et al. [19] apply channel and spatial attention on the activation before sum pooling. After that, GeM-pooling has been shown to give excellent results when trained with ArcFace loss [5]. It allows more than one position in the activation contributing to the aggregated representation, while still being more selective than the sum-pooling. The main advantage of these
|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2. Framework of our method. The components highlighted in gray are used during testing and training. The whole framework is trained with contrastive loss and diversity regularization to generate multiple discriminative deep local features. Gradient back-propagation is stopped from the multiple dynamic attention into the CNN backbone. During testing, the top $n$ strongest local features, according to the multiple attention maps, are kept to represent the image. Local features are aggregated with binarized ASMK [36] for efficient retrieval.
|
| 64 |
+
|
| 65 |
+
aggregation methods is that they provide high-performance image retrieval with a small memory footprint. In this work, we adopt the binarized ASMK as the aggregation method for local features.
|
| 66 |
+
|
| 67 |
+
# 2.3. Dimensionality Reduction and Whitening
|
| 68 |
+
|
| 69 |
+
Dimensionality reduction is widely used on image features in image retrieval since the memory footprint is critical for retrieval systems. Features with high dimensionality cost a large amount of memory, further slowing down online retrieval. On the other hand, as shown in [12], whitening reduces the co-occurrence of local features, which is beneficial for retrieval. Recently, Gordo et al. [9] propose to replace PCA/whitening with a fully-connected layer, which is learned during training. Tolias et al. [37] follow [9] in using a fully-connected layer to perform dimensionality reduction and whitening, but the parameters of their fully connected layer are learned using PCA and remain constant during training. Cao et al. [4] use an autoencoder to reduce the dimensionality of the extracted local features, and their autoencoder can also be trained end-to-end. In this work, we use the $1 \times 1$ convolutional layer to realize dimensionality
|
| 70 |
+
|
| 71 |
+
reduction on the local features, with parameters initialized by the results of PCA and further updated during training.
|
| 72 |
+
|
| 73 |
+
# 3. Method
|
| 74 |
+
|
| 75 |
+
# 3.1. Framework
|
| 76 |
+
|
| 77 |
+
The training and testing pipelines of our approach are illustrated in Fig. 2. Given an image, we apply a CNN backbone to obtain a feature map $S \in \mathcal{R}^{H_S \times W_S \times C_S}$ , where $H_S, W_S, C_S$ correspond to the height, width and number of channels. This feature map can be seen as a set of local descriptors. To select relevant patterns for image retrieval, we develop a new multiple dynamic attention (MDA) module $M$ with $N$ heads to predict which local features are discriminative for the objects of interest. Each head in MDA detects a certain pattern, while different heads focus on different patterns. $M$ first adaptively reorganizes $S$ with a channel mapping layer and then divides it into different groups uniformly. Each group is fed into the attention generation module to learn the attention maps independently. Since thousands of local features will be detected from an image, they must be compact to save memory cost. To this
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3. An overview of our dynamic attention module. The indicator vector varies with different instances.
|
| 81 |
+
|
| 82 |
+
end, we use a convolutional layer for dimension reduction. The local descriptors are obtained as $\mathcal{L} = T(S)$ , where $\mathcal{L}\in \mathcal{R}^{H_S\times W_S\times C_T}$ , and $T$ is a $1\times 1$ convolutional layer with $C_T$ filters.
|
| 83 |
+
|
| 84 |
+
During training, we obtain a set of global descriptors by pooling the local descriptors with each attention map. These global descriptors will be used to train the whole network only with image-level annotations. Specifically, we use a diversity regularization term to force different heads to focus on different patterns within the image. During testing, the top $n$ strongest descriptors $l$ from $\mathcal{L}$ are kept according to the importance in multiple attention maps. These local descriptors are used for large-scale image retrieval combined with binarized ASMK [36].
|
| 85 |
+
|
| 86 |
+
# 3.2. Multiple Dynamic Attention Module
|
| 87 |
+
|
| 88 |
+
To obtain attention maps that capture different patterns, we devise a multiple dynamic attention module. The feature maps of a convolutional neural network can be interpreted as a collection of 2D response maps of pattern detectors. However, feature channels corresponding to the same visual pattern are often not arranged in order. Given a feature map $S$ generated by backbone, we first use a $1 \times 1$ convolutional channel mapping layer to reorganize the channels:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\hat {\mathcal {S}} = \operatorname {C o n v} _ {1 \times 1} (\mathcal {S}), \tag {1}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $\hat{S} \in \mathcal{R}^{H_S \times W_S \times C_S}$ . Then, we divide the feature map $\hat{S}$ into $N$ different groups to represent multiple independent patterns. The collection of the groups is represented by $\mathcal{F} = \left\{F^1, F^2, \dots, F^N\right\}$ , where $F^i$ corresponds to channel $\left[(i - 1) \times \left\lfloor \frac{C_S}{N} \right\rfloor + 1, i \times \left\lfloor \frac{C_S}{N} \right\rfloor\right)$ of $\hat{S}$ . Finally, by feeding each $F^i \in \mathcal{F}$ into the attention generation module, $N$ pieces of attention maps are generated. We denote the set $\mathcal{A} = \left\{A^{(1)}, A^{(2)}, \dots, A^{(N)}\right\}$ as the generated collection of attention maps, where $A^{(i)} \in \mathcal{R}^{H_S \times W_S}$ .
|
| 95 |
+
|
| 96 |
+
Fig. 3 illustrates the attention generation module, termed as Dynamic Attention Head (DA). Given an intermediate feature map $F^i \in \mathcal{R}^{H_S \times W_S \times \lfloor \frac{C_S}{N} \rfloor}$ as input, DA first aggregates spatial information of the feature map using average pooling, generating a spatial context descriptors $F_{avg}^i$ . This descriptor is then fed to a $1 \times 1$ convolutional layer to produce our indicator vector $F_g^i \in \mathcal{R}^{1 \times 1 \times \lfloor \frac{C_S}{N} \rfloor}$ . In short, the
|
| 97 |
+
|
| 98 |
+
indicator vector is computed as:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array}{l} F _ {g} ^ {i} = \sigma \left(\operatorname {C o n v} _ {1 \times 1} \left(\operatorname {A v g P o o l} \left(F ^ {i}\right)\right)\right) \\ = \sigma \left(\mathbf {W} _ {\mathbf {g}} * F _ {a v g} ^ {i}\right), \\ \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
(2)
|
| 105 |
+
|
| 106 |
+
where $\sigma$ denotes ReLU function, and $\mathbf{W}_g\in \mathcal{R}^{\lfloor \frac{C_S}{N}\rfloor \times \lfloor \frac{C_S}{N}\rfloor}$ is learned during training. Then, the attention map can be generated as:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
A ^ {(i)} = \operatorname {S o f t p l u s} \left(F _ {g} ^ {i} \otimes F ^ {i}\right), \tag {3}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $A^{(i)}\in \mathcal{R}^{H_S\times W_S}$ and $\otimes$ denotes element-wise dot product. During multiplication, the indicator vector is broadcasted along the spatial dimension. Softplus is a smooth approximation to the ReLU function and can be used to constrain the output to always be positive.
|
| 113 |
+
|
| 114 |
+
In all, our MDA module produces multiple attention maps, each of them focuses on one specific pattern. Multiple attention maps capture different patterns. As shown in Fig. 1, our model focuses on many important and distinguishable patterns within the image, some of which are ignored by other methods.
|
| 115 |
+
|
| 116 |
+
# 3.3. Training Stage
|
| 117 |
+
|
| 118 |
+
To extract multiple discriminative and repeatable deep local feature regions for each image, we formulate two optimization objectives, i.e., contrastive loss and diversity regularization, to optimize the whole network.
|
| 119 |
+
|
| 120 |
+
Given image pairs $(i,j)$ and labels $Y(i,j)\in \{0,1\}$ in which label 1 denotes the image pair is matched, 0 otherwise. We obtain a set of global descriptors $\mathcal{G} = \left\{G^{(1)},G^{(2)},\dots ,G^{(N)}\right\}$ for each image by pooling the local descriptors $\mathcal{L}$ with each attention map in $\mathcal{A}$ :
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
G ^ {(i)} = \sum_ {h \in H _ {S}, w \in W _ {S}} A _ {h, w} ^ {(i)} \mathcal {L} _ {h, w}, \text {f o r} i = 1, 2, \dots , N, \tag {4}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
each corresponding to a certain head. Contrastive loss is applied to the global descriptor of each head separately. The loss summation for all heads can be defined as follows:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\begin{array}{l} L _ {C} = \left(1 - Y (i, j)\right) \sum_ {n = 1} ^ {N} \max \left(m - \left\| \hat {G} _ {i} ^ {(n)} - \hat {G} _ {j} ^ {(n)} \right\| _ {2}\right) ^ {2} \\ + Y (i, j) \sum_ {n = 1} ^ {N} \left\| \hat {G} _ {i} ^ {(n)} - \hat {G} _ {j} ^ {(n)} \right\| _ {2} ^ {2}, \tag {5} \\ \end{array}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
where $m$ is the margin, $N$ is the head number and $\hat{G}_i^{(n)}$ is the $l_{2}$ -normalized global descriptor $G_i^{(n)}$ . It enforces the corresponding global descriptor of each head to be highly distinguishable to discriminate whether the given image pair is matched or not.
|
| 133 |
+
|
| 134 |
+
For a given image, there is no guarantee that the attention map generated by one attention head is different from that of another head. Therefore, multiple attention heads may focus on the same pattern within image. We need to ensure
|
| 135 |
+
|
| 136 |
+
that different heads focus on different patterns of the given image to maximize the pattern information contained in the final descriptors. In other words, we should maximize the distance between any two attention maps.
|
| 137 |
+
|
| 138 |
+
For each attention map $A_{i}\in \mathcal{A}$ , we first flatten it into a vector $a_{i}\in \mathcal{R}^{HSWs}$ and apply the softmax function on it to make sure that the attention scores at all positions are positive and add up to one, as follows:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\hat {a} _ {i} = \operatorname {s o f t m a x} \left(a _ {i}\right), \text {f o r} i = 1, 2, \dots , N. \tag {6}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
Then, the Hellinger distance [3] between $\hat{a}_i\in \mathcal{R}^{H_S W_S}$ and $\hat{a}_j\in \mathcal{R}^{H_S W_S}$ is defined as:
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
H \left(\hat {a} _ {i}, \hat {a} _ {j}\right) = \frac {1}{\sqrt {2}} \left\| \sqrt {\hat {a} _ {i}} - \sqrt {\hat {a} _ {j}} \right\| _ {2}. \tag {7}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
Since $\sum_{l=1}^{H_S W_S} \hat{a}_{i,l} = 1$ :
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
H \left(\hat {a} _ {i}, \hat {a} _ {j}\right) ^ {2} = 1 - \left\langle \sqrt {\hat {a} _ {i}}, \sqrt {\hat {a} _ {j}} \right\rangle , \tag {8}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
where $\langle \sqrt{\hat{a}_i},\sqrt{\hat{a}_j}\rangle$ represents the dot product between vector $\sqrt{\hat{a}_i}$ and $\sqrt{\hat{a}_j}$ .
|
| 157 |
+
|
| 158 |
+
To increase the diversity of the attention maps, we should maximize the distance between each $\hat{a}_i$ and $\hat{a}_j$ . Thus, the regularization term to measure the similarities between attention maps is defined as:
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
L _ {r e g} = \frac {1}{N (N - 1)} \sum_ {i = 1} ^ {N} \sum_ {j \neq i} ^ {N} \left(\left\langle \sqrt {\hat {a} _ {i}}, \sqrt {\hat {a} _ {j}} \right\rangle - 1\right). \tag {9}
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
The final objective function is a combination of contrastive loss and diversity regularization balanced by $\lambda$ , as follows:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
L = L _ {C} + \lambda L _ {\text {r e g}}. \tag {10}
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
# 3.4. Testing Stage
|
| 171 |
+
|
| 172 |
+
During testing, local features are selected according to the importance given by $\mathcal{A}$ . Attention values from all heads are ranked jointly, and the local features corresponding to the top $n$ largest attention values are returned. Fig. 4 shows some examples of local features detected by different attention heads, which are well aligned in two views of a sample landmark. Furthermore, multi-scale extraction is performed during testing. We combine local features from all scales as the local descriptor set $\mathcal{X} = \{x_1, x_2, \ldots, x_n\}$ . Binarized aggregated match kernel framework [36] (ASMK*) is adopted to aggregate local features and compute similarities between images. The aggregated vectors are further indexed for efficient retrieval.
|
| 173 |
+
|
| 174 |
+
In $\mathrm{ASMK}^*$ framework, an image $X$ is described by a set of $nC_T$ -dimensional local descriptors $\mathcal{X}$ . These descriptors are quantized by a codebook $\mathcal{C}$ with $C$ visual words, learned using k-means. Denote $\mathcal{X}_c = \{x\in \mathcal{X}:q(x) = c\}$ as the subset of descriptors in $X$ which are assigned to visual
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
|
| 184 |
+

|
| 185 |
+
Figure 4. Qualitative examples of local features detected by four different attention heads on four pairs of matched images in ROxf dataset [26]. Features detected by same head are shown in the same color; only top 25 local features of each head are plotted.
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
|
| 193 |
+
word $c$ . The similarity between two images $X$ and $Y$ can be computed as:
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
K (X, Y) = \gamma (\mathcal {X}) \gamma (\mathcal {Y}) \sum_ {c \in \mathcal {C}} \sigma_ {\alpha} \left(\Phi \left(\mathcal {X} _ {c}\right) ^ {T} \Phi \left(\mathcal {Y} _ {c}\right)\right), \tag {11}
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
where $\mathcal{X}$ and $\mathcal{Y}$ denote local features sets of $X$ and $Y$ respectively. $\Phi (\mathcal{X})$ is an aggregated vector representation, $\sigma_{\alpha}(\cdot)$ denotes a scalar selectivity function and $\gamma (\mathcal{X})$ is the normalization factor. See [36] for the detailed definitions of above formulations.
|
| 200 |
+
|
| 201 |
+
# 4. Experiment
|
| 202 |
+
|
| 203 |
+
# 4.1. Experimental Setup
|
| 204 |
+
|
| 205 |
+
Training dataset. The training dataset $SfM120k$ [27] is used. It is obtained by 3D reconstruction of large collections of unlabelled images [31]. Given a large unannotated image collection, images are clustered and a 3D model is constructed per cluster. Matching pairs (anchor-positive) are formed by images with a sufficient number of co-observed 3D points (same 3D model). Non-matching pairs (anchor-negative) come from different 3D models. We use 551 3D models for training and 162 for validation.
|
| 206 |
+
|
| 207 |
+
Evaluation datasets and metrics. $\mathcal{R}\mathrm{Oxf}$ , $\mathcal{RPa}$ , $\mathcal{ROxf} + \mathcal{R1M}$ , and $\mathcal{RPa} + \mathcal{R1M}$ are used to evaluate our method. The $\mathcal{R}\mathrm{Oxf}$ and $\mathcal{RPa}$ [26] datasets are the revisited version of the original Oxford5k [24] and Paris6k datasets [25]. Both datasets contain 70 query images, and additionally include 4,993 and 6,322 database images respectively. Mean Average Precision (mAP) is used to evaluate the performance. There are three evaluation setups for these two datasets: Easy, Medium, and Hard. We report the Medium and Hard performance of $\mathcal{R}\mathrm{Oxf}$ and $\mathcal{RPa}$ . Large-scale results are further reported with the $\mathcal{R1M}$ distractors [26], which contains 1M images.
|
| 208 |
+
|
| 209 |
+
Implementation details. We use ResNet50 as backbone network, initialized by pre-training on ImageNet [11]. We obtain the feature map $S$ from the Conv4 output. Following
|
| 210 |
+
|
| 211 |
+
Tolias et al. [37], we also perform $3 \times 3$ average pooling before dimensionality reduction.
|
| 212 |
+
|
| 213 |
+
For training, each mini-batch contains 5 tuples, where a tuple consists of 7 images (1 query, 1 positive, and 5 negative images). Before each epoch, we randomly choose 2000 anchor-positive pairs and 20,000 candidate negative images. Hard-negative mining is performed to select 5 most difficult negative samples for each anchor-positive pair. We resize training images with the larger dimension equal to 921 pixels, preserving the aspect ratio. The model is optimized using Adam with weight decay equal to $10^{-6}$ , and an exponentially decaying learning rate with a decay rate of 0.99. The initial learning rate is set as $10^{-5}$ and $5 * 10^{-5}$ for the backbone and attention module, respectively. We set the margin $m = 0.9$ , the weight for $L_{reg}$ to $\lambda = 0.3$ and local feature dimension $C_T = 128$ . We conduct experiments with head numbers within $\{1,2,4,6,8,10,12\}$ and report results for the best performing one.
|
| 214 |
+
|
| 215 |
+
For testing, the default ASMK* configuration from Tolias et al. [36] is adopted. We use a codebook of size $C = 65,536$ . The codebook is learned on the local descriptors of the 5000 training image extracted at the original scale. Images are resized to the same size as training. We use 7 different scales, ranging from 0.25 to 2.0 and increasing by a factor of $\sqrt{2}$ , to construct the image pyramids. These pyramids are fed to the network, and the resulting local features from all the scales are combined. The top 2000 strongest local descriptors are selected for each image. When searching online, each local feature of the query image is assigned to 5 nearest visual words. We use the inverted index to speed up the online search. Specifically, using $k$ -means for codebook creation may lead to the randomness of results. We run each experiment 5 times and report the mean and standard deviation. In large-scale experiments, multiple visual word assignments are not performed to reduce the computational cost of online retrieval. Unless otherwise stated, the default configuration is used.
|
| 216 |
+
|
| 217 |
+
# 4.2. Ablation Experiments
|
| 218 |
+
|
| 219 |
+
Head numbers. Fig. 5 shows the mAP of our method on the Hard and Medium protocols of $\mathcal{R}\mathrm{Oxf - }\mathcal{RPa}$ for $N$ within $\{1,2,4,6,8,10,12\}$ . The mAP increases as $N$ is raised from 1 to 8, then drops when $N\geq 10$ . When $N = 1$ , our method achieves average performance equal to 57.8 and 64.2 in terms of mAP on Hard protocol for $\mathcal{R}\mathrm{Oxf - }\mathcal{RPa}$ , which outperforms HOW by 0.9 and 1.4 respectively. It proves that our DA can learn better local features.
|
| 220 |
+
|
| 221 |
+
Attention generation module. As shown in Fig. 6, the attention module of DELF [23] and HOW [37] can be regarded as the dot product of the indicator vector and the current feature map. In DELF, the attention map is simply generated by two $1 \times 1$ convolutional layers. The first convolutional layer is used for dimensionality reduction, and the
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Figure 5. Comparison of mAP against head num on $\mathcal{R}\mathrm{Oxf - }\mathcal{RP}$
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
|
| 228 |
+

|
| 229 |
+
Figure 6. Comparisons of different attention modules. DELF [23] uses a 2-layer CNN as the attention module, and the indicator vector is the weight of the second convolutional layer, which is learned during training. HOW [37] uses $l_{2}$ norm of the feature descriptor as the attention score, thus the indicator vectors are the current feature descriptors.
|
| 230 |
+
|
| 231 |
+
<table><tr><td rowspan="2">Attention Module</td><td rowspan="2">Stop Gradient</td><td colspan="2">Medium</td><td colspan="2">Hard</td></tr><tr><td>ROfx</td><td>RPar</td><td>ROfx</td><td>RPar</td></tr><tr><td>1 × 1 conv [23]</td><td>✓</td><td>80.5 ± 0.2</td><td>82.7 ± 0.1</td><td>60.6 ± 0.3</td><td>65.4 ± 0.3</td></tr><tr><td>l2 norm [37]</td><td>✓</td><td>80.9 ± 0.2</td><td>81.5 ± 0.1</td><td>60.5 ± 0.3</td><td>64.0 ± 0.2</td></tr><tr><td>1 × 1 conv + l2 norm</td><td>✓</td><td>80.4 ± 0.1</td><td>82.3 ± 0.2</td><td>60.5 ± 0.2</td><td>64.8 ± 0.3</td></tr><tr><td>DA (ours)</td><td>✗</td><td>80.5 ± 0.3</td><td>82.1 ± 0.2</td><td>60.3 ± 0.6</td><td>64.0 ± 0.1</td></tr><tr><td>DA (ours)</td><td>✓</td><td>81.8 ± 0.3</td><td>83.3 ± 0.2</td><td>62.2 ± 0.5</td><td>66.2 ± 0.2</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 1. Impact of the attention generation module on mAP on ROxf and RPar [26]. Results with head num $N = 8$ , feature num $n = 2000$ and local dimension $C_T = 128$ .
|
| 234 |
+
|
| 235 |
+
indicator vector is the weight of the second convolutional layer, which can be interpreted as a generalized feature of the foreground. It outputs similarly for various foreground features. However, foreground objects are diverse in different images. Only using a fixed indicator vector limits the discriminative power of local features. For HOW, the indicator vectors are equal to the current feature map. The $l_{2}$ norm of the corresponding local feature is directly used as attention value, which is also sub-optimal for extracting discriminative local features.
|
| 236 |
+
|
| 237 |
+
In Tab. 1, we compare the attention generation module of different methods. $1 \times 1$ conv and $l_{2}$ norm denote the attention generation methods of DELF and HOW, as shown in Fig. 6. Besides, we simply combine the attention maps generated by these two approaches ( $1 \times 1$ conv + $l_{2}$ norm). DA is the proposed attention generation module that dynamically generates different indicator vectors for each image, as discussed in Section 3.2. It can be seen that our DA head outperforms $1 \times 1$ conv and $l_{2}$ norm.
|
| 238 |
+
|
| 239 |
+
Stop gradient. The last two rows of Tab. 1 shows that
|
| 240 |
+
|
| 241 |
+
naively optimizing the whole network leads to suboptimal results because the attention module is trained from scratch, which may produce wrong gradients in the early stages of training. We address this issue by stopping gradient backpropagation from the attention branch to the network backbone. This means that the network backbone is optimized solely based on $L_{C}$ , and produces the desired distinctive feature representation. As shown in Tab. 1, controlling the gradient allows for better training of the network.
|
| 242 |
+
|
| 243 |
+
<table><tr><td rowspan="2">Channel Mapping</td><td rowspan="2">Diversity Regularization</td><td colspan="2">Medium</td><td colspan="2">Hard</td></tr><tr><td>\( \mathcal{R}\mathrm{Oxf} \)</td><td>\( \mathcal{RPa} \)</td><td>\( \mathcal{R}\mathrm{Oxf} \)</td><td>\( \mathcal{RPa} \)</td></tr><tr><td></td><td>✓</td><td>79.7 ± 0.3</td><td>80.1 ± 0.2</td><td>59.4 ± 0.6</td><td>61.2 ± 0.2</td></tr><tr><td>✓</td><td></td><td>80.3 ± 0.1</td><td>82.2 ± 0.1</td><td>60.2 ± 0.2</td><td>64.7 ± 0.2</td></tr><tr><td>✓</td><td>✓</td><td>81.8 ± 0.3</td><td>83.3 ± 0.2</td><td>62.2 ± 0.5</td><td>66.2 ± 0.2</td></tr></table>
|
| 244 |
+
|
| 245 |
+
Table 2. Ablation studies on each component corresponding to the diversity of attention maps. We gradually remove the channel mapping layer and diversity regularization in MDA. All models are trained with head num $N = 8$ , local dim $C_T = 128$ and we extract $n = 2000$ local features for each image.
|
| 246 |
+
|
| 247 |
+

|
| 248 |
+
Figure 7. Comparison of local features, trained separately or jointly, with different methods for dimensionality reduction.
|
| 249 |
+
|
| 250 |
+

|
| 251 |
+
|
| 252 |
+
Diversity of attention maps. To differentiate the distributions of attention maps, we introduce a channel mapping layer and diversity regularization. As shown in Tab. 2, without the channel mapping layer, diversity regularization alone yields unsatisfactory results. We attribute the loss to feature channels that respond to certain types of visual patterns are usually not arranged in order. If we simply divide the channel into several parts, each head will fail to learn different attention maps. Without diversity regularization, each head may generate similar attention maps and our MDA module may degrade to a single attention module. By jointly employing both of these two components, our method obtains obvious performance improvements.
|
| 253 |
+
|
| 254 |
+
Some qualitative results of the attention maps are shown in Fig. 8, where each row is the attention maps generated by the same attention head. It can be seen that different heads focus on different patterns in the image and each head focuses on a specific pattern, which implicitly enables pattern-alignment. For example, the first head focuses on the upper edge of the window, while the third head focuses on the sharp bumps and contours.
|
| 255 |
+
|
| 256 |
+
Dimensionality reduction. We compare the influence of feature dimension when local features are trained with dif-
|
| 257 |
+
|
| 258 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Local Dim</td><td colspan="2">Medium</td><td colspan="2">Hard</td></tr><tr><td>\( \mathcal{R}\mathbf{O}\mathbf{x}\mathbf{f} \)</td><td>\( \mathcal{R}\mathbf{P}\mathbf{a}\mathbf{r} \)</td><td>\( \mathcal{R}\mathbf{O}\mathbf{x}\mathbf{f} \)</td><td>\( \mathcal{R}\mathbf{P}\mathbf{a}\mathbf{r} \)</td></tr><tr><td rowspan="3">\( \mathrm{DELF}\left[23\right]^{\dagger } \)</td><td>32</td><td>72.2±0.3</td><td>75.2±0.1</td><td>48.2±0.5</td><td>51.3±0.2</td></tr><tr><td>64</td><td>76.6±0.3</td><td>80.1±0.2</td><td>54.8±0.4</td><td>60.7±0.3</td></tr><tr><td>96</td><td>78.5±0.1</td><td>81.2±0.2</td><td>56.6±0.3</td><td>62.4±0.3</td></tr><tr><td rowspan="3">HOW [37]</td><td>32</td><td>72.5±0.3</td><td>72.7±0.4</td><td>49.6±0.4</td><td>50.1±0.3</td></tr><tr><td>64</td><td>76.4±0.3</td><td>79.1±0.2</td><td>54.1±0.3</td><td>59.6±0.3</td></tr><tr><td>96</td><td>78.5±0.2</td><td>80.2±0.3</td><td>56.4±0.2</td><td>61.4±0.2</td></tr><tr><td rowspan="3">Ours</td><td>32</td><td>74.6±0.3</td><td>76.9±0.3</td><td>51.9±0.6</td><td>55.0±0.4</td></tr><tr><td>64</td><td>79.5±0.2</td><td>81.1±0.2</td><td>59.2±0.3</td><td>62.7±0.2</td></tr><tr><td>96</td><td>81.0±0.3</td><td>82.1±0.3</td><td>60.2±0.4</td><td>65.0±0.2</td></tr></table>
|
| 259 |
+
|
| 260 |
+
Table 3. The effect of local feature dimension. DELF marked by $\dagger$ is an improvement of the original method: dimensionality reduction is no longer used as post-processing but is integrated into the network for end-to-end training and contrastive loss is used.
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 8. Qualitative examples of multiple dynamic attention maps on the ROxf datasets [26]. Each column depicts the source image and four corresponding attention maps obtained for four randomly selected heads.
|
| 264 |
+
|
| 265 |
+
ferent attention modules. The performance for varying descriptor dimensions is shown in Tab. 3. Our method works better in all dimensions than DELF and HOW.
|
| 266 |
+
|
| 267 |
+
In Fig. 7, we present ablation experiments on different types of dimensionality reduction. First, we use a $1 \times 1$ convolutional layer to reduce the dimensionality, with parameters learned during training (CONV). Second, dimensionality reduction is used as a post-processing, which is denoted as PCA. High-dimensional features are used during training and PCA is used to reduce the dimensionality of the features at the end of training. Third, we jointly train an autoencoder (AE) for dimensionality reduction. It consists of two convolutional layers, with the first layer reducing the dimension of
|
| 268 |
+
|
| 269 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Loss</td><td rowspan="2">Train Set</td><td rowspan="2">Memory(GB)</td><td colspan="4">Medium</td><td colspan="4">Hard</td></tr><tr><td>\( \mathcal{R}\mathcal{O}\mathcal{X}\mathcal{f} \)</td><td>\( \mathcal{R}\mathcal{O}\mathcal{X}\mathcal{f}+\mathcal{R}\mathcal{I}\mathcal{M} \)</td><td>\( \mathcal{R}\mathcal{P}\mathcal{A}\mathcal{r} \)</td><td>\( \mathcal{R}\mathcal{P}\mathcal{A}\mathcal{r}+\mathcal{R}\mathcal{I}\mathcal{M} \)</td><td>\( \mathcal{R}\mathcal{O}\mathcal{X}\mathcal{f} \)</td><td>\( \mathcal{R}\mathcal{O}\mathcal{X}\mathcal{f}+\mathcal{R}\mathcal{I}\mathcal{M} \)</td><td>\( \mathcal{R}\mathcal{P}\mathcal{A}\mathcal{r} \)</td><td>\( \mathcal{R}\text{Par}+\mathcal{R}\mathbf{1}\mathbf{M} \)</td></tr><tr><td colspan="12">Compact global descriptors</td></tr><tr><td>R101-R-MAC [9]</td><td>Triplet</td><td>NC-clean</td><td>7.6</td><td>60.9</td><td>39.3</td><td>78.9</td><td>54.8</td><td>32.4</td><td>12.5</td><td>59.4</td><td>28.0</td></tr><tr><td>R101-GeM [27]</td><td>Triplet</td><td>SfM-120k</td><td>7.6</td><td>64.7</td><td>45.2</td><td>77.2</td><td>52.3</td><td>38.5</td><td>19.9</td><td>56.3</td><td>24.7</td></tr><tr><td>R101-GeM↑[32]</td><td>Triplet</td><td>SfM-120k</td><td>7.6</td><td>65.3</td><td>46.1</td><td>77.3</td><td>52.6</td><td>39.6</td><td>22.2</td><td>56.6</td><td>24.8</td></tr><tr><td>R101-GeM-AP [29]</td><td>AP</td><td>NC-clean</td><td>7.6</td><td>67.5</td><td>47.5</td><td>80.1</td><td>52.5</td><td>42.8</td><td>23.2</td><td>60.5</td><td>25.1</td></tr><tr><td>R101-GeM-AP [29]</td><td>AP</td><td>GLDv1-noisy</td><td>7.6</td><td>66.3</td><td>-</td><td>80.2</td><td>-</td><td>42.5</td><td>-</td><td>60.8</td><td>-</td></tr><tr><td>R101-GeM+SOLAR [22]</td><td>Triplet/SOS</td><td>GLDv1-noisy</td><td>7.6</td><td>69.6</td><td>53.5</td><td>81.6</td><td>59.2</td><td>47.9</td><td>29.9</td><td>64.5</td><td>33.4</td></tr><tr><td>R50-DELG [4]</td><td>ArcFace</td><td>GLDv1-noisy</td><td>7.6</td><td>69.7</td><td>55.0</td><td>81.6</td><td>59.7</td><td>45.1</td><td>27.8</td><td>63.4</td><td>34.1</td></tr><tr><td>R101-DELG [4]</td><td>ArcFace</td><td>GLDv1-noisy</td><td>7.6</td><td>73.2</td><td>54.8</td><td>82.4</td><td>61.8</td><td>51.2</td><td>30.3</td><td>64.7</td><td>35.5</td></tr><tr><td>R50-DELG [4]</td><td>ArcFace</td><td>GLDv2-clean</td><td>7.6</td><td>73.6</td><td>60.6</td><td>85.7</td><td>68.6</td><td>51.0</td><td>32.7</td><td>71.5</td><td>44.4</td></tr><tr><td>R101-DELG [4]</td><td>ArcFace</td><td>GLDv2-clean</td><td>7.6</td><td>76.3</td><td>63.7</td><td>86.6</td><td>70.6</td><td>55.6</td><td>37.5</td><td>72.4</td><td>46.9</td></tr><tr><td colspan="12">Local features aggregation with binarized ASMK</td></tr><tr><td>HesAff-rSIFT-ASMK* [26], \( C_T = 128 \)</td><td>-</td><td>-</td><td>62.0</td><td>60.4</td><td>45.0</td><td>61.2</td><td>42.0</td><td>36.4</td><td>25.7</td><td>34.5</td><td>16.5</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {D}\mathrm {E}\mathrm {L}\mathrm {F}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*}+\mathrm {S}\mathrm {P} \left[26\right], n = 1000, C_T = 128 \)</td><td>CE</td><td>GLDv1-noisy</td><td>9.2</td><td>67.8</td><td>53.8</td><td>76.9</td><td>57.3</td><td>43.1</td><td>31.2</td><td>55.4</td><td>26.4</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {D}\mathrm {E}\mathrm {L}\mathrm {F}\text{-}\mathrm {D}\mathrm {2}\mathrm {R}\text{-}\mathrm {R}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left[34\right], n = 1000, C_T = 128 \)</td><td>CE</td><td>GLDv1-noisy</td><td>27.6</td><td>73.3</td><td>61.0</td><td>80.7</td><td>60.2</td><td>47.6</td><td>33.6</td><td>61.3</td><td>29.9</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {D}\mathrm {E}\mathrm {L}\mathrm {F}\text{-}\mathrm {D}\mathrm {2}\mathrm {R}\text{-}\mathrm {R}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*}+\mathrm {S}\mathrm {P} \left[34\right], n = 1000, C_T = 128 \)</td><td>CE</td><td>GLDv1-noisy</td><td>27.6</td><td>76.0</td><td>64.0</td><td>80.2</td><td>59.7</td><td>52.4</td><td>38.1</td><td>58.6</td><td>29.4</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {H}\mathrm {OW}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left[37\right], n = 1000, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>7.6</td><td>78.3</td><td>63.6</td><td>80.1</td><td>58.4</td><td>55.8</td><td>36.8</td><td>60.1</td><td>30.7</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {H}\mathrm {OW}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left[37\right], n = 1200, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>9.2</td><td>78.8</td><td>64.5</td><td>80.6</td><td>59.6</td><td>56.7</td><td>37.7</td><td>61.0</td><td>31.7</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {H}\mathrm {OW}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left[37\right], n = 1400, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>10.6</td><td>79.1</td><td>64.9</td><td>81.0</td><td>60.4</td><td>56.8</td><td>38.2</td><td>61.5</td><td>32.6</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {H}\mathrm {OW}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left[37\right], n = 2000, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>14.3</td><td>79.4</td><td>65.8</td><td>81.6</td><td>61.8</td><td>56.9</td><td>38.9</td><td>62.4</td><td>33.7</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {M}\mathrm {DA}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left(\mathrm {Ours}\right), n = 2000, C_T = 64 \)</td><td>Contrastive</td><td>SfM-120k</td><td>7.4</td><td>79.5</td><td>65.6</td><td>81.1</td><td>61.3</td><td>59.2</td><td>42.6</td><td>62.7</td><td>35.0</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {M}\mathrm {DA}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left(\mathrm {Ours}\right), n = 1000, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>7.6</td><td>81.5</td><td>66.5</td><td>81.8</td><td>61.8</td><td>61.9</td><td>43.1</td><td>63.7</td><td>36.1</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {M}\mathrm {DA}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left(\mathrm {Ours}\right), n = 1200, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>8.9</td><td>81.9</td><td>67.5</td><td>82.3</td><td>62.9</td><td>62.3</td><td>43.7</td><td>64.6</td><td>37.1</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {M}\mathrm {DA}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left(\mathrm {Ours}\right), n = 1400, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>10.1</td><td>82.0</td><td>67.9</td><td>82.7</td><td>63.6</td><td>62.6</td><td>44.6</td><td>65.2</td><td>37.8</td></tr><tr><td>\( ^{-}\mathrm {R}50\text{-}\mathrm {M}\mathrm {DA}\text{-}\mathrm {A}\mathrm {S}\mathrm {M}\mathrm {K}^{*} \left(\mathrm {Ours}\right), n = 2000, C_T = 128 \)</td><td>Contrastive</td><td>SfM-120k</td><td>13.4</td><td>81.8</td><td>68.7</td><td>83.3</td><td>64.7</td><td>62.2</td><td>45.3</td><td>66.2</td><td>38.9</td></tr></table>
|
| 270 |
+
|
| 271 |
+
Table 4. mAP comparison against retrieval state-of-the-art methods on the ROxford (ROxf) and RParis (RPar) datasets (and their large-scale extensions ROxf+R1M and RPar+R1M), with Medium and Hard evaluation protocols. Memory is reported for R1M distractor set. The datasets used for training are shown in brackets. ↑:upsampling; SP:spatial matching [24]. We denote ResNet101 and ResNet50 by R101 and R50. ~R50 refers to a version of ResNet50 with the last block skipped.
|
| 272 |
+
|
| 273 |
+
features and the second layer restoring the original features. Mean-squared error loss that measures how well the autoencoder can reconstruct features is used to guide its learning. From Fig. 7, our method (CONV) achieves the best results compared to other methods for both datasets and different evaluation protocols.
|
| 274 |
+
|
| 275 |
+
# 4.3. Comparison with the State-of-the-Art
|
| 276 |
+
|
| 277 |
+
mAP comparison. We conduct an extensive comparison of our method with state-of-the-art methods. All methods are tested on ROxf, ROxf+R1M, RPar and RPar+R1M. The results are shown in Tab. 4. Our MDA achieves the best mAP performance in most cases. We outperform previous state-of-the-art local aggregation methods in terms of mAP in the most challenging Hard protocol for ROxf and RPar by significant $5.7\%$ and $3.8\%$ gains respectively. For R1M, MDA also achieves the highest performance across local aggregation methods, outperforming in mAP the SOTA by $2.9\%$ on ROxf-Medium, $6.4\%$ on ROxf-Hard; and by $2.9\%$ on RPar-Medium, $5.2\%$ on RPar-Hard. The bottom fifth row of Tab. 4 shows that when we use 64-dimensional local features, we can still achieve comparable performance to the previous state-of-the-art method. The improvements are even higher when compared to global descriptors.
|
| 278 |
+
|
| 279 |
+
Speed and memory costs. In Tab. 4, we list the memory footprint required by different methods for $\mathcal{R}1\mathrm{M}$ . It should be noted that the memory requirement for local aggregation methods is higher than for global features e.g. 14.3GB as reported in HOW [37] vs. 7.6GB for GeM [27] descriptors in the $\mathcal{R}1\mathrm{M}$ -distractors set. Our method and HOW have almost the same memory footprint. For images with $n = 1000$ and $n = 2000$ local features, our method re
|
| 280 |
+
|
| 281 |
+
quires 7.6GB and 13.4GB of memory, respectively. We can further reduce the memory requirement by reducing the dimension of local features e.g. 7.4GB when $n = 2000$ and $C_T = 64$ , which is less than GeM descriptors. It takes an average of 140ms for our method to extract 2000 local features from an image, which is a bit slower than HOW [37] (e.g. 127ms), on an RTX 2080Ti GPU. When 1000 local features are extracted from an image, it takes on average 0.71 seconds to search on $\mathcal{R}\mathrm{Oxf} + \mathcal{R}\mathrm{1M}$ with the help of inverted index implemented by Python, which proves the potential of our method on real-time image retrieval.
|
| 282 |
+
|
| 283 |
+
# 5. Conclusions
|
| 284 |
+
|
| 285 |
+
In this paper, we propose a novel local feature learning framework for image retrieval. It contains a multi-dynamic attention module to simultaneously detect multiple discriminative local patterns in images, which allows for a more comprehensive capture of various semantic information of the image. The proposed network only needs image-level annotations and can be trained end-to-end. Extensive experiments demonstrate superior performance on image retrieval benchmark datasets. In the future, we will expand the research in two directions. First, how to integrate the large visual codebook and quantization process into a framework for end-to-end training. Second, how to introduce multiscale structures into the network, without resizing images to multi-scales during testing.
|
| 286 |
+
|
| 287 |
+
Acknowledgements. This work was supported in part by the National Key R&D Program of China under contract 2018YFB1402605, in part by the National Natural Science Foundation of China under Contract 61822208 and 62021001, and in part by the Youth Innovation Promotion Association CAS under Grant 2018497. It was also supported by the GPU cluster built by MCC Lab of Information Science and Technology Institution, USTC.
|
| 288 |
+
|
| 289 |
+
# References
|
| 290 |
+
|
| 291 |
+
[1] Artem Babenko and Victor Lempitsky. Aggregating deep convolutional features for image retrieval. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1269-1277, 2015. 2
|
| 292 |
+
[2] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. SURF: Speeded up robust features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 404-417, 2006. 1, 2
|
| 293 |
+
[3] Rudolf Beran et al. Minimum hellinger distance estimates for parametric models. The annals of Statistics, pages 445-463, 1977. 5
|
| 294 |
+
[4] Bingyi Cao, André Araujo, and Jack Sim. Unifying deep local and global features for image search. In Proceedings of the European Conference on Computer Vision (ECCV), pages 726-743, 2020. 2, 3, 8
|
| 295 |
+
[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. ArcFace: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2
|
| 296 |
+
[6] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Superpoint: Self-supervised interest point detection and description. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops (CVPRW), pages 224-236, 2018. 1, 2
|
| 297 |
+
[7] Jiri Matas Dmytro Mishkin, Filip Radenovic. Repeatability is not enough: Learning discriminative affine regions via discriminability. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 1
|
| 298 |
+
[8] Mihai Dusmanu, Ignacio Rocco, Tomas Pajdla, Marc Pollefeys, Josef Sivic, Akihiko Torii, and Torsten Sattler. D2-net: A trainable cnn for joint description and detection of local features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8092-8101, 2019. 2
|
| 299 |
+
[9] Albert Gordo, Jon Almazan, Jerome Revaud, and Diane Larlus. End-to-end learning of deep visual representations for image retrieval. International Journal of Computer Vision (IJCV), pages 237-254, 2017. 1, 2, 3, 8
|
| 300 |
+
[10] Zhang Hanwang, Zha Zheng-Jun, Yan Shuicheng, Bian Jingwen, and Chua Tat-Seng. Attribute feedback. Proceedings of the ACM international conference on Multimedia (MM), pages 79-88, 2012. 1
|
| 301 |
+
[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 5
|
| 302 |
+
[12] Hervé Jégou and Ondrej Chum. Negative evidences and co-occurrences in image retrieval: the benefit of pca and whiten-ing. In Proceedings of the European Conference on Computer Vision (ECCV), 2012. 3
|
| 303 |
+
[13] Herve Jegou, Matthijs Douze, and Cordelia Schmid. Hamming embedding and weak geometric consistency for large scale image search. In Proceedings of the European Conference on Computer Vision (ECCV), pages 304-317, 2008. 2
|
| 304 |
+
|
| 305 |
+
[14] Hervé Jégou, Matthijs Douze, Cordelia Schmid, and Patrick Pérez. Aggregating local descriptors into a compact image representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3304-3311, 2010. 2
|
| 306 |
+
[15] Hervé Jégou, Florent Perronnin, Matthijs Douze, Jorge Sánchez, Patrick Pérez, and Cordelia Schmid. Aggregating local image descriptors into compact codes. IEEE transactions on pattern analysis and machine intelligence (TPAMI), pages 1704-1716, 2011. 2
|
| 307 |
+
[16] Hervé Jégou and Andrew Zisserman. Triangulation embedding and democratic aggregation for image search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3310-3317, 2014. 2
|
| 308 |
+
[17] Cai Junjie, Zha Zheng-Jun, Wang Meng, Zhang Shiliang, and Tian Qi. An attribute-assisted reranking model for web image search. IEEE transactions on image processing (TIP), pages 261-272, 2014. 1
|
| 309 |
+
[18] Cai Junjie, Zha Zheng-Jun, Zhou Wengang, and Tian Qi. Attribute-assisted reranking for web image retrieval. Proceedings of the ACM international conference on Multimedia (MM), pages 873-876, 2012. 1
|
| 310 |
+
[19] Yannis Kalantidis, Clayton Mellina, and Simon Osindero. Cross-dimensional weighting for aggregated deep convolutional features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 685-701, 2016. 1, 2
|
| 311 |
+
[20] David G Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision (IJCV), pages 91-110, 2004. 1, 2
|
| 312 |
+
[21] Anastasiya Mishchuk, Dmytro Mishkin, Filip Radenovic, and Jiri Matas. Working hard to know your neighbor's margins: Local descriptor learning loss. In Conference and Workshop on Neural Information Processing Systems (NeurIPS), 2017. 1, 2
|
| 313 |
+
[22] Tony Ng, Vassileios Balntas, Yurun Tian, and Krystian Mikolajczyk. SOLAR: second-order loss and attention for image retrieval. In Proceedings of the European Conference on Computer Vision (ECCV), pages 253-270, 2020. 8
|
| 314 |
+
[23] Hyeonwoo Noh, Andre Araujo, Jack Sim, Tobias Weyand, and Bohyung Han. Large-scale image retrieval with attentive deep local features. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 3456-3465, 2017. 1, 2, 6, 7
|
| 315 |
+
[24] James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-8, 2007. 5, 8
|
| 316 |
+
[25] James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Lost in quantization: Improving particular object retrieval in large scale image databases. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-8, 2008. 5
|
| 317 |
+
[26] Filip Radenović, Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Revisiting oxford and paris: Large-scale image retrieval benchmarking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5706-5715, 2018. 5, 6, 7, 8
|
| 318 |
+
|
| 319 |
+
[27] Filip Radenović, Giorgos Tolias, and Ondrej Chum. Finetuning cnn image retrieval with no human annotation. IEEE transactions on pattern analysis and machine intelligence (TPAMI), pages 1655-1668, 2018. 1, 2, 5, 8
|
| 320 |
+
[28] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Conference and Workshop on Neural Information Processing Systems (NeurIPS), pages 91-99, 2015. 2
|
| 321 |
+
[29] Jerome Revaud, Jon Almazán, Rafael S Rezende, and Cesar Roberto de Souza. Learning with average precision: Training image retrieval with a listwise loss. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5107-5116, 2019. 8
|
| 322 |
+
[30] Nikolay Savinov, Akihito Seki, Lubor Ladicky, Torsten Sattler, and Marc Pollefeys. Quad-networks: Unsupervised learning to rank for interest point detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2
|
| 323 |
+
[31] Johannes L. Schonberger, Filip Radenovic, Ondrej Chum, and Jan-Michael Frahm. From single image query to detailed 3d reconstruction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 5
|
| 324 |
+
[32] Oriane Simeoni, Yannis Avrithis, and Ondrej Chum. Local features and visual words emerge in activations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 8
|
| 325 |
+
[33] Josef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1470-1470, 2003. 2
|
| 326 |
+
[34] Marvin Teichmann, Andre Araujo, Menglong Zhu, and Jack Sim. Detect-to-retrieve: Efficient regional aggregation for image search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5109-5118, 2019. 2, 8
|
| 327 |
+
[35] Yurun Tian, Xin Yu, Bin Fan, Fuchao Wu, Huub Heijnen, and Vassileios Balntas. SOSNet: Second order similarity regularization for local descriptor learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2
|
| 328 |
+
[36] Giorgos Tolias, Yannis Avrithis, and Hervé Jégou. To aggregate or not to aggregate: Selective match kernels for image search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1401-1408, 2013. 2, 3, 4, 5, 6
|
| 329 |
+
[37] Giorgos Tolias, Tomas Jenicek, and Ondrej Chum. Learning and aggregating deep local descriptors for instance-level recognition. In Proceedings of the European Conference on Computer Vision (ECCV), pages 460-477, 2020. 1, 2, 3, 6, 7, 8
|
| 330 |
+
[38] Giorgos Tolias, Ronan Sicre, and Hervé Jégou. Particular Object Retrieval With Integral Max-Pooling of CNN Activations. In International Conference on Learning Representations (ICLR), pages 1-12, 2016. 1, 2
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10418b4bd6d675388b0558b92a72b72b10322b63b33df4312b4ea2b1915acb1a
|
| 3 |
+
size 745729
|
learningdeeplocalfeatureswithmultipledynamicattentionsforlargescaleimageretrieval/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f80f773bd91c1dce6ebd8c8bc83afa980828c4039d2febd8eb63c71dc7e27164
|
| 3 |
+
size 433167
|
learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34d3b54beb01df1135d83387917d40a69d533c34eb1e409f89fb3c8122db45e8
|
| 3 |
+
size 99200
|
learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04006853c96da4a865375061813389c0f026b2a13a848dcb0ef4604e568f2e1b
|
| 3 |
+
size 124677
|
learningdualpriorsforjpegcompressionartifactsremoval/78bfc63f-2b16-4841-988e-4f6f74b54c32_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc5a36ffb794af3366595eea4d7068ef4e13c0fc29009145830eb959a8c59aea
|
| 3 |
+
size 7660575
|
learningdualpriorsforjpegcompressionartifactsremoval/full.md
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning Dual Priors for JPEG Compression Artifacts Removal
|
| 2 |
+
|
| 3 |
+
Xueyang Fu $^{1}$ , Xi Wang $^{1}$ , Aiping Liu $^{1}$ , Junwei Han $^{2}$ , Zheng-Jun Zha $^{1*}$ $^{1}$ University of Science and Technology of China, China
|
| 4 |
+
$^{2}$ Northwestern Polytechnical University, China
|
| 5 |
+
|
| 6 |
+
$\{xyfu, aipingl, zhazj\} @ustc.edu.cn, wangxxi@mail.ustc.edu.cn, jhan@nwpu.edu.cn$
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Deep learning (DL)-based methods have achieved great success in solving the ill-posed JPEG compression artifacts removal problem. However, as most DL architectures are designed to directly learn pixel-level mapping relationships, they largely ignore semantic-level information and lack sufficient interpretability. To address the above issues, in this work, we propose an interpretable deep network to learn both pixel-level regressive prior and semantic-level discriminative prior. Specifically, we design a variational model to formulate the image de-blocking problem and propose two prior terms for the image content and gradient, respectively. The content-relevant prior is formulated as a DL-based image-to-image regressor to perform as a de-blocker from the pixel-level. The gradient-relevant prior serves as a DL-based classifier to distinguish whether the image is compressed from the semantic-level. To effectively solve the variational model, we design an alternating minimization algorithm and unfold it into a deep network architecture. In this way, not only the interpretability of the deep network is increased, but also the dual priors can be well estimated from training samples. By integrating the two priors into a single framework, the image de-blocking problem can be well-constrained, leading to a better performance. Experiments on benchmarks and real-world use cases demonstrate the superiority of our method to the existing state-of-the-art approaches.
|
| 11 |
+
|
| 12 |
+
# 1. Introduction
|
| 13 |
+
|
| 14 |
+
With the rapid development of consumer devices (e.g., digital cameras and smartphones) and wireless network, the number of images and videos has achieved explosive
|
| 15 |
+
|
| 16 |
+
*Corresponding author: Zheng-Jun Zha. This work was supported in part by the National Key Research and Development Program of China under Grant 2020AAA0105702; in part by the National Natural Science Foundation of China (NSFC) under Grants U19B2038 and 61901433; in part by the University Synergy Innovation Program of Anhui Province under Grant GXXT-2019-025; and in part by the USTC Research Funds of the Double First-Class Initiative under Grant YD2100002003.
|
| 17 |
+
|
| 18 |
+
growth, which has brought more pressure and challenges to storage and transmission systems. To save the storage capacity and transmission bandwidth, captured images and videos are usually compressed to reduce information redundancy. Lossy compression algorithms, e.g., Joint Photographic Experts Group (JPEG) [43] and High Efficiency Video Coding (HEVC) [41], have been widely explored to achieve this goal. However, due to the inevitable signal loss during compression, these compression algorithms usually generate visually unpleasing compression artifacts. These artifacts not only decrease the visual quality, but also degrade the performance of downstream computer vision systems, especially at high compression ratios. Therefore, removing compression artifacts is an important post-processing task and has attracted more attention in recent years [20, 30]. We refer the reader to review articles [28, 30] for more details. In this paper, we focus on alleviating still image degradation caused by JPEG compression, which is one of the most prevalent compression standards.
|
| 19 |
+
|
| 20 |
+
JPEG compression first applies the discrete cosine transformation (DCT) on $8 \times 8$ pixel blocks. Then, these DCT coefficients are coarsely quantized to remove high-frequency details to save space. Due to the independent processing on each pixel block and the removal of high-frequency details, compressed images usually suffer from blocking and blurring artifacts. In addition, using a large quantization step, banding artifacts will appear in smooth areas. Some recent studies have proposed methods to remove undesirable JPEG compression artifacts. According to the design mechanism, these methods can be roughly classified into two categories: model-based methods and deep learning (DL)-based methods. Early model-based works perform filtering to remove compression artifacts. For instance, Foi et al. [12] propose a shape-adaptive DCT filtering method for compression artifacts reduction. On the other hand, since multiple latent clear versions can be estimated from a single compressed image, this task is essentially an ill-posed inverse problem, which requires prior knowledge to constrain it. Along this research direction, many researchers formulate this problem as a minimization of a variational model with favor
|
| 21 |
+
|
| 22 |
+
able prior terms. Based on the maximum a posteriori (MAP) framework, many prior models, e.g., quantization step [55], sparse representation [3] and low rank [59], have been developed. Although these model-driven methods have shown good performance, the representation abilities of handcrafted priors are limited, which leads to unstable results when processing compressed images with complex structures.
|
| 23 |
+
|
| 24 |
+
In the past few years, DL-based methods have achieved significant progress of JEPG artifacts removal [8, 57, 63]. Due to the powerful nonlinear capacity [16, 21, 22, 29, 53] and huge amounts of training data, these methods can learn the inverse mapping of compression degradations, and thus produce better results than model-driven methods. However, most of current DL-based methods adopt feed-forward networks to directly predict clear images, making them like black boxes and lack interpretability. In addition, since these DL-based methods only learn pixel-level mappings, semantic-level information is not fully explored and exploited, which further limits their performance improvement.
|
| 25 |
+
|
| 26 |
+
Different from these methods, we propose an interpretable deep network by combining advantages of both the model-based methods and data-driven DL models. Specifically, we introduce an effective algorithm with DL to learn a pixel-level regressive prior for image content and a semantic-level discriminative prior for image gradient, respectively. First, we model the content-relevant prior as an image-to-image regressor to perform de-blocking, and design the gradient-relevant prior as binary classifier to distinguish whether the image is compressed. Then, the image de-blocking problem is formulated as a minimization of a variational model with the two proposed priors. To effectively solve the model, we design an alternating minimization scheme based on the gradient descent technique and half-quadratic splitting method. Finally, the iterative algorithm is unfolded into a deep network architecture, in which the two priors can be automatically learned through an effective network training strategy. We show that our method is able to predict visually pleasing de-blocked images while removing undesirable JPEG artifacts sufficiently. The contributions of this work are as follows:
|
| 27 |
+
|
| 28 |
+
- We propose two effective priors to describe the image content and image gradient from the pixel-level and semantic-level, respectively. By using the two priors as the regularizer, we introduce a new variational model for the JPEG compression artifacts removal.
|
| 29 |
+
- We propose an alternating minimization algorithm, which is based on the gradient descent technique and half-quadratic splitting method, to solve the variational model. By unfolding the algorithm, we design a new deep network architecture for the image de-blocking problem. In this way, the two proposed priors can be automatically estimated from training samples. In ad
|
| 30 |
+
|
| 31 |
+
dition, since the feed-forward process mimics the processing flow of the alternating minimization algorithm, the interpretability of the deep model is increased.
|
| 32 |
+
|
| 33 |
+
- We collect a new dataset containing compressed/clear image pairs based on the popular online social software WeChat. This dataset aims to complement the existing Twitter dataset [8] to serve the relevant research communities. Extensive experiments show that our proposed network performs favorably against state-of-the-arts on both benchmarks and real-world use cases.
|
| 34 |
+
|
| 35 |
+
# 2. Related work
|
| 36 |
+
|
| 37 |
+
# 2.1. Model-based methods
|
| 38 |
+
|
| 39 |
+
In early studies, image filtering technologies are widely explored to explicitly remove compression artifacts. For instance, a quadratic programming technology with an adaptive is proposed in [36] to remove blocking artifacts and preserve image details. An adaptive neighborhood for smoothing and conducting post-filtering in shifted windows is introduced in method [54]. Yoo et al. [49] utilize group-based filtering to improve the correlation between image blocks and reduce blocking artifacts. Foi et al. [12] achieve both the image de-noising and de-blocking by conducting filtering in the shape-adaptive DCT domain.
|
| 40 |
+
|
| 41 |
+
On the other hand, prior knowledge also plays a vital role in this task since it is an ill-posed inverse problem. Many researchers make great effort to explore effective priors to constrain the solution space. As one of the most important priors, the quantization step can be utilized to estimate the range of the DCT coefficients of the clear image to constrain the de-blocked result [35, 55]. Other image priors, e.g., sparse representation [3, 4, 40, 52], low rank [59], non-local self-similarity [60] and graph [34], are also explored and exploited. Li et al. [27] combine image decomposition algorithm and sparse prior to achieve both JPEG artifacts removal and image enhancement. Liu et al. [35] improve image de-blocking by exploiting the sparsity in both the image and DCT domains. In [37], a graph-based low-rank prior is introduced to reflect the manifold structures of image patches. Zhang et al. [59] reduce compression artifacts by exploring the non-local similarity in the DCT domain. Liu et al. [34] propose a graph smoothness prior to jointly reduce compression artifacts and improve contrast based on the Retinex theory. Although these model-based methods are flexible and have good interpretability, they usually have limited representation capabilities with handcrafted filters and priors.
|
| 42 |
+
|
| 43 |
+
# 2.2. Deep learning-based methods
|
| 44 |
+
|
| 45 |
+
In the past few years, deep learning has made breakthrough progress in JPEG compression artifacts removal.
|
| 46 |
+
|
| 47 |
+
Due to the powerful nonlinear representation ability, DL-based methods usually have better performance than model-based ones. Dong et al. [8] introduce the first DL-based method by designing a four-layer CNNs architecture, which makes a breakthrough progress in compression artifacts removal. Inspired by the residual learning, several deep network architectures are well designed for JPEG compression artifacts removal and relevant restoration tasks [18,32,42,57,62,63]. Fan et al. [11] construct a decouple learning framework by incorporating different parameterized image operators for various image restoration tasks. To produce visually pleasing results, the generative adversarial networks (GANs) are utilized to capture the underlying data distribution to generate vivid image textures [14, 15, 20]. Yoo et al. [48] achieve image de-blocking by estimating frequency distribution of local patches. Kim et al. [23] propose a pseudo-blind de-blocking method, in which the quality factor is estimated for both blind and non-blind de-blocking. Many dual domain learning-based methods [5,10,19,61] are also introduced by considering the DCT-relevant prior.
|
| 48 |
+
|
| 49 |
+
Recently, many researchers attempt to combine both the domain knowledge and deep learning for various image restoration tasks. Wang et al. [45] build a dual domain network by using the DCT-pixel domain sparse coding and the learned iterative shrinkage thresholding algorithm. Chen et al. [6] design a deep network based on the classic iterative nonlinear reaction diffusion for effective and efficient image restoration. In [7, 13], the authors adopt the classic convolutional sparse coding to solve the image de-blocking. Yang et al. [46] use sparsely sampled measurements for image reconstruction by combining compressive sensing theory and deep learning. Under the alternative minimization framework, deep CNNs are also utilized to learn priors and perform as the regularizer [9, 31, 33, 56, 58]. Our method shares these similar spirits, but different from the above approaches that only learn pixel-level mapping relationships, we further introduce semantic-level information to better handle the JPEG compression artifacts removal.
|
| 50 |
+
|
| 51 |
+
# 3. Methodology
|
| 52 |
+
|
| 53 |
+
# 3.1. Motivation
|
| 54 |
+
|
| 55 |
+
In general, JPEG artifacts removal aims to obtain the clear image $\mathbf{x}$ from its compressed observation $\mathbf{y} = \mathbf{x} + \mathbf{v}$ , where $\mathbf{v}$ contains compression artifacts and residual image content. Since this task is an ill-posed inverse problem, from a Bayesian perspective, the clear image can be obtained by solving a MAP problem:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\underset {\mathbf {x}} {\arg \max } \log p (\mathbf {y} | \mathbf {x}) + \log p (\mathbf {x}), \tag {1}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\log p(\mathbf{y}|\mathbf{x})$ and $\log p(\mathbf{x})$ denote the data likelihood and the prior terms, respectively. Formally, by performing
|
| 62 |
+
|
| 63 |
+
a negative logarithmic transformation, Equation (1) can be reformulated as an energy minimization variational model:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\underset {\mathbf {x}} {\arg \max } \| \mathbf {y} - \mathbf {x} \| _ {2} ^ {2} + \lambda f (\mathbf {x}), \tag {2}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $f(\mathbf{x})$ denotes the regularizer associated with the prior $\log p(\mathbf{x})$ , and $\lambda$ is a trade-off parameter. It is clear that the regularizer plays a vital role in obtaining high-quality solutions. In model-based optimization methods, many regularizers have been explored, e.g., low rank [59] and nonlocal self-similarity [60]. While these methods are usually time-consuming with handcrafted priors that are not powerful enough for good performance. Therefore, with the powerful nonlinear capabilities, deep unfolding networks [7, 13] have been explored to extract the priors from training samples.
|
| 70 |
+
|
| 71 |
+
Albeit improvement in interpretability and performance, existing deep unfolding methods only design pixel-level regression networks for the regularization term, semantic-level information is not fully utilized. Affected by compression artifacts (e.g., blocking, blurring and banding), the overall quality of the JPEG compressed image will be significantly lower than its clear counterpart. In other words, it should be easy to distinguish whether the image has been compressed from the semantic-level. This observation motivates us to introduce a semantic-level discriminative prior to complement existing methods for image de-blocking.
|
| 72 |
+
|
| 73 |
+
In addition, according to our domain knowledge, most compression artifacts have a greater impact on the high-frequency part than the low-frequency part. As shown in Figure 1, due to the inherent sparsity of gradients, the histogram on the gradient domain has stronger regularity than the image domain. Moreover, the histogram of the compressed gradients $\nabla \mathbf{y}$ is much sparser than the clear gradients $\nabla \mathbf{x}$ , as shown in Figure 1. This is because the quantization intervals are much larger in high-frequency part than those in low-frequency part, which results in significant changes in the high-frequency part before and after compression. Therefore, we argue that using the high-frequency part of the image can provide better discriminative information. Based on the above observation, we design a semantic-level prior and apply it to the image gradient, which is the most commonly used high-frequency image information [38]. By adding the semantic-level discriminative prior to Equation (2), our final variational model is:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\underset {\mathbf {x}} {\arg \max } \| \mathbf {y} - \mathbf {x} \| _ {2} ^ {2} + \lambda_ {1} f _ {p} (\mathbf {x}) + \lambda_ {2} f _ {s} (\nabla \mathbf {x}), \tag {3}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\nabla$ is the differential operator. $f_{p}(\cdot)$ and $f_{s}(\cdot)$ mean the regularizers to deliver the pixel-level regressive prior and semantic-level discriminative prior, respectively.
|
| 80 |
+
|
| 81 |
+
# 3.2. Optimization
|
| 82 |
+
|
| 83 |
+
To construct a step-by-step corresponding deep unfolding network architecture for Equation (3), we first design an
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 1: Statistical histogram. From left to right: $\mathbf{y}$ ; $\mathbf{x}$ ; histograms of $\mathbf{y}$ and $\mathbf{x}$ ; histograms of $\nabla \mathbf{y}$ and $\nabla \mathbf{x}$ .
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
|
| 94 |
+
effective alternating minimization algorithm to obtain the unfolding inference. By introducing two auxiliary variables $\mathbf{u}$ and $\mathbf{g}$ , Equation (3) can be rewritten as a non-constrained optimization problem:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\begin{array}{l} \underset {\mathbf {x}, \mathbf {u}, \mathbf {g}} {\arg \max} \| \mathbf {y} - \mathbf {x} \| _ {2} ^ {2} + \alpha \| \mathbf {u} - \mathbf {x} \| _ {2} ^ {2} + \beta \| \mathbf {g} - \nabla \mathbf {x} \| _ {2} ^ {2} \\ + \lambda_ {1} f _ {p} (\mathbf {u}) + \lambda_ {2} f _ {s} (\mathbf {g}), \tag {4} \\ \end{array}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $\alpha$ and $\beta$ are penalty parameters. Equation (4) can be addressed by alternatively solving sub-problems:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\underset {\mathbf {u}} {\arg \max } \alpha \| \mathbf {u} - \mathbf {x} _ {k - 1} \| _ {2} ^ {2} + \lambda_ {1} f _ {p} (\mathbf {u}), \tag {5}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\underset {\mathbf {g}} {\arg \max } \beta \| \mathbf {g} - \nabla \mathbf {x} _ {k - 1} \| _ {2} ^ {2} + \lambda_ {2} f _ {s} (\mathbf {g}), \tag {6}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\underset {\mathbf {x}} {\arg \max } \| \mathbf {y} - \mathbf {x} \| _ {2} ^ {2} + \alpha \| \mathbf {u} _ {k} - \mathbf {x} \| _ {2} ^ {2} + \beta \| \mathbf {g} _ {k} - \nabla \mathbf {x} \| _ {2} ^ {2}, \tag {7}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $k = 1,2,\ldots ,K$ is the iteration. Below, we detail the updates for each sub-problem.
|
| 115 |
+
|
| 116 |
+
1) Solving $\mathbf{u}$ The sub-problem (5) is a proximity operator of $f_{p}(\mathbf{u})$ and corresponds to de-block the image $\mathbf{x}_{k - 1}$ . The solution can be expressed as:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathbf {u} _ {k} = \operatorname {d e b l o c k e r} \left(\mathbf {x} _ {k - 1}\right), \tag {8}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $\text{deblocker}(\cdot)$ can be arbitrary image de-blocking algorithms. In this paper, we design a deep convolutional neural networks to perform the de-blocker. In this way, complicated image content-relevant priors can be directly learned from training data without manual design.
|
| 123 |
+
|
| 124 |
+
2) Solving $\mathbf{g}$ Since we want to introduce semantic-level discriminative information for image de-blocking, $f_{s}(\mathbf{g})$ is designed as a binary classifier since classification is the most fundamental semantic-related analysis. Therefore, unlike solving $\mathbf{u}$ that directly deploys an image-to-image regression network, we follow Li et al. [26] and adopt the back-propagation to compute the derivative of $f_{s}(\mathbf{g})$ . The solution for solving $\mathbf{g}$ is:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\mathbf {g} _ {d, k} ^ {(j)} = \mathbf {g} _ {d, k} ^ {(j - 1)} - \eta \left[ \beta \left(\mathbf {g} _ {d, k} ^ {(j - 1)} - \nabla_ {d} \mathbf {x} _ {k - 1}\right) + \lambda_ {2} \frac {\partial f _ {s} \left(\mathbf {g} _ {d , k} ^ {(j - 1)}\right)}{\partial \mathbf {g} _ {d , k} ^ {(j - 1)}} \right], \tag {9}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $d \in \{h, v\}$ are the horizontal and vertical directions, respectively. $\eta$ is the step size, and $j$ is the inner iteration. To fit with the overall energy minimization, we intentionally
|
| 131 |
+
|
| 132 |
+
label clear images as 0 (negative) and compressed images as 1 (positive). In this way, during the optimization, Equation (9) provides semantic determining for $\mathbf{g}$ whether increasing or decreasing its value will improve the clarity, which complements the pixel-level constraints in Equation (8).
|
| 133 |
+
|
| 134 |
+
3) Solving $\mathbf{x}$ Since Equation (7) is a least squares problem, it has a closed form solution. To speed up the process, we adopt Fast Fourier Transformation (FFT) to diagonalize the differential operator so that large-matrix inversion can be avoided. By setting the first-order derivative to zero, the solution of Equation (7) is:
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\mathbf {x} _ {k} = \mathcal {F} ^ {- 1} \left(\frac {\mathcal {F} (\mathbf {y}) + \alpha \mathcal {F} \left(\mathbf {u} _ {k}\right) + \beta \left(\sum_ {d \in \{h , v \}} \mathcal {F} ^ {*} \left(\nabla_ {d}\right) \mathcal {F} \left(\mathbf {g} _ {k}\right)\right)}{\mathcal {F} (\mathbf {I}) + \alpha \mathcal {F} (\mathbf {I}) + \beta \left(\sum_ {d \in \{h , v \}} \mathcal {F} ^ {*} \left(\nabla_ {d}\right) \mathcal {F} \left(\nabla_ {d}\right)\right)}\right), \tag {10}
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
where $\mathbf{I}$ is the identity matrix, $\mathcal{F}$ is the FFT operator, $\mathcal{F}^*$ is the complex conjugate operator, $\mathcal{F}^{-1}$ is the inverse FFT operator, $\nabla_h$ and $\nabla_v$ are the horizontal and vertical differential operators, respectively. Since all calculations are performed pixel-wise, the update of $\mathbf{x}$ can be efficiently computed. However, if complex handcrafted de-blocker and classifier are used, the entire optimization process will be computationally expensive. Therefore, we unfold the above algorithm into a deep network to gain advantages from both model-based optimization and data-driven deep learning.
|
| 141 |
+
|
| 142 |
+
# 3.3. Deep unfolding network
|
| 143 |
+
|
| 144 |
+
As shown in Figure 2, our deep unfolding network contains $K$ stages, which are intentionally designed to correspond to $K$ iterations in the optimization algorithm. In each network stage, two auxiliary variables are first updated, and then the de-blocked image is calculated. Therefore, the question left to us now is how to design the pixel-level regularizer $f_{p}(\cdot)$ and the semantic-level regularizer $f_{s}(\cdot)$ .
|
| 145 |
+
|
| 146 |
+
De-blocker $f_{p}(\cdot)$ To achieve an image-to-image regression for exploring pixel-level content-relevant prior, we first design a basic unit and then adopt it to construct the de-blocker. Due to different quantization steps, compression artifacts at different spatial scales will appear. Therefore, to capture both global and multi-scale local spatial information, we utilize the non-local operation [62] and dilated convolutions [50] to form the basic unit. Specifically, in each basic unit, we first deploy the non-local operation to capture global spatial information. Similar with [62], the non-local operation is performed as:
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathbf {M} _ {\text {o u t}} = \mathbf {M} _ {\text {i n}} + \theta (\mathbf {M} _ {\text {i n}}) \nu (\mathbf {M} _ {\text {i n}}) ^ {\dagger} \xi (\mathbf {M} _ {\text {i n}}) \mathbf {W}, \tag {11}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
where $\mathbf{M}_{in}$ and $\mathbf{M}_{out}$ are the input and output features; $\theta (\cdot)$ , $\nu (\cdot)$ and $\xi (\cdot)$ are $1\times 1$ convolutions to reduce the channel number; $\dagger$ is the transpose operation; $\mathbf{W}$ is a $1\times 1$ convolution to perform a hidden-to-output operation. We re-ordered $(\theta \nu^{\dagger})\xi$ to $\theta (\nu^{\dagger}\xi)$ according to the associative rule, which can greatly reduce computation complexity by
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 2: The framework of our network with $K$ stages. Each stage consists of three operations to accomplish the update of $\mathbf{u}$ , $\mathbf{g}$ and $\mathbf{x}$ . The overall optimization process and illustration are shown on the top row and bottom row, respectively.
|
| 156 |
+
|
| 157 |
+
avoiding large matrix calculation. Then, these global spatial information is sent into three cascaded dilated convolutional layers with different dilation factors. In this way, the basic unit can capture wide-range spatial information and enable a single network to handle multiple quantization steps. Finally, we utilize the basic unit to construct the de-blocker. Note that we adopt dense structures [22] and skip-connections to avoid gradient vanishing and propagate image detail to improve the de-blocking performance.
|
| 158 |
+
|
| 159 |
+
Classifier $f_{s}(\cdot)$ To further utilize semantic information for image de-blocking, we build a DL-based binary classifier, which receives the image gradients as the input and outputs a single scalar, to represent the probability of being compressed. Specifically, we adopt six standard convolutional layers (with non-linear activations), one global average pooling layer, and two fully-connected layers to construct the classifier. The output scalar is processed by a sigmoid non-linear function to facilitate the binary prediction. Note that the global average pooling operation can convert a feature map into a single scalar, which allows our classifier to handle input gradients of arbitrary sizes. Moreover, since the entire classifier is differentiable, it can participate in the calculation of Equation (9) to update $\mathbf{g}$ .
|
| 160 |
+
|
| 161 |
+
As shown in Figure 2, by plugging the de-blocker and classifier into the optimization, the deep unfolding network can be constructed. It should be indicated that our network has a good interpretability, i.e., each network module corresponds to each step in the optimization. The de-blocker accomplishes the exploration of image content-relevant prior to achieve the function of Equation (8), which is to remove JPEG artifacts. The classifier accomplishes the exploration of image gradient-relevant prior and participates in the cal
|
| 162 |
+
|
| 163 |
+
culation of Equation (9) so that the gradients can be updated along the direction of 'clarity'. By taking both pixel-level and semantic-level information into consideration, the de-blocked image can be obtained by Equation (10).
|
| 164 |
+
|
| 165 |
+
# 3.4. Implementation details
|
| 166 |
+
|
| 167 |
+
Since our deep unfolding network contains a large number of parameters, it is impractical to manually determine these parameters. Therefore, we make all the learnable parameters be automatically learned from the training samples. We enforce the de-blocker and the classifier to share their own parameters to reduce the number of parameters and thus avoid over-fitting. For the weights in Equations (8) to (10), we let them be discriminatively learned.
|
| 168 |
+
|
| 169 |
+
In this paper, we adopt a two-stage training strategy to train our deep unfolding network. In the first stage, we only train the classifier via the binary cross entropy loss function:
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
\mathcal {L} _ {\mathrm {C E}} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \hat {z _ {i}} \log \left(z _ {i}\right) + \left(1 - \hat {z _ {i}}\right) \log \left(1 - z _ {i}\right), \tag {12}
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
where $N$ is the number of training samples, $z_{i}$ is the output scalar of the classifier, and $\hat{z}_i$ is the label. We set $\hat{z_i} = 1$ for compressed images and $\hat{z_i} = 0$ for clear images. In the second stage, the parameters of the trained classifier are frozen, and the remaining parameters in the network are trained by using mean absolute error (MAE).
|
| 176 |
+
|
| 177 |
+
In our deep unfolding network, all convolutional kernel sizes are set as $3 \times 3$ . The number of feature maps of deblocker and classifier are 112 and 32, respectively. We set $K = 5$ and $J = 3$ , and use the classic ReLU [25] as the nonlinear activation. The dilation factors are set as 1, 3 and
|
| 178 |
+
|
| 179 |
+
Table 1: PSNR | SSIM | PSNR-B values and parameter numbers comparisons. The best and the second best results are boldfaced and underlined. Our network achieves the best overall results with tolerable parameter numbers.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Dataset</td><td>Quality</td><td colspan="2">SADCT [12]</td><td colspan="2">LD [27]</td><td colspan="2">PCA [40]</td><td colspan="2">ARCNN [8]</td><td colspan="2">TNRD [6]</td><td colspan="2">DnCNN [57]</td></tr><tr><td rowspan="3">Classc5</td><td>10</td><td>28.88</td><td>0.8071</td><td>28.16</td><td>28.39</td><td>0.7997</td><td>27.59</td><td>29.32</td><td>0.8002</td><td>29.08</td><td>29.03</td><td>0.7929</td><td>28.76</td></tr><tr><td>20</td><td>30.92</td><td>0.8663</td><td>29.75</td><td>30.30</td><td>0.8584</td><td>29.37</td><td>31.56</td><td>0.8584</td><td>31.12</td><td>31.15</td><td>0.8517</td><td>30.59</td></tr><tr><td>30</td><td>32.14</td><td>0.8914</td><td>30.83</td><td>31.47</td><td>0.8830</td><td>30.17</td><td>32.86</td><td>0.8838</td><td>32.31</td><td>32.51</td><td>0.8806</td><td>31.98</td></tr><tr><td rowspan="3">LIVE1</td><td>10</td><td>28.65</td><td>0.8093</td><td>28.01</td><td>28.26</td><td>0.8052</td><td>27.68</td><td>29.01</td><td>0.8090</td><td>28.83</td><td>28.96</td><td>0.8076</td><td>28.77</td></tr><tr><td>20</td><td>30.81</td><td>0.8781</td><td>29.82</td><td>30.19</td><td>0.8715</td><td>29.64</td><td>31.28</td><td>0.8746</td><td>30.72</td><td>31.29</td><td>0.8733</td><td>30.79</td></tr><tr><td>30</td><td>32.08</td><td>0.9078</td><td>30.92</td><td>29.41</td><td>0.8960</td><td>29.36</td><td>32.62</td><td>0.9034</td><td>32.18</td><td>32.67</td><td>0.9043</td><td>32.22</td></tr><tr><td rowspan="3">BSD500</td><td>10</td><td>28.23</td><td>0.7780</td><td>27.38</td><td>28.03</td><td>0.7824</td><td>27.29</td><td>28.64</td><td>0.7793</td><td>28.01</td><td>28.56</td><td>0.7907</td><td>27.87</td></tr><tr><td>20</td><td>30.09</td><td>0.8510</td><td>28.61</td><td>29.82</td><td>0.8514</td><td>28.43</td><td>30.73</td><td>0.8510</td><td>29.42</td><td>30.43</td><td>0.8594</td><td>29.10</td></tr><tr><td>30</td><td>31.21</td><td>0.8838</td><td>29.34</td><td>30.87</td><td>0.8719</td><td>29.15</td><td>31.99</td><td>0.8840</td><td>30.84</td><td>31.52</td><td>0.8904</td><td>29.92</td></tr><tr><td>Twitter</td><td></td><td>27.61</td><td>0.7281</td><td>27.53</td><td>27.58</td><td>0.7274</td><td>27.49</td><td>27.71</td><td>0.7302</td><td>27.66</td><td>27.54</td><td>0.7295</td><td>27.49</td></tr><tr><td>WeChat</td><td></td><td>29.60</td><td>0.7995</td><td>29.59</td><td>29.48</td><td>0.7956</td><td>29.47</td><td>29.63</td><td>0.7994</td><td>29.60</td><td>29.30</td><td>0.7987</td><td>29.29</td></tr><tr><td># Params (×105)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>1.06</td><td></td><td>0.21</td><td></td></tr><tr><td>Dataset</td><td>Quality</td><td colspan="2">LPIO [11]</td><td colspan="2">M-Net [42]</td><td colspan="2">DCSC [13]</td><td colspan="2">RNAN [62]</td><td colspan="2">RDN [63]</td><td colspan="2">Proposed</td></tr><tr><td rowspan="3">Classc5</td><td>10</td><td>29.35</td><td>0.8015</td><td>29.04</td><td>29.69</td><td>0.8107</td><td>29.31</td><td>29.62</td><td>0.8270</td><td>29.30</td><td>29.87</td><td>0.8278</td><td>29.42</td></tr><tr><td>20</td><td>31.58</td><td>0.8567</td><td>31.12</td><td>31.90</td><td>0.8658</td><td>31.29</td><td>31.81</td><td>0.8804</td><td>31.34</td><td>32.11</td><td>0.8693</td><td>31.26</td></tr><tr><td>30</td><td>32.86</td><td>0.8835</td><td>32.28</td><td>32.97</td><td>0.8881</td><td>32.49</td><td>33.06</td><td>0.9030</td><td>32.49</td><td>33.38</td><td>0.8924</td><td>32.35</td></tr><tr><td rowspan="3">LIVE1</td><td>10</td><td>29.17</td><td>0.8119</td><td>28.89</td><td>29.45</td><td>0.8193</td><td>29.04</td><td>29.34</td><td>0.8317</td><td>29.01</td><td>29.63</td><td>0.8239</td><td>29.13</td></tr><tr><td>20</td><td>31.52</td><td>0.8766</td><td>31.07</td><td>31.83</td><td>0.8846</td><td>31.14</td><td>31.70</td><td>0.8960</td><td>31.18</td><td>32.03</td><td>0.8877</td><td>31.12</td></tr><tr><td>30</td><td>32.99</td><td>0.9074</td><td>32.31</td><td>33.07</td><td>0.9108</td><td>32.47</td><td>33.07</td><td>0.9218</td><td>32.43</td><td>33.45</td><td>0.9149</td><td>32.22</td></tr><tr><td rowspan="3">BSD500</td><td>10</td><td>28.81</td><td>0.7815</td><td>28.39</td><td>28.96</td><td>0.8039</td><td>28.56</td><td>28.95</td><td>0.8050</td><td>28.55</td><td>29.08</td><td>0.8054</td><td>28.48</td></tr><tr><td>20</td><td>30.92</td><td>0.8551</td><td>30.07</td><td>31.05</td><td>0.8742</td><td>30.36</td><td>31.13</td><td>0.8758</td><td>30.41</td><td>31.25</td><td>0.8751</td><td>30.27</td></tr><tr><td>30</td><td>32.31</td><td>0.8866</td><td>31.27</td><td>32.61</td><td>0.9072</td><td>31.15</td><td>32.42</td><td>0.9057</td><td>31.52</td><td>32.70</td><td>0.9068</td><td>31.33</td></tr><tr><td>Twitter</td><td></td><td>27.47</td><td>0.7333</td><td>27.41</td><td>27.98</td><td>0.7441</td><td>27.87</td><td>27.63</td><td>0.7313</td><td>27.43</td><td>27.43</td><td>0.7183</td><td>27.42</td></tr><tr><td>WeChat</td><td></td><td>28.90</td><td>0.8000</td><td>28.90</td><td>29.82</td><td>0.8067</td><td>29.82</td><td>29.58</td><td>0.8004</td><td>29.58</td><td>29.56</td><td>0.7996</td><td>29.56</td></tr><tr><td># Params (×105)</td><td></td><td colspan="2">13.94</td><td colspan="2">6.67</td><td colspan="2">3.21</td><td colspan="2">74.09</td><td colspan="2">220.03</td><td colspan="2">88.21</td></tr></table>
|
| 182 |
+
|
| 183 |
+
5. To train the network, we use the Matlab JPEG encoder to generate JPEG compressed images. The JPEG quality factors (QF) are set to 10, 20 and 30. We use both the training and testing sets from BSD500 [2] as our training set. The training process is conducted on the Y channel image of Y-CrCb space. We randomly generate $64 \times 64$ training patch pairs with a batch size of 10. We adopt the Adam solver [24] as the optimizer, and the learning rate is fixed to $10^{-4}$ . We use TensorFlow [1] to implement our network. Note that we only train one single model to handle all the JPEG compression factors. We initialize $\mathbf{x}_0 = \mathbf{y}$ and $\mathbf{g}_{d,k}^{(0)} = \nabla_d\mathbf{x}_{k-1}$ , and all weights in Equations (8) to (10) are initialized as 0.01.
|
| 184 |
+
|
| 185 |
+
# 4. Experimental results
|
| 186 |
+
|
| 187 |
+
We compare our network with three model-driven methods: Shape-Adaptive DCT (SADCT) [12], Layer Decomposition (LD) [27] and PCA basis Learning (PCA) [40], and several deep learning-based methods: Artifacts Reduction Convolutional Neural Network (ARCNN) [8], Trainable Nonlinear Reaction Diffusion (TNRD) [6], Denoising Convolutional Neural Network (DnCNN) [57], Learning Parameterized Image Operators (LPIO) [11], Memory Network (M-Net) [42], Deep Convolutional Sparse Coding (DCSC) [13], Residual Non-local Attention Networks (R-NAN) [62] and Residual Dense Network (RDN) [63].
|
| 188 |
+
|
| 189 |
+
# 4.1. Comparisons on synthetic datasets
|
| 190 |
+
|
| 191 |
+
We first report the comparison results on the three widely used synthetic datasets, i.e., 5 images in Classics [51], 29 images in LIVE [39] and 100 images in the validation set of BSD500 [2]. We adipot the PSNR, SSIM [44], and PSNR-B [47] for quantitative evaluations. Since PSNR-B is more sensitive to blocking artifacts than PSNR and S-SIM, it is recommended [8] for use in this de-blocking problem. Table 1 reports the quantitative results and our network achieves the best overall results on all synthetic datasets. Particularly, for the Classics5 dataset with $\mathrm{QF} = 10$ , the average gains of our method over the recently proposed RD-N [63] are respectively 0.23dB in PSNR, 0.0209 in SSIM, and 0.46dB in PSNR-B. When compared with the other approaches, our method is far ahead. Note that we only train one model to cover all three QFs, which substantiates the flexibility and effectiveness of our method, in diverse JPEG artifacts contained in these datasets.
|
| 192 |
+
|
| 193 |
+
In Figure 3, we show two visual comparisons and it is clear that other compared methods can effectively remove most compression artifacts but fail to recover image details. While our network can finely recover the image textures with a better visual quality. This is because our method learns the dual priors, which enables the network to simultaneously utilize the low-level pixel information and high-level semantic information. In this way, not only the image
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Example in 'Classic5'
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
$\mathrm{QF} = 10$
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
M-Net [42]
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
DCSC [13]
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
RNAN [62]
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
RDN [63]
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Proposed
|
| 229 |
+
Clear
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
Example in 'LIVEJ'
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
LPIO [11]
|
| 238 |
+
|
| 239 |
+

|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
|
| 243 |
+

|
| 244 |
+
|
| 245 |
+

|
| 246 |
+
|
| 247 |
+

|
| 248 |
+
|
| 249 |
+

|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
$\mathrm{QF} = 20$
|
| 253 |
+
LPIO [11]
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
SADCT [12]
|
| 257 |
+
M-Net [42]
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
LD [27]
|
| 261 |
+
DCSC [13]
|
| 262 |
+
Figure 3: Visual comparisons on different synthetic datasets with different JPEG quality factors.
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
PCA [40]
|
| 266 |
+
RNAN [62]
|
| 267 |
+
|
| 268 |
+

|
| 269 |
+
ARCNN [8]
|
| 270 |
+
RDN [63]
|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
TNRD [6]
|
| 274 |
+
Proposed
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
DnCNN [57]
|
| 278 |
+
Clear
|
| 279 |
+
|
| 280 |
+
content-related compression artifacts are removed, but also the image gradient-related clarity is recovered.
|
| 281 |
+
|
| 282 |
+
# 4.2. Comparisons on real-world use cases
|
| 283 |
+
|
| 284 |
+
Online social media softwares have been widely used for message publishing and sharing. To reduce transmission and storage consumption, these platforms usually compresses and re-scales the original images on the server-side. This leads to undesired and unavoidable compression artifacts appearance when users view the posted images. To complement the existing Twitter dataset [8] and serve the relevant research communities on this issue in real scenarios, we manually construct a new dataset based on the popular social media WeChat. The dataset contains 300 images and their WeChat-compressed versions<sup>1</sup>. To avoid out-of-memory caused by excessive image resolution, we first randomly crop the images and then perform the de-blocking operation and measurement calculation. We show quantitative results in Table 1, in which our model consistently generates the best overall performance due to the effective dual priors. Figure 4 shows two visual comparisons. Due to different compression strategies, it is clear that the two compressed images contain different appearances of artifacts, and our method still achieves a superior performance than other compared methods. It is observed that our method can generate clearer results than other competing ones.
|
| 285 |
+
|
| 286 |
+
# 4.3. Analysis
|
| 287 |
+
|
| 288 |
+
Analysis on classifier $f_{s}(\cdot)$ We first visualize the derivative of the classifier at different stages in Figure 5. By referring to $\nabla \mathbf{x}_0$ , the areas of large derivative values, which are normalized for visualization, of $\mathbf{g}$ are basically the same
|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
(a) $\nabla \mathbf{x}_0$
|
| 292 |
+
Figure 5: Visualizations of the derivative of the classifier.
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
(b) $\frac{\partial f_s(\mathbf{g}_1)}{\partial\mathbf{g}_1}$
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
(c) $\frac{\partial f_{\mathrm{a}}(\mathbf{g}_3)}{\partial\mathbf{g}_3}$
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
(d) $\frac{\partial f_s(\mathbf{g}_5)}{\partial\mathbf{g}_5}$
|
| 302 |
+
|
| 303 |
+
as the areas of compression artifacts. Since the gradient represents the increasing direction of the function, using Equation (9) can update $\mathbf{g}$ along the direction of less artifacts.
|
| 304 |
+
|
| 305 |
+
In Figure 6, we visualize the activations of the last convolutional layer in the classifier. It is clear that our classifier can effectively distinguish clear images and their compressed versions generated from different platforms. Since we use the classifier to explore gradient-relevant priors, the differences between compressed and clear activations are mainly concentrated in areas such as image texture and structure, and edges of compression artifacts. This proves that using our gradient-relevant prior can provide the network with constraints related to 'clarity'.
|
| 306 |
+
|
| 307 |
+
We also show one visual result in Figure 7 to demonstrate the effect of $f_{s}(\cdot)$ . It is clear that using only pixel-level $f_{p}(\cdot)$ can obtain a de-blocked result with blurred edges. By adding the semantic-level $f_{s}(\cdot)$ , the edges become more clear with a better visual quality.
|
| 308 |
+
|
| 309 |
+
Analysis on de-blocker $f_{p}(\cdot)$ For the pixel-level de-blocker, we compare with the scenarios by using three operators. Specifically, we test the handcrafted $\ell_{1}$ sparsity [17], the DL-based DnCNN [57], and our default $f_{p}(\cdot)$ . Table 2 shows the quantitative comparisons on BSD500 (QF = 10), and using our $f_{p}(\cdot)$ achieves the best results. Compared
|
| 310 |
+
|
| 311 |
+

|
| 312 |
+
Compressed
|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
SADCT [12]
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
LD [27]
|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
|
| 322 |
+

|
| 323 |
+
PCA [40]
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
ARCNN [8]
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
TNRD [6]
|
| 330 |
+
DnCNN [57]
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Example in 'Twitter'
|
| 336 |
+
Example in 'WeChat'
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Compressed
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
SADCT [12]
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
LD [27]
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
PCA [40]
|
| 349 |
+
|
| 350 |
+

|
| 351 |
+
ARCNN [8]
|
| 352 |
+
|
| 353 |
+

|
| 354 |
+
TNRD [6]
|
| 355 |
+
DnCNN [57]
|
| 356 |
+
|
| 357 |
+

|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
|
| 365 |
+

|
| 366 |
+
|
| 367 |
+

|
| 368 |
+
(a) Compressed
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
(b) Activ. of (a)
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
(c) Clear
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
(d) Activ. of (c)
|
| 386 |
+
|
| 387 |
+

|
| 388 |
+
Figure 6: Activations of a feature map in the classifier. From top to bottom: BSD500, Twitter and WeChat.
|
| 389 |
+
(a) Compressed
|
| 390 |
+
Figure 7: Effectiveness of $f_{s}(\cdot)$ .
|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
(b) Without $f_{s}(\cdot)$
|
| 394 |
+
|
| 395 |
+

|
| 396 |
+
(c) With $f_{s}(\cdot)$
|
| 397 |
+
|
| 398 |
+
with the other two de-blockers, our $f_{p}(\cdot)$ can extract both global and multi-scale local features. This is particularly suitable for image de-blocking since compression artifacts usually have the appearance of different spatial scales.
|
| 399 |
+
|
| 400 |
+
Analysis on stage $K$ We also analyze the effect of stage number $K$ and show the quantitative results on BSD500 (QF = 10) in Figure 8. Using $K = 1$ as a baseline, it is clear that the performance has an obvious improvement with 3 stages. When $K = 7$ , the quantitative results show a slight decreasing trend, which may be caused by the difficulty of
|
| 401 |
+
|
| 402 |
+
Table 2: Comparisons on using different de-blockers.
|
| 403 |
+
|
| 404 |
+
<table><tr><td>Proximal operators</td><td>PSNR</td><td>SSIM</td><td>PNSR-B</td></tr><tr><td>l1 sparsity [17]</td><td>28.18</td><td>0.7985</td><td>27.28</td></tr><tr><td>DnCNN [57]</td><td>28.97</td><td>0.8094</td><td>27.95</td></tr><tr><td>Our fp(·)</td><td>29.48</td><td>0.8146</td><td>29.13</td></tr></table>
|
| 405 |
+
|
| 406 |
+

|
| 407 |
+
Figure 8: Quantitative results on different stage numbers $K$ .
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
|
| 411 |
+
gradient propagation due to the increased stage. Therefore, we set $K = 5$ as the default stage number.
|
| 412 |
+
|
| 413 |
+
# 5. Conclusion
|
| 414 |
+
|
| 415 |
+
In this paper, we propose two data-driven priors for JPEG compression artifacts removal. Specifically, we design one pixel-level prior and one semantic-level prior to provide regressive and discriminative information, respectively. We then embed these two priors into a variational model and develop an alternative optimization algorithm to solve it. This optimization algorithm is further unfolded into a deep network, in which the dual priors can be effectively explored from training samples. Experiments on benchmarks and real-world use cases show that our method performs favorably against state-of-the-art methods.
|
| 416 |
+
|
| 417 |
+
# References
|
| 418 |
+
|
| 419 |
+
[1] Martin Abadi, Paul Barham, et al. Tensorflow: A system for large-scale machine learning. In USENIX symposium on operating systems design and implementation, 2016. 6
|
| 420 |
+
[2] Pablo Arbelaez, Michael Maire, Charless Fowlkes, and Jitendra Malik. Contour detection and hierarchical image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(5):898-916, 2010. 6
|
| 421 |
+
[3] Kristian Bredies and Martin Holler. A total variation-based jpeg decompression model. SIAM Journal on Imaging Sciences, 5(1):366-393, 2012. 2
|
| 422 |
+
[4] Huibin Chang, Michael K Ng, and Tieyong Zeng. Reducing artifacts in JPEG decompression via a learned dictionary. IEEE Transactions on Signal Processing, 62(3):718-728, 2013. 2
|
| 423 |
+
[5] Honggang Chen, Xiaohai He, Linbo Qing, Shuhua Xiong, and Truong Q Nguyen. DPW-SDNet: Dual pixel-wavelet domain deep cnns for soft decoding of JPEG-compressed images. In CVPR Workshops, 2018. 3
|
| 424 |
+
[6] Yunjin Chen and Thomas Pock. Trainable nonlinear reaction diffusion: A flexible framework for fast and effective image restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(6):1256-1272, 2016. 3, 6, 7, 8
|
| 425 |
+
[7] Nathaniel Chodosh and Simon Lucey. When to use convolutional neural networks for inverse problems. In CVPR, 2020. 3
|
| 426 |
+
[8] Chao Dong, Yubin Deng, Chen Change Loy, and Xiaou Tang. Compression artifacts reduction by a deep convolutional network. In ICCV, 2015. 2, 3, 6, 7, 8
|
| 427 |
+
[9] Weisheng Dong, Peiyao Wang, Wotao Yin, Guangming Shi, Fangfang Wu, and Xiaotong Lu. Denoising prior driven deep neural network for image restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(10):2305-2318, 2018. 3
|
| 428 |
+
[10] Max Ehrlich, Larry Davis, Ser-Nam Lim, and Abhinav Shrivastava. Quantization guidedjpeg artifact correction. In EC-CV, 2020. 3
|
| 429 |
+
[11] Qingnan Fan, Dongdong Chen, Lu Yuan, Gang Hua, Nenghai Yu, and Baoquan Chen. A general decoupled learning framework for parameterized image operators. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. doi:10.1109/TPAMI.2019.2925793.3,6,7,8
|
| 430 |
+
[12] Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Pointwise shape-adaptive dct for high-quality denoising and deblocking of grayscale and color images. IEEE Transactions on Image Processing, 16(5):1395-1411, 2007. 1, 2, 6, 7, 8
|
| 431 |
+
[13] Xueyang Fu, Zheng-Jun Zha, Feng Wu, Xinghao Ding, and John Paisley. JPEG artifacts reduction via deep convolutional sparse coding. In ICCV, 2019. 3, 6, 7, 8
|
| 432 |
+
[14] Leonardo Galteri, Lorenzo Seidenari, Marco Bertini, and Alberto Del Bimbo. Deep generative adversarial compression artifact removal. In ICCV, 2017. 3
|
| 433 |
+
[15] Leonardo Galteri, Lorenzo Seidenari, Marco Bertini, and Alberto Del Bimbo. Deep universal generative adversarial compression artifact removal. IEEE Transactions on Multimedia, 21(8):2131-2145, 2019. 3
|
| 434 |
+
|
| 435 |
+
[16] Shanghua Gao, Ming-Ming Cheng, Kai Zhao, Xin-Yu Zhang, Ming-Hsuan Yang, and Philip HS Torr. Res2net: A new multi-scale backbone architecture. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(2):652-662, 2021. 2
|
| 436 |
+
[17] Karol Gregor and Yann LeCun. Learning fast approximations of sparse coding. In ICML, 2010. 7, 8
|
| 437 |
+
[18] Shuhang Gu, Wen Li, Luc Van Gool, and Radu Timofte. Fast image restoration with multi-bin trainable linear units. In ICCV, 2019. 3
|
| 438 |
+
[19] Jun Guo and Hongyang Chao. Building dual-domain representations for compression artifacts reduction. In ECCV, 2016.3
|
| 439 |
+
[20] Jun Guo and Hongyang Chao. One-to-many network for visually pleasing compression artifacts reduction. In CVPR, 2017. 1, 3
|
| 440 |
+
[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2
|
| 441 |
+
[22] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017. 2, 5
|
| 442 |
+
[23] Yoonsik Kim, Jae Woong Soh, Jaewoo Park, Byeongyong Ahn, Hyun-Seung Lee, Young-Su Moon, and Nam Ik Cho. A pseudo-blind convolutional neural network for the reduction of compression artifacts. IEEE Transactions on Circuits and Systems for Video Technology, 30(4):1121-1135, 2019. 3
|
| 443 |
+
[24] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2014. 6
|
| 444 |
+
[25] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. 5
|
| 445 |
+
[26] Lerenhan Li, Jinshan Pan, Wei-Sheng Lai, Changxin Gao, Nong Sang, and Ming-Hsuan Yang. Learning a discriminative prior for blind image deblurring. In CVPR, 2018. 4
|
| 446 |
+
[27] Yu Li, Fangfang Guo, Robby T Tan, and Michael S Brown. A contrast enhancement framework withJPEG artifacts suppression. In ECCV, 2014. 2, 6, 7, 8
|
| 447 |
+
[28] Dong Liu, Zhenzhong Chen, Shan Liu, and Feng Wu. Deep learning-based technology in responses to the joint call for proposals on video compression with capability beyond hevc. IEEE Transactions on Circuits and Systems for Video Technology, 30(5):1267-1280, 2019. 1
|
| 448 |
+
[29] Daqing Liu, Hanwang Zhang, Feng Wu, and Zheng-Jun Zha. Learning to assemble neural module tree networks for visual grounding. In ICCV, 2019. 2
|
| 449 |
+
[30] Jiaying Liu, Dong Liu, Wenhan Yang, Sifeng Xia, Xiaoshuai Zhang, and Yuanying Dai. A comprehensive benchmark for single image compression artifact reduction. IEEE Transactions on Image Processing, 29:7845-7860, 2020. 1
|
| 450 |
+
[31] Risheng Liu, Zhiying Jiang, Xin Fan, and Zhongxuan Luo. Knowledge-driven deep unrolling for robust image layer separation. IEEE Transactions on Neural Networks and Learning Systems, 31(5):1653-1666, 2019. 3
|
| 451 |
+
[32] Risheng Liu, Long Ma, Jiaao Zhang, Xin Fan, and Zhongxuan Luo. Retinex-inspired unrolling with cooperative prior architecture search for low-light image enhancement. In CVPR, 2021. 3
|
| 452 |
+
|
| 453 |
+
[33] Risheng Liu, Long Ma, Yuxi Zhang, Xin Fan, and Zhongxuan Luo. Underexposed image correction via hybrid priors navigated deep propagation. IEEE Transactions on Neural Networks and Learning Systems, 2021. 3
|
| 454 |
+
[34] Xianming Liu, Gene Cheung, Xiangyang Ji, Debin Zhao, and Wen Gao. Graph-based joint dequantization and contrast enhancement of poorly lit JPEG images. IEEE Transactions on Image Processing, 28(3):1205-1219, 2018. 2
|
| 455 |
+
[35] Xianming Liu, Xiaolin Wu, Jiantao Zhou, and Debin Zhao. Data-driven soft decoding of compressed images in dual transform-pixel domain. IEEE Transactions on Image Processing, 25(4):1649-1659, 2016. 2
|
| 456 |
+
[36] Shigenobu Minami and Avideh Zakhor. An optimization approach for removing blocking effects in transform coding. IEEE Transactions on Circuits and Systems for Video Technology, 5(2):74-82, 1995. 2
|
| 457 |
+
[37] Jing Mu, Ruiqin Xiong, Xiaopeng Fan, Dong Liu, Feng Wu, and Wen Gao. Graph-based non-convex low-rank regularization for image compression artifact reduction. IEEE Transactions on Image Processing, 29:5374–5385, 2020. 2
|
| 458 |
+
[38] Leonid I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena, 60(1-4):259-268, 1992. 3
|
| 459 |
+
[39] HR Sheikh. LIVE image quality assessment database release 2. http://live.ece.utexas.edu/research/quality, 2005.6
|
| 460 |
+
[40] Qiang Song, Ruiqin Xiong, Xiaopeng Fan, Dong Liu, Feng Wu, Tiejun Huang, and Wen Gao. Compressed image restoration via artifacts-free PCA basis learning and adaptive sparse modeling. IEEE Transactions on Image Processing, 29:7399-7413, 2020. 2, 6, 7, 8
|
| 461 |
+
[41] Gary J Sullivan, Jens-Rainer Ohm, Woo-Jin Han, and Thomas Wiegand. Overview of the high efficiency video coding (HEVC) standard. IEEE Transactions on Circuits and Systems for Video Technology, 22(12):1649-1668, 2012. 1
|
| 462 |
+
[42] Ying Tai, Jian Yang, Xiaoming Liu, and Chunyan Xu. Memnet: A persistent memory network for image restoration. In ICCV, 2017. 3, 6, 7, 8
|
| 463 |
+
[43] Gregory K. Wallace. Thejpeg still picture compression standard. IEEE Transactions on Consumer Electronics, 38(1):xviii-xxxiv, 1992. 1
|
| 464 |
+
[44] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600-612, 2004. 6
|
| 465 |
+
[45] Zhangyang Wang, Ding Liu, Shiyu Chang, Qing Ling, Yingzhen Yang, and Thomas S Huang. $\mathrm{D}^3$ : Deep dual-domain based fast restoration of JPEG-compressed images. In CVPR, 2016. 3
|
| 466 |
+
[46] Yan Yang, Jian Sun, Huibin Li, and Zongben Xu. ADMM-CSNet: A deep learning approach for image compressive sensing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(3):521-538, 2018. 3
|
| 467 |
+
[47] Changhoon Yim and Alan Conrad Bovik. Quality assessment of deblocked images. IEEE Transactions on Image Processing, 20(1):88-98, 2010. 6
|
| 468 |
+
[48] Jaeyoung Yoo, Sang-ho Lee, and Nojun Kwak. Image restoration by estimating frequency distribution of local patches. In CVPR, 2018. 3
|
| 469 |
+
|
| 470 |
+
[49] Seok Bong Yoo, Kyuha Choi, and Jong Beom Ra. Post-processing for blocking artifact reduction based on interblock correlation. IEEE Transactions on Multimedia, 16(6):1536-1548, 2014. 2
|
| 471 |
+
[50] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In ICLR, 2016. 4
|
| 472 |
+
[51] Roman Zeyde, Michael Elad, and Matan Protter. On single image scale-up using sparse-representations. In International Conference on Curves and Surfaces, 2010. 6
|
| 473 |
+
[52] Zhiyuan Zha, Xin Yuan, Bihan Wen, Jiachao Zhang, Jiantao Zhou, and Ce Zhu. Image restoration using joint patch-group-based sparse representation. IEEE Transactions on Image Processing, 29:7735-7750, 2020. 2
|
| 474 |
+
[53] Zheng-Jun Zha, Daqing Liu, Hanwang Zhang, Yongdong Zhang, and Feng Wu. Context-aware visual policy network for fine-grained image captioning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. doi: 10.1109/TPAMI.2019.2909864.2
|
| 475 |
+
[54] Guangtao Zhai, Wenjun Zhang, Xiaokang Yang, Weisi Lin, and Yi Xu. Efficient image deblocking based on postfiltering in shifted windows. IEEE Transactions on Circuits and Systems for Video Technology, 18(1):122-126, 2008. 2
|
| 476 |
+
[55] Jian Zhang, Ruiqin Xiong, Chen Zhao, Yongbing Zhang, Siwei Ma, and Wen Gao. CONCOLOR: Constrained nonconvex low-rank model for image deblocking. IEEE Transactions on Image Processing, 25(3):1246-1259, 2016. 2
|
| 477 |
+
[56] Kai Zhang, Luc Van Gool, and Radu Timofte. Deep unfolding network for image super-resolution. In CVPR, 2020. 3
|
| 478 |
+
[57] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 2, 3, 6, 7, 8
|
| 479 |
+
[58] Kai Zhang, Wangmeng Zuo, Shuhang Gu, and Lei Zhang. Learning deep cnn denoiser prior for image restoration. In CVPR, 2017. 3
|
| 480 |
+
[59] Xinfeng Zhang, Weisi Lin, Ruiqin Xiong, Xianming Liu, Siwei Ma, and Wen Gao. Low-rank decomposition-based restoration of compressed images via adaptive noise estimation. IEEE Transactions on Image Processing, 25(9):4158-4171, 2016. 2, 3
|
| 481 |
+
[60] Xinfeng Zhang, Ruiqin Xiong, Xiaopeng Fan, Siwei Ma, and Wen Gao. Compression artifact reduction by overlapped-block transform coefficient estimation with block similarity. IEEE Transactions on Image Processing, 22(12):4613-4626, 2013. 2, 3
|
| 482 |
+
[61] Xiaoshuai Zhang, Wenhan Yang, Yueyu Hu, and Jiaying Liu. DMCNN: Dual-domain multi-scale convolutional neural network for compression artifacts removal. In ICIP, 2018. 3
|
| 483 |
+
[62] Yulun Zhang, Kunpeng Li, Kai Li, Bineng Zhong, and Yun Fu. Residual non-local attention networks for image restoration. In ICLR, 2019. 3, 4, 6, 7, 8
|
| 484 |
+
[63] Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. doi:10.1109/TPAMI.2020.2968521. 2, 3, 6, 7, 8
|
learningdualpriorsforjpegcompressionartifactsremoval/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5947b28073d24e0eb6ae8d68911fd52655ea237e505f824f0719a7e6f68b59b
|
| 3 |
+
size 684336
|
learningdualpriorsforjpegcompressionartifactsremoval/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d55b088e7f6f8ff25374c754955ce76a0dbcf1a2e20c9c9bcdef8520174a0c3
|
| 3 |
+
size 583227
|
learningdynamicinterpolationforextremelysparselightfieldswithwidebaselines/96ddb3d6-7727-4c31-85b5-4d2522543031_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9534fc85c13b0ff4c6b5f79f54115a78a34e4d05189991c2fa329647d3d11957
|
| 3 |
+
size 77497
|
learningdynamicinterpolationforextremelysparselightfieldswithwidebaselines/96ddb3d6-7727-4c31-85b5-4d2522543031_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97036a3079f00d378d54069e4195b78b365ed146fd227a7641c5e81c96eab13b
|
| 3 |
+
size 95832
|