Image Retrieval on Real-life Images with Pretrained Vision-and-Language Models (ICCV, 2021)
Abstract
We extend the task of composed image retrieval, where an input query consists of an image and short textual description of how to modify the image. Existing methods have only been applied to non-complex images within narrow domains, such as fashion products, thereby limiting the scope of study on in-depth visual reasoning in rich image and language contexts. To address this issue, we collect the Compose Image Retrieval on Real-life images (CIRR) dataset, which consists of over 36,000 pairs of crowd-sourced, open-domain images with human-generated modifying text. To extend current methods to the open-domain, we propose CIRPLANT, a transformer based model that leverages rich pre-trained vision-and-language (V&L) knowledge for modifying visual features conditioned on natural language. Retrieval is then done by nearest neighbor lookup on the modified features. We demonstrate that with a relatively simple architecture, CIRPLANT outperforms existing methods on open-domain images, while matching state-of-theart accuracy on the existing narrow datasets, such as fashion. Together with the release of CIRR, we believe this work will inspire further research on composed image retrieval. Our dataset, code and pre-trained models are available at https://cuberick-orion.github.io/CIRR/.
입력 쿼리가 이미지와 이미지 수정 방법에 대한 짧은 텍스트 설명으로 구성된 합성 이미지 검색 작업을 확장합니다.
기존의 방법들은 패션 제품과 같이 협소한 영역의 복잡하지 않은 이미지에만 적용되어 풍부한 이미지와 언어적 맥락에서 심도 있는 시각적 추론에 대한 연구의 범위를 제한하였다. 이 문제를 해결하기 위해 우리는 36,000개 이상의 크라우드 소싱 오픈 도메인 이미지와 인간이 생성한 수정 텍스트로 구성된 CIRR(Compose Image Retrieval on Real-life images) 데이터 세트를 수집합니다. 현재 방법을 개방형 도메인으로 확장하기 위해 자연어에 기반한 시각적 기능을 수정하기 위해 사전 훈련된 풍부한 V&L(비전 및 언어) 지식을 활용하는 변환기 기반 모델인 CIRPLANT를 제안합니다. 그런 다음 수정된 기능에 대한 가장 가까운 이웃 조회에 의해 검색이 수행됩니다. 우리는 비교적 단순한 아키텍처를 통해 CIRPLANT가 개방형 도메인 이미지에 대한 기존 방법보다 성능이 뛰어나고 패션과 같은 기존의 좁은 데이터 세트에 대한 최신 정확도를 일치시킨다는 것을 보여줍니다. CIRR의 출시와 함께 우리는 이 작업이 합성 이미지 검색에 대한 추가 연구에 영감을 줄 것이라고 믿습니다. 데이터 세트, 코드 및 사전 훈련된 모델은 https://cuberick-orion.github.io/CIRR/에서 사용할 수 있습니다.
1. Introduction
We study the task of composed image retrieval, that is, finding an image from a large corpus that best matches a user query provided as an image-language pair. Unlike traditional content-based [38] or text-based [24, 42] image retrieval where a single modality is used to describe the target image, composed image retrieval involves both visual and textual modalities to specify the user’s intent. For humans the advantage of a bi-modal query is clear: some concepts and attributes are more succinctly described visually, others through language. By cross-referencing the two modalities, a reference image can capture the general gist of a scene, while the text can specify finer details. The challenge is the inherent ambiguity in knowing what information is important (typically one object of interest in the scene) and what can be ignored (e.g., the background and other irrelevant objects). However, existing datasets for this task fall short of allowing us to adequately study this problem.
합성 이미지 검색, 즉 이미지-언어 쌍으로 제공되는 사용자 쿼리와 가장 일치하는 이미지를 대규모 코퍼스에서 찾는 작업을 연구합니다. 단일 양식이 대상 이미지를 설명하는 데 사용되는 기존의 콘텐츠 기반[38] 또는 텍스트 기반[24, 42] 이미지 검색과 달리 합성 이미지 검색은 사용자의 의도를 지정하기 위해 시각적 및 텍스트 양식을 모두 포함합니다. 인간에게 바이모달 쿼리의 이점은 분명합니다. 일부 개념과 속성은 시각적으로 더 간결하게 설명되고 나머지는 언어를 통해 설명됩니다. 두 가지 양식을 상호 참조함으로써 참조 이미지는 장면의 일반적인 요지를 포착할 수 있는 반면 텍스트는 더 세부적인 세부 사항을 지정할 수 있습니다. 문제는 어떤 정보가 중요한지(일반적으로 장면에서 하나의 관심 대상), 무시할 수 있는 정보(예: 배경 및 기타 관련 없는 대상)를 아는 데 내재된 모호성입니다. 그러나 이 작업에 대한 기존 데이터 세트는 이 문제를 적절하게 연구할 수 있도록 하지 않습니다.
Consider the example in Fig. 1. Real-life images usually contain rich object interactions on various scales. In each case, to readily identify the relevant aspects to keep or change and pay less attention elsewhere (e.g., the color of the dog’s fur and background objects), a model must develop in-depth visual reasoning ability and infer implicit human agreements within both the visual and language contexts. However, existing datasets are constrained to domains such as fashion products [4, 12, 13] or synthetic objects [40] with relatively simple image contents. We argue that the current datasets are insufficient for exploring the unique research opportunity mentioned above.
그림 1의 예를 고려하십시오. 실제 이미지에는 일반적으로 다양한 규모의 풍부한 개체 상호 작용이 포함됩니다. 각각의 경우에 유지하거나 변경할 관련 측면을 쉽게 식별하고 다른 곳에서 덜 주의를 기울이기 위해(예: 개의 털 색상 및 배경 물체), 모델은 심도 있는 시각적 추론 능력을 개발해야 하고 시각적 및 언어적 맥락 두 가지에서 암묵적인 인간 동의를 추론해야 합니다. 그러나 기존 데이터 세트는 패션 제품[4, 12, 13]이나 합성 개체[40]와 같이 비교적 단순한 이미지 내용을 가진 도메인으로 제한됩니다. 우리는 현재 데이터 세트가 위에서 언급한 고유한 연구 기회를 탐색하기에 충분하지 않다고 주장합니다.
Motivated by this problem, we collect the Compose Image Retrieval on Real-life images (CIRR) dataset. It is based on the open-domain collection of real images from NLVR2 [35], for which we collected rich, high-quality annotations that aim to tease out the important aspects of the reference image and textual description for a given query.
이 문제에 동기를 부여하여 CIRR(실제 이미지에 대한 Compose Image Retrieval) 데이터 세트를 수집합니다. 이것은 NLVR2[35]의 실제 이미지에 대한 개방형 도메인 컬렉션을 기반으로 하며, 이를 위해 주어진 쿼리에 대한 참조 이미지 및 텍스트 설명의 중요한 측면을 설명하는 것을 목표로 하는 풍부한 고품질 주석을 수집했습니다.
Compared with existing datasets, CIRR places more emphasis on distinguishing between visually similar images, which provides a greater challenge, as well as a chance for studying fine-grained vision-and-language (V&L) reasoning in composed image retrieval. Our dataset also allows for evaluation on fully labeled subsets, which addresses a shortcoming of existing datasets that are not fully labeled and therefore contain multiple false-negatives (as unlabeled images are considered negative).
기존 데이터 세트와 비교하여 CIRR은 시각적으로 유사한 이미지를 구별하는 데 더 중점을 두어 구성 이미지 검색에서 세분화된 시각 및 언어(V&L) 추론을 연구할 기회뿐만 아니라 더 큰 도전을 제공합니다. 우리의 데이터 세트는 또한 완전히 레이블이 지정된 하위 집합에 대한 평가를 허용합니다. 이는 완전히 레이블이 지정되지 않아 여러 개의 위음성을 포함하는 기존 데이터 세트의 단점을 해결합니다(레이블이 없는 이미지는 음수로 간주됨).
Meanwhile, we propose Composed Image Retrieval using Pretrained LANguage Transformers (CIRPLANT), which extends current methods into open-domain images by leveraging the knowledge of large-scale V&L pre-trained (VLP) model [25]. Although the advantages of such pretrained models have been validated in many visiolinguistic tasks [6, 25, 28], to the best of our knowledge, none have been applied to composed image retrieval. We conjecture one of the reasons being the existing domain-specific datasets cannot greatly benefit from the pre-training, which uses more complex, open-world images. Moreover, to adopt the VLP models for fine-tuning, most of the downstream tasks are formulated as classification tasks [6, 25]. For composed image retrieval, it requires taking as input both the reference and target images. However, this greatly raises the computational overhead for retrieval, as the model needs to exhaustively assess each input query paired with each candidate target before yielding the one with the highest prediction score. Instead, we propose to preserve the conventional metric learning pipeline, where the input queries are jointly embedded using the VLP model and later compared with features of candidate images through ℓ2- norm distance. Specifically, our design maintains the same objective of “language-conditioned image feature modification” as previous work [5, 8, 40], while manages to utilize the pre-trained V&L knowledge in large-scale models. We demonstrate that our proposed model reaches state-of-theart on the existing fashion dataset while outperforming current methods on CIRR.
한편, 우리는 대규모 V&L 사전 훈련(VLP) 모델에 대한 지식을 활용하여 현재 방법을 개방형 도메인 이미지로 확장하는 CIRPLANT(Pretrained LANguage Transformers)를 사용한 합성 이미지 검색을 제안합니다[25]. 이러한 사전 훈련된 모델의 장점은 많은 시각 언어 작업에서 검증되었지만[6, 25, 28], 우리가 아는 한, 합성 이미지 검색에는 적용되지 않았습니다. 우리는 그 이유 중 하나가 기존 도메인 특정 데이터셋이 더 복잡한 오픈 월드 이미지를 사용하는 사전 훈련의 이점을 크게 누릴 수 없기 때문이라고 추측합니다. 또한, 미세 조정을 위한 VLP 모델을 채택하기 위해 대부분의 다운스트림 작업은 분류 작업으로 공식화됩니다[6, 25]. 합성 이미지 검색의 경우 참조 이미지와 대상 이미지를 모두 입력으로 가져와야 합니다. 그러나 모델은 예측 점수가 가장 높은 쿼리를 생성하기 전에 각 후보 대상과 쌍을 이루는 각 입력 쿼리를 철저하게 평가해야 하므로 검색을 위한 계산 오버헤드가 크게 증가합니다. 대신 VLP 모델을 사용하여 입력 쿼리를 공동으로 삽입하고 나중에 ℓ2-norm 거리를 통해 후보 이미지의 특징과 비교하는 기존의 메트릭 학습 파이프라인을 유지하는 것을 제안합니다. 특히, 우리의 디자인은 이전 작업 [5, 8, 40]과 같은 "언어 조건 이미지 특징 수정"과 동일한 목표를 유지하면서 사전 훈련된 V&L 지식을 대규모 모델에서 활용합니다. 우리는 제안한 모델이 CIRR에서 현재 방법을 능가하는 동시에 기존 패션 데이터 세트에서 최신 상태에 도달함을 보여줍니다.
2. Related Work
Image retrieval.
이미지 검색.
Existing work on image retrieval using deep learning can be categorized by the type of queries considered. Content-based Image Retrieval (CBIR) refers to the use of image-only queries for product search [26], face recognition [29, 34], etc. This setup leaves little room for iterative user feedback or refinement. Other possible modalities to form queries include attributes [13], natural language [24, 42], and sketches [31]. These are motivated by a more natural user experience, but require more advanced retrieval mechanisms. Vo et al. [40] propose composed image retrieval that combines visual and text modalities. Here the query consists of a reference image and short text describing desired differences with this image. Guo et al. [12] demonstrate the potential of this setup for the narrow domain of fashion recommendation.
딥 러닝을 사용한 이미지 검색에 대한 기존 작업은 고려되는 쿼리 유형에 따라 분류할 수 있습니다. 콘텐츠 기반 이미지 검색(CBIR)은 제품 검색[26], 얼굴 인식[29, 34] 등에 이미지 전용 쿼리를 사용하는 것을 말합니다. 이 설정은 반복적인 사용자 피드백이나 개선을 위한 여지를 거의 남기지 않습니다. 쿼리를 형성할 수 있는 다른 양식으로는 속성[13], 자연어[24, 42], 스케치[31]가 있습니다. 이는 보다 자연스러운 사용자 경험에 의해 동기가 부여되지만 보다 고급 검색 메커니즘이 필요합니다. Vo et al. [40]은 시각적 및 텍스트 양식을 결합한 합성 이미지 검색을 제안합니다. 여기에서 쿼리는 참조 이미지와 이 이미지와의 원하는 차이점을 설명하는 짧은 텍스트로 구성됩니다. Guo et al. [12] 패션 추천의 좁은 영역에 대한 이 설정의 잠재력을 보여줍니다.
Our work focuses on composed image retrieval in an open-domain setting, i.e., not restricted to fashion products for example. We specifically address the case of distinguishing visually similar images, which requires more indepth, fine-grained reasoning ablility over both the visual and language modalities.
우리의 작업은 예를 들어 패션 제품에 국한되지 않는 오픈 도메인 설정에서 구성된 이미지 검색에 중점을 둡니다. 우리는 시각적으로 유사한 이미지를 구별하는 경우를 구체적으로 다루며, 시각적 및 언어 양식 모두에 대해 더 깊이 있고 세분화된 추론 능력이 필요합니다.
Compositional learning.
구성학습
The topic of compositional learning has been extensively studied in V&L tasks including visual question answering (VQA) [3], image captioning [1, 2] and video retrieval [41]. The aim is to produce learned joint-embedding features that capture the salient information in both visual and text modalities along with their interactions. For composed image retrieval, Vo et al. [40] first propose a residual-gating mechanism that aims to control variation of the input image features through text. Hosseinzadeh and Wang [17] use region-based visual features from R-CNN models [10, 32] originally proposed for image captioning [1] and VQA [37]. Recently, Chen et al. [5] use a transformer-based model [39] and inject the text modality at varying depths of the image model. Dodds et al. [8] introduce the concept of modality-agnostic tokens, which they obtain from “divided” spatial convolutional features and LSTM hidden states. In this work, we propose a method that leverages the rich knowledge in VLP models. Our method can modify the input image features based on natural language without the need of developing monolithic architecture on the specific task.
구성 학습 주제는 VQA(Visual Question Answering)[3], 이미지 캡션[1, 2] 및 비디오 검색[41]을 포함한 V&L 작업에서 광범위하게 연구되었습니다. 목표는 상호 작용과 함께 시각적 및 텍스트 양식 모두에서 두드러진 정보를 캡처하는 학습된 조인트 포함 기능을 생성하는 것입니다. 합성 이미지 검색의 경우 Vo et al. [40] 먼저 텍스트를 통해 입력 이미지 특징의 변화를 제어하는 것을 목표로 하는 잔여 게이팅 메커니즘을 제안합니다. Hosseinzadeh와 Wang[17]은 원래 이미지 캡션[1] 및 VQA[37]에 대해 제안된 R-CNN 모델[10, 32]의 영역 기반 시각적 기능을 사용합니다. 최근에 Chen et al. [5] 변환기 기반 모델을 사용하고 [39] 이미지 모델의 다양한 깊이에 텍스트 양식을 주입합니다. Dodds et al. [8] "분할된" 공간 컨볼루션 기능과 LSTM 숨겨진 상태에서 얻은 양식 불가지론 토큰의 개념을 소개합니다. 이 작업에서는 VLP 모델의 풍부한 지식을 활용하는 방법을 제안합니다. 우리의 방법은 특정 작업에 대한 모놀리식 아키텍처를 개발할 필요 없이 자연어를 기반으로 입력 이미지 특징을 수정할 수 있습니다.
Vision-and-language pre-training.
The success of pretrained BERT [7] inspired numerous attempts on VLP models, including [6, 23, 25, 28, 36]. The aim is to develop Transformer-based [39] models trained on large-scale image-text triplets to produces V&L representations applicable to various tasks. The advantage is clear, instead of training monolithic models on task-specific datasets from zero, different V&L tasks can start with the representations learned from (usually) a considerably larger image-text corpus, and fine-tune on specific tasks. Motivated by success in other V&L tasks, we propose to adopt the VLP model on composed image retrieval. The key obstacle is to design the architecture to encourage a controlled modification of image features, which, differs greatly from the conventional use cases of such models.
시각 및 언어 사전 교육.
사전 훈련된 BERT[7]의 성공은 [6, 23, 25, 28, 36]을 포함하여 VLP 모델에 대한 수많은 시도에 영감을 주었습니다. 목표는 다양한 작업에 적용할 수 있는 V&L 표현을 생성하기 위해 대규모 이미지-텍스트 삼중항에 대해 훈련된 Transformer 기반 [39] 모델을 개발하는 것입니다. 장점은 0에서 작업별 데이터 세트에 대한 모놀리식 모델을 훈련하는 대신 (일반적으로) 상당히 큰 이미지 텍스트 코퍼스에서 학습한 표현으로 다양한 V&L 작업을 시작하고 특정 작업을 미세 조정할 수 있다는 점입니다. 다른 V&L 작업의 성공에 동기를 부여하여 합성 이미지 검색에 VLP 모델을 채택할 것을 제안합니다. 주요 장애물은 이러한 모델의 기존 사용 사례와 크게 다른 이미지 기능의 제어된 수정을 장려하도록 아키텍처를 설계하는 것입니다.
Datasets for composed image retrieval.
Most existing datasets suitable for composed image retrieval are repurposed from other tasks [13, 18, 40]. Images are paired within classes and textual descriptions of their differences are generated automatically from existing labels. These datasets are relatively simple visually and only contain short descriptions with simple language. CSS [40] uses the synthetic images of geometric 3D shapes from CLEVR [20], paired with descriptions generated according to differences in appearance of the objects. Fashion200k [13] contains approx. 200k images tagged with attributes that can be used to compose text descriptions of differences between images. MIT-States [18] contains images of entities in different states each labelled with one noun and one adjective. The adjectives can describe limited differences between images. More recent works introduced human-generated descriptions. Guo et al. [11] present annotations for Shoes [4], a dataset of 10k footwear images. Fashion-IQ [12] contains crowd-sourced descriptions of differences between images of fashion products. Dodds et al. [8] introduce benchmarks for the Birds-to-Words [9] and Spot-the-Diff [19] datasets.
구성된 이미지 검색을 위한 데이터 세트
합성 이미지 검색에 적합한 대부분의 기존 데이터 세트는 다른 작업에서 용도가 변경됩니다[13, 18, 40]. 이미지는 클래스 내에서 쌍을 이루고 차이점에 대한 텍스트 설명은 기존 레이블에서 자동으로 생성됩니다. 이러한 데이터 세트는 시각적으로 비교적 단순하며 간단한 언어로 된 짧은 설명만 포함합니다. CSS[40]는 CLEVR[20]의 기하학적 3D 모양의 합성 이미지를 사용하고 개체의 모양 차이에 따라 생성된 설명과 쌍을 이룹니다. Fashion200k [13]에는 이미지 간의 차이점에 대한 텍스트 설명을 구성하는 데 사용할 수 있는 속성으로 태그가 지정된 약 200k 이미지가 들어 있습니다. MIT-States[18]에는 각각 하나의 명사와 하나의 형용사로 레이블이 지정된 다른 주에 있는 개체의 이미지가 포함되어 있습니다. 형용사는 이미지 간의 제한된 차이를 설명할 수 있습니다. 보다 최근의 작품에는 인간이 생성한 설명이 도입되었습니다. Guo et al. [11]은 10k 신발 이미지의 데이터세트인 Shoes [4]에 대한 주석을 제공합니다. Fashion-IQ[12]에는 패션 제품 이미지 간의 차이점에 대한 크라우드 소싱 설명이 포함되어 있습니다. Dodds et al. [8] Birds-to-Words [9] 및 Spot-the-Diff [19] 데이터 세트에 대한 벤치마크를 소개합니다.
In this paper, we introduce a new dataset that addresses current deficiencies. Our dataset is open-domain and not restricted, e.g., to fashion products [4, 12, 13]. We design a careful collection process to produce high-quality pairs from our diverse collection of images by only associating visually- and semantically-related images. We also address the issue of false-negative targets, that is, candidate target images that are valid for a certain input query, but not labeled as such. Previous datasets failed to resolve this issue due to the cost of exhaustively labeling images against every possible query, which is mitigated by our data collection strategy. Although not used in our current work, the dataset also contains a rich set of auxiliary annotations that clarify ambiguities not addressed in the textual query.
이 백서에서는 현재 결함을 해결하는 새로운 데이터 세트를 소개합니다. 우리의 데이터 세트는 오픈 도메인이며 예를 들어 패션 제품으로 제한되지 않습니다[4, 12, 13]. 우리는 시각적, 의미적으로 관련된 이미지만 연결하여 다양한 이미지 컬렉션에서 고품질 쌍을 생성할 수 있도록 신중한 컬렉션 프로세스를 설계합니다. 우리는 또한 위음성 타겟, 즉 특정 입력 쿼리에 유효하지만 레이블이 지정되지 않은 후보 타겟 이미지의 문제를 다룹니다. 이전 데이터 세트는 가능한 모든 쿼리에 대해 철저하게 이미지에 레이블을 지정하는 비용으로 인해 이 문제를 해결하지 못했습니다. 이는 데이터 수집 전략에 의해 완화되었습니다. 현재 작업에서는 사용되지 않지만 데이터세트에는 텍스트 쿼리에서 다루지 않은 모호성을 명확히 하는 풍부한 보조 주석 세트도 포함되어 있습니다.
3. The Proposed Model
In this section, we first briefly introduce the vision-and language pre-trained (VLP) models, then we discuss our adaptation of it for the task of composed image retrieval.
3. 제안 모델
이 섹션에서는 먼저 비전 및 언어 사전 훈련(VLP) 모델을 간략하게 소개한 다음 합성 이미지 검색 작업을 위해 이를 적용하는 방법에 대해 논의합니다.
3.1. Vision-and-Language Pre-trained Models
3.1. 시각 및 언어 사전 훈련된 모델
Contemporary VLP models are inspired by BERT [7], which is constructed with multi-layer transformers [39]. The model accepts variable-length sequential inputs iVLP, which consist of a concatenation among words in the text sequence(s) w = {w1, . . . , wT }, regional features from the image v = {v1, . . . , vK}, and other optional tokens. For instance, in OSCAR [25], an object label associated with each regional feature is appended to the end as l = {l1, . . . , lK}.
현대 VLP 모델은 다층 변압기[39]로 구성된 BERT[7]에서 영감을 받았습니다. 모델은 가변 길이 순차 입력 iVLP를 허용하며, 이는 텍스트 시퀀스 w = {w1, . . . , wT }, 이미지 v = {v1, . . . , vK} 및 기타 선택적 토큰. 예를 들어 OSCAR[25]에서 각 지역 특징과 관련된 객체 레이블은 l = {l1, . . . , lK}.
Within each transformer layer, a multi-head selfattention mechanism is designed to capture the dependencies among the sequential tokens. Layers are stacked hierarchically to attend to the output of the previous layer. Once pre-trained on a large corpus, the final output representations can be used for fine-tuning on arbitrary downstream tasks, where the usage varies depending on the task.
각 변환기 계층 내에서 다중 헤드 자가 주의 메커니즘은 순차 토큰 간의 종속성을 캡처하도록 설계되었습니다. 레이어는 이전 레이어의 출력을 확인하기 위해 계층적으로 쌓입니다. 대규모 말뭉치에서 사전 훈련되면 최종 출력 표현은 작업에 따라 사용량이 달라지는 임의의 다운스트림 작업에 대한 미세 조정에 사용할 수 있습니다.
That said, downstream tasks share some common aspects. Mostly, a classification token [CLS] is inserted at the start of the input text sequence, which aggregates information from the modalities. The final [CLS] output is then used to make predictions, such as for image classification.
즉, 다운스트림 작업은 몇 가지 공통적인 측면을 공유합니다. 대부분 분류 토큰[CLS]은 양식에서 정보를 집계하는 입력 텍스트 시퀀스의 시작 부분에 삽입됩니다. 그런 다음 최종 [CLS] 출력은 이미지 분류와 같은 예측을 수행하는 데 사용됩니다.
3.2. Adaptation to Composed Image Retrieval
3.2. 합성 이미지 검색에 대한 적응
The task of composed image retrieval can be formally described as finding the target image in a large corpus of images IT ∈ D that best matches a query provided by a reference image-text pair q = ⟨IR, t⟩. Our goal is to learn a text-image composition module, which maps a given ⟨IR, t⟩ into the same embedding space as, and close to, the corresponding IT. Intuitively speaking, this requires the composition module to modify IR conditioned on t.
합성 이미지 검색 작업은 참조 이미지-텍스트 쌍 q = ⟨IR, t⟩에 의해 제공되는 쿼리와 가장 잘 일치하는 대규모 이미지 코퍼스 IT ∈ D에서 대상 이미지를 찾는 것으로 공식적으로 설명될 수 있습니다. 우리의 목표는 주어진 ⟨IR, t⟩를 해당 IT와 동일한 임베딩 공간에 매핑하는 텍스트 이미지 합성 모듈을 배우는 것입니다. 직관적으로 말해서, 이것은 합성 모듈이 t에 맞춰진 IR을 수정해야 합니다.
In this work, we employ OSCAR [25], a recently proposed VLP model with state-of-the-art performance as the composition module to perform the mapping as follows.
본 연구에서는 최근 제안된 VLP 모델인 OSCAR[25]을 합성 모듈로 사용하여 다음과 같은 매핑을 수행한다.
Input sequence. We denote the input sequence of OSCAR as iVLP = {w, v}, where we initialize OSCAR without the optional object label inputs l. We then follow Li et al. [25] for processing text sequences, but introduce the following adaptations on image representations.
입력 순서. OSCAR의 입력 시퀀스를 iVLP = {w, v}로 표시합니다. 여기서 선택적 개체 레이블 입력 l 없이 OSCAR을 초기화합니다. 그런 다음 Li et al. [25] 텍스트 시퀀스를 처리하기 위한 것이지만 이미지 표현에 대해 다음과 같은 적응을 도입합니다.
Rather than including a set of regional features, we pre-process images through an ImageNet pre-trained ResNet [14] model and extract features from before the final FC-layer. We then process these features through a (newly) learned FC-layer and ℓ2-normalization to give a single image feature v = {v1} as the input to OSCAR. This same feature representation is used for the corpus of candidate target images I ′ T ∈ D as shown in Fig. 2.
지역적 특징 세트를 포함하는 대신 ImageNet 사전 훈련된 ResNet [14] 모델을 통해 이미지를 사전 처리하고 최종 FC 계층 이전의 특징을 추출합니다. 그런 다음 (새로) 학습된 FC 계층 및 ℓ2-정규화를 통해 이러한 기능을 처리하여 OSCAR에 대한 입력으로 단일 이미지 기능 v = {v1}을 제공합니다. 이 동일한 특징 표현이 그림 2에 표시된 것처럼 후보 대상 이미지 I ' T ∈ D의 말뭉치에 사용됩니다.
We choose this relatively simple design for two reasons. First, recent work (e.g., [16]) has shown the compatibility between VLP models and non-regional features of images. Second, we hypothesize that using global image features is easier to achieve our goal of modifying IR conditioned on t so as to closely match IT.
우리는 두 가지 이유로 이 비교적 단순한 디자인을 선택합니다. 첫째, 최근 연구(예: [16])는 VLP 모델과 이미지의 비영역적 특성 간의 호환성을 보여주었습니다. 둘째, 글로벌 이미지 기능을 사용하는 것이 IT와 밀접하게 일치하도록 t에 조건화된 IR을 수정하는 목표를 달성하는 것이 더 쉽다고 가정합니다.
Output token. As shown in Fig. 2, contrary to typical downstream tasks, we do not use the final representation of the [CLS] token as the text-image joint embedding. Instead, we extract the representation corresponding to the image feature token and treat it as the composed imagetext feature. This resembles the fine-tuning of REF [23], as well as VLN-BERT [16]. In both cases, tokens other than [CLS] are used for prediction. For composed image retrieval, our design makes sense since the transformer model includes residual connections between input and output tokens. Intuitively, the reference image features are modified by aggregating the information from other word tokens to produce the target image features.
출력 토큰. 그림 2와 같이 일반적인 다운스트림 작업과 달리 [CLS] 토큰의 최종 표현을 텍스트-이미지 조인트 임베딩으로 사용하지 않습니다. 대신 이미지 기능 토큰에 해당하는 표현을 추출하고 합성된 이미지 텍스트 기능으로 처리합니다. 이것은 REF[23] 및 VLN-BERT[16]의 미세 조정과 유사합니다. 두 경우 모두 [CLS] 이외의 토큰이 예측에 사용됩니다. 합성 이미지 검색의 경우 변환기 모델에 입력 토큰과 출력 토큰 간의 잔여 연결이 포함되어 있기 때문에 우리의 설계가 의미가 있습니다. 직관적으로 참조 이미지 특징은 대상 이미지 특징을 생성하기 위해 다른 단어 토큰의 정보를 집계하여 수정됩니다.
Metric learning. We use soft triplet-based loss with ℓ2- norm distance as in Vo et al. [40] to bring the composed image-text feature closer to the feature of the target image (positive pair), while pulling apart the features of negative pairs. In essence, given the i-th positive pair ⟨φi , ϕ+ i ⟩ and an arbitrary negative ϕ − i,j among all negatives ϕ − i , the loss is computed as:
메트릭 학습. Vo et al.에서와 같이 ℓ2-norm 거리와 함께 soft triplet-based loss를 사용합니다. [40] 구성된 이미지-텍스트 특징을 대상 이미지의 특징(양수 쌍)에 더 가깝게 가져오는 동안 음수 쌍의 특징을 분리합니다. 본질적으로, i번째 양수 쌍 ⟨φi , ϕ+ i ⟩ 및 모든 음수 ϕ − i 중에서 임의의 음수 ϕ − i,j가 주어지면 손실은 다음과 같이 계산됩니다.
where κ is ℓ2-norm distance. In training, we randomly sample the negative for each pair and average the loss over all sampled triplets ⟨φi , ϕ+ i , ϕ− i,j ⟩.
여기서 κ는 ℓ2-노름 거리입니다. 훈련에서 우리는 각 쌍에 대해 음수를 무작위로 샘플링하고 샘플링된 모든 삼중항 ⟨φi , ϕ+ i , ϕ− i,j ⟩에 대한 손실을 평균화합니다.
4. The CIRR Dataset
Existing datasets for composed image retrieval [12, 40] contain training and testing examples as triplets ⟨IR, q, IT⟩ where q = ⟨IR, t⟩ forms the query and IT is (an example of) the desired target from a large image corpus D. However, these existing datasets have two major shortcomings. First, they lack the sufficient visual complexity to facilitate the study of one of the major challenges in composed image retrieval, which is the subtle reasoning over what aspects are important and what shall be ignored. Second, since the candidate images cannot be extensively labeled for each ⟨IR, t⟩ pair, existing datasets contain many false-negatives. That is, images I ∈ D that are valid matches for the query but not labeled as the ground-truth target IT. Indeed, all images in D \{IR, IT} are considered as negatives. To circumvent this shortcoming, existing works choose to evaluate models with Recall@K and set K to larger values (e.g., 10, 50 [12]), thus accounting for the presence of false-negatives. However, the issue persists during training. Moreover, by setting larger K values, these methods are essentially trading in their ability for learning detailed text-image modifications.
합성 이미지 검색을 위한 기존 데이터 세트[12, 40]에는 3중항 ⟨IR, q, IT⟩로 훈련 및 테스트 예제가 포함되어 있습니다. 여기서 q = ⟨IR, t⟩는 쿼리를 형성하고 IT는 대규모 image corpus D. 그러나 이러한 기존 데이터 세트에는 두 가지 주요 단점이 있습니다. 첫째, 어떤 측면이 중요하고 무엇을 무시해야 하는지에 대한 미묘한 추론인 합성 이미지 검색의 주요 과제 중 하나에 대한 연구를 용이하게 하기에 충분한 시각적 복잡성이 부족합니다. 둘째, 후보 이미지에 각 ⟨IR, t⟩ 쌍에 대해 광범위하게 레이블을 지정할 수 없기 때문에 기존 데이터 세트에는 많은 거짓 음성이 포함되어 있습니다. 즉, 쿼리에 대해 유효한 일치 항목이지만 ground-truth target IT로 레이블이 지정되지 않은 이미지 I ∈ D입니다. 실제로 D \{IR, IT}의 모든 이미지는 네거티브로 간주됩니다. 이러한 단점을 피하기 위해 기존 작업에서는 Recall@K를 사용하여 모델을 평가하고 K를 더 큰 값(예: 10, 50[12])으로 설정하여 위음성의 존재를 설명합니다. 그러나 문제는 훈련 중에 지속됩니다. 게다가, 더 큰 K 값을 설정함으로써, 이러한 방법은 본질적으로 상세한 텍스트 이미지 수정을 학습하는 능력을 교환합니다.
To mitigate these issues, we introduce the Compose Image Retrieval on Real-life images (CIRR) dataset, which includes over 36,000 annotated query-target pairs, ⟨q = ⟨IR, t⟩, IT⟩. Unlike existing datasets, we collect the modifying text to distinguish the target from a set of similar images (addressing the problem of false-negatives) and creating challenging examples that require careful consideration of visual and textual cues. Details are as follows.
이러한 문제를 완화하기 위해 36,000개 이상의 주석이 달린 쿼리 대상 쌍(⟨q = ⟨IR, t⟩, IT⟩)이 포함된 CIRR(실제 이미지에 대한 Compose Image Retrieval) 데이터 세트를 도입했습니다. 기존 데이터 세트와 달리 수정 텍스트를 수집하여 유사한 이미지 세트(위음성 문제 해결)에서 대상을 구별하고 시각적 및 텍스트 단서를 신중하게 고려해야 하는 도전적인 예제를 만듭니다. 자세한 내용은 다음과 같습니다.
4.1. Data Collection
We first form image pairs then collect related annotations by crowd-sourcing. The pairs are drawn from subsets of images, as described below. This strategy plays a major role in mitigating the issue of false negatives (see Sec. 5). Fig. 3 outlines our data collection procedure.
먼저 이미지 쌍을 형성한 다음 크라우드 소싱을 통해 관련 주석을 수집합니다. 쌍은 아래에 설명된 대로 이미지의 하위 집합에서 가져옵니다. 이 전략은 위음성 문제를 완화하는 데 중요한 역할을 합니다(섹션 5 참조). 그림 3은 데이터 수집 절차를 설명합니다.
Image source. We use the popular NLVR2 dataset for natural language visual reasoning [35] as our source of images. We choose NLVR2 for several reasons. First, it contains images of real-world entities with reasonable complexity in ImageNet-type [22]. Second, the setup of our task requires image in pairs that are similar enough, and NLVR2 is designed to have collections of similar images regarding 1,000 synsets (e.g., acorn, seawall). Also, Suhr et al. [35] employs an additional step to manually remove non-interesting images, thus ensuring the content quality.
이미지 출처. 우리는 자연어 시각적 추론 [35]을 위해 인기 있는 NLVR2 데이터 세트를 이미지 소스로 사용합니다. 우리는 몇 가지 이유로 NLVR2를 선택합니다. 첫째, ImageNet 유형[22]에서 합리적인 복잡성을 가진 실제 개체의 이미지를 포함합니다. 둘째, 우리 작업의 설정에는 충분히 유사한 쌍의 이미지가 필요하며 NLVR2는 1,000개의 synset(예: 도토리, 방파제)에 대한 유사한 이미지 모음을 갖도록 설계되었습니다. 또한, Suhr et al. [35]는 흥미롭지 않은 이미지를 수동으로 제거하는 추가 단계를 사용하여 콘텐츠 품질을 보장합니다.
Image subset construction. The nature of our task requires collections of negative images with high visual similarity, as otherwise, it would be trivial to discriminate between the reference and target image. Thus, prior to forming reference-target image pairs, we construct multiple subsets of six images that are semantically and visually similar, denoted as S = {I1, . . . , I6}, shown in Fig. 3(a).
이미지 하위 집합 구성. 우리 작업의 특성상 시각적 유사성이 높은 부정적인 이미지 모음이 필요합니다. 그렇지 않으면 참조 이미지와 대상 이미지를 구별하기가 쉽지 않습니다. 따라서 참조-대상 이미지 쌍을 형성하기 전에 S = {I1, . . . , I6}, 그림 3(a)에 나와 있습니다.
Here, to construct a subset, we randomly pick one image from the large corpus I1 ∈ D. We then sort the remaining images in D by their cosine similarity to I1 using ResNet152 [14] image feature vectors pre-trained on ImageNet [22]. Denote by κi the cosine similarity for image Ii . We then pick five additional images to produce a similar yet diverse subset, as follows: First, we filter out images with κi ≥ 0.94 to avoid near-identical images to I1. Then for the next top-20 ranked images, we greedily add each image in turn, skipping an image if its cosine similarity is within 0.002 of the last image added. If a subset of size six cannot be created, then the entire set is discarded.
여기에서 부분 집합을 구성하기 위해 큰 말뭉치 I1 ∈ D에서 하나의 이미지를 무작위로 선택합니다. 그런 다음 ImageNet에서 사전 훈련된 ResNet152 [14] 이미지 특징 벡터를 사용하여 I1에 대한 코사인 유사도로 D의 나머지 이미지를 정렬합니다. . 이미지 Ii에 대한 코사인 유사도를 κi로 표시합니다. 그런 다음 다음과 같이 유사하지만 다양한 하위 집합을 생성하기 위해 5개의 추가 이미지를 선택합니다. 먼저 I1과 거의 동일한 이미지를 피하기 위해 κi ≥ 0.94인 이미지를 필터링합니다. 그런 다음 다음 상위 20개 이미지에 대해 코사인 유사도가 마지막으로 추가된 이미지의 0.002 이내이면 이미지를 건너뛰고 각 이미지를 탐욕스럽게 차례로 추가합니다. 크기 6의 하위 집합을 만들 수 없으면 전체 집합이 삭제됩니다.
Once constructed we further filter the collection subsets to avoid heavy overlap. We obtain in total 52,732 subsets from NLVR2 , from which we randomly choose 4,351 for the construction of CIRR.
일단 구성되면 과도한 중복을 피하기 위해 컬렉션 하위 집합을 추가로 필터링합니다. 우리는 NLVR2에서 총 52,732개의 부분집합을 얻었고 그 중에서 CIRR을 구성하기 위해 4,351개를 무작위로 선택했습니다.
Image pairing. Within each constructed image subset S, we draw nine pairs of images, as shown in Fig. 3(b). We choose these pairs to have (1) consecutive modifications that will allow future training of a dialogue systems; and (2) multiple outcomes from the same reference image.
이미지 페어링. 구성된 각 이미지 하위 집합 S 내에서 그림 3(b)와 같이 9쌍의 이미지를 그립니다. 우리는 이러한 쌍을 선택하여 (1) 대화 시스템의 향후 훈련을 허용할 연속 수정; 및 (2) 동일한 참조 이미지의 여러 결과.
Annotations. We collect a modification sentence for each pair of reference-target images using Amazon Mechanical Turk (AMT). To ensure that no false-negatives exist within the same image subset from which we draw the pair, as illustrated in Fig. 3(c), we show AMT workers the remaining images from the subset and specifically ask them to write sentences that can only lead to the true target image.
주석. Amazon Mechanical Turk(AMT)를 사용하여 참조 대상 이미지의 각 쌍에 대한 수정 문장을 수집합니다. 그림 3(c)와 같이 쌍을 그리는 동일한 이미지 하위 집합 내에 거짓 음성이 존재하지 않도록 하기 위해 AMT 작업자에게 하위 집합의 나머지 이미지를 보여주고 구체적으로 다음과 같은 문장을 작성하도록 요청합니다. 진정한 타겟 이미지로 이어집니다.
AMT workers were instructed to avoid subjective descriptions, text mentions, plain side-by-side comparisons, or simple descriptions that only address the target images.
AMT 작업자는 주관적인 설명, 텍스트 언급, 단순한 나란히 비교 또는 대상 이미지만 다루는 간단한 설명을 피하도록 지시받았습니다.
Following the collection of the modification sentences for each pair, we additionally collect some auxiliary annotations that more explicitly address the ambiguities associated with implicit human-agreements. While we believe that these auxiliary annotations will be useful for future work, we do not make use them in our current work1 .
각 쌍에 대한 수정 문장을 수집한 후 암시적 인간 동의와 관련된 모호성을 보다 명시적으로 해결하는 몇 가지 보조 주석을 추가로 수집합니다. 이러한 보조 주석이 향후 작업에 유용할 것이라고 생각하지만 현재 작업1에서는 사용하지 않습니다.
Data splits. Following convention, we randomly assign 80% of the data for training, 10% for validation and 10% for test. Detailed statistics are shown in Table 2.
데이터 분할. 규칙에 따라 데이터의 80%를 학습용으로, 10%를 검증용으로, 10%를 테스트용으로 무작위로 할당합니다. 자세한 통계는 표 2에 나와 있습니다.
4.2. Analysis on CIRR
We follow Suhr et al. [35] and analyze coverage of various semantic concepts by keywords and sentence patterns (see Table 1). Here, we show comparisons with Fashion-IQ [12], the most popular, comparable humanlabeled dataset. We observe a greater diversity and average length in the sentences in CIRR, indicating broad coverage and linguistic diversity. Over 40% of the annotations are compositional, which indicates an appreciable level of complexity of the sentences. Interestingly, our annotations should also encourage models to attend to both the reference and target images by implicitly (rows 1–4) or explicitly (rows 5–6) referring to the visual contents of both images.
우리는 Suhr 등을 따릅니다. [35] 다양한 의미 개념의 범위를 키워드 및 문장 패턴별로 분석합니다(표 1 참조). 여기에서 가장 인기 있고 비교 가능한 인간 레이블 데이터 세트인 Fashion-IQ[12]와의 비교를 보여줍니다. 우리는 CIRR의 문장에서 더 큰 다양성과 평균 길이를 관찰하여 광범위한 적용 범위와 언어적 다양성을 나타냅니다. 주석의 40% 이상이 구성적이며 이는 문장의 상당한 수준의 복잡성을 나타냅니다. 흥미롭게도 우리의 주석은 모델이 두 이미지의 시각적 내용을 암시적으로(1-4행) 또는 명시적으로(5-6행) 참조 및 대상 이미지 모두에 주의하도록 권장해야 합니다.
5. Experiments
Datasets. To demonstrate the model’s ability in untilizing pre-trained V&L knowledge, as well as its generalizability to images of different domains, we evaluate our proposed model against baselines and state-of-the-art (SoTA) methods on two datasets, including (1) CIRR, our proposed dataset on open-domain composed image retrieval, and (2) Fashion-IQ [12], which contains images of fashion products among three subtypes (Dress, Shirt, Toptee) with human-generated annotations. We do not evaluate on other datasets discussed in Sec. 2, as they either contain synthetic image/annotation or are domain-wise similar to Fashion-IQ (e.g., Fashion200k [13]).
데이터 세트. 사전 훈련된 V&L 지식을 완성하는 모델의 능력과 다른 도메인의 이미지에 대한 일반화 가능성을 입증하기 위해 제안된 모델을 기준선 및 최신(SoTA) 방법에 대해 다음을 포함한 두 데이터 세트에 대해 평가합니다. ) CIRR, 개방형 도메인 합성 이미지 검색에 대해 제안된 데이터 세트 및 (2) Fashion-IQ[12], 인간 생성 주석이 있는 세 가지 하위 유형(Dress, Shirt, Toptee) 중 패션 제품의 이미지를 포함합니다. Sec.2에서 논의된 다른 데이터 세트에 대해서는 평가하지 않습니다. 합성 이미지/주석을 포함하거나 Fashion-IQ와 도메인별로 유사하기 때문입니다(예: Fashion200k [13]).
Compared methods. For CIRR, we evaluate the following methods using publicly available implementations2 :
• TIRG [40] is an image-text composition model for composed image retrieval, which has proven to be effective on multiple datasets [12, 13, 18, 40]. The method uses a gating and residual design to encourage the learning of cross-modal features. Two setups for TIRG are available based on whether to inject text features at the last FC-layer (default), or the last convolution layer (LastConv). We test both setups.
• MAAF [8] is specifically designed for composed image retrieval with state-of-the-art performance. By default, it treats the convolutional spatial image features and the learned text embeddings (randomly initialized with LSTM [15]) as modality-agnostic tokens, which are passed to a Transformer [39]. We evaluate three design choices that were originally reported with comparable results: (+BERT) pretrained contextaware word representations using BERT [7], (-IT) removing the output of text tokens in the last pooling layer, (-RP) substituting the final resolution-wise pooling with average pooling.
비교 방법. CIRR의 경우 공개적으로 사용 가능한 구현2을 사용하여 다음 방법을 평가합니다.
• TIRG[40]는 합성 이미지 검색을 위한 이미지 텍스트 합성 모델로, 여러 데이터 세트[12, 13, 18, 40]에서 효과적인 것으로 입증되었습니다. 이 방법은 게이팅 및 잔차 설계를 사용하여 교차 모드 기능의 학습을 장려합니다. TIRG에 대한 두 가지 설정은 마지막 FC 레이어(기본값) 또는 마지막 컨볼루션 레이어(LastConv)에 텍스트 기능을 삽입할지 여부에 따라 사용할 수 있습니다. 우리는 두 설정을 모두 테스트합니다.
• MAAF[8]는 최첨단 성능으로 합성 이미지 검색을 위해 특별히 설계되었습니다. 기본적으로 컨볼루션 공간 이미지 기능과 학습된 텍스트 임베딩(LSTM[15]로 무작위로 초기화됨)을 Transformer[39]에 전달되는 양식에 구애받지 않는 토큰으로 취급합니다. 우리는 원래 비교 가능한 결과로 보고된 세 가지 디자인 선택을 평가합니다. (+BERT) BERT[7]를 사용하여 사전 훈련된 컨텍스트 인식 단어 표현, (-IT) 마지막 풀링 계층에서 텍스트 토큰의 출력 제거, (-RP) 평균 풀링을 사용한 해상도별 풀링.
For comparison, we also evaluate the following baselines, implemented by Vo et al. [40]:
• Random (theoretical): theoretical random guess.
• Random (init. ResNet): pretrained ImageNet [22] features, but random weights for others parameters.
• Image and text-only: substituting the combined imagetext feature with the reference image or text feature.
• Random image with text: randomly sampling images to pair with text during training and validation.
• Concatenation: replacing the image-text composition layer with a simple concatenation of features followed by a 2-layer perceptron with ReLU.
비교를 위해 Vo et al.에 의해 구현된 다음 기준선도 평가합니다. [40]:
• 무작위(이론적): 이론적 무작위 추측.
• Random(초기 ResNet): 사전 훈련된 ImageNet[22] 기능이지만 다른 매개변수에 대한 임의 가중치.
• 이미지 및 텍스트만: 결합된 이미지 텍스트 기능을 참조 이미지 또는 텍스트 기능으로 대체합니다.
• 텍스트가 있는 무작위 이미지: 훈련 및 검증 중에 텍스트와 쌍을 이루는 이미지를 무작위로 샘플링합니다.
• 연결: 이미지-텍스트 합성 레이어를 ReLU가 있는 2-레이어 퍼셉트론 뒤에 오는 피처의 단순한 연결로 대체합니다.
For Fashion-IQ, we additionally include published results from the following methods:
• MRN [21] uses stacked blocks of element-wise products with residual learning to embed V&L jointly.
• FiLM [30] modulates the image feature map conditioned on text features after the layers of CNN.
• Relationship [33] learns the joint embeddings through relationship features constructed by concatenating the image and text features followed by FC-layers.
• VAL [5] is specially designed for composed image retrieval, which adopts the Transformer to compose multi-level V&L joint representations. For images with text descriptions as side information, an additional visual-semantic loss is applied to align visual features and the corresponding text features.
Fashion-IQ의 경우 다음 방법으로 게시된 결과를 추가로 포함합니다.
• MRN[21]은 V&L을 공동으로 내장하기 위해 잔여 학습이 있는 요소별 곱의 스택 블록을 사용합니다.
• FiLM[30]은 CNN 레이어 이후에 텍스트 기능에 따라 이미지 기능 맵을 변조합니다.
• 관계[33]는 이미지와 텍스트 특징을 연결하고 FC 레이어를 따라 구성된 관계 특징을 통해 조인트 임베딩을 학습합니다.
• VAL[5]은 다중 레벨 V&L 조인트 표현을 구성하기 위해 Transformer를 채택하는 합성 이미지 검색을 위해 특별히 설계되었습니다. 부가 정보로 텍스트 설명이 있는 이미지의 경우 시각적 특징과 해당 텍스트 특징을 정렬하기 위해 추가 시각적 의미 손실이 적용됩니다.
Metric. We follow previous work to report retrieval performance in Recall within top-K (Recall@K). For CIRR, we additionally report Recallsubset, which is an extension to the standard (global) Recall, made possible by the unique design of our dataset.
Metric. 우리는 이전 작업을 따라 top-K 내 Recall(Recall@K)에서 검색 성능을 보고합니다. CIRR의 경우 데이터 세트의 고유한 설계로 가능해진 표준(전역) Recall의 확장인 Recallsubset을 추가로 보고합니다.
As discussed, our input queries q = ⟨IR, t⟩ and target images IT in our dataset are constructed such that both IR and IT are sampled from the same image set S (Sec. 4.1). We formulate Recallsubset task by ranking images in S \{IR} according to model score. We define Recallsubset@K as the proportion of (test) examples where the ground-truth target image IT is ranked within the top-K image in its subset.
논의한 바와 같이 입력 쿼리 q = ⟨IR, t⟩ 및 데이터 세트의 대상 이미지 IT는 IR과 IT가 모두 동일한 이미지 세트 S에서 샘플링되도록 구성됩니다(4.1절). 모델 점수에 따라 S \{IR}의 이미지 순위를 지정하여 Recallsubset 작업을 공식화합니다. 우리는 Recallsubset@K를 실제 대상 이미지 IT가 하위 집합의 상위 K 이미지 내에서 순위가 매겨진 (테스트) 예제의 비율로 정의합니다.
Conceptually, Recallsubset can be viewed as Recall while only considering images within the same subset as the pair. The benefits are twofold: First, Recallsubset is not affected by false-negative samples, thanks to our careful design in data collection procedures. Second, with a selected batch of negative samples with high visual similarities, Recallsubset can facilitate analysis on the reasoning ability of the methods for capturing fine-grained image-text modifications.
개념적으로 Recallsubset은 한 쌍과 동일한 하위 집합 내의 이미지만 고려하면서 Recall로 볼 수 있습니다. 이점은 두 가지입니다. 첫째, Recallsubset은 데이터 수집 절차의 신중한 설계 덕분에 위음성 샘플의 영향을 받지 않습니다. 둘째, 시각적 유사도가 높은 음성 샘플의 선택된 배치를 사용하여 Recallsubset은 세분화된 이미지 텍스트 수정을 캡처하는 방법의 추론 능력에 대한 분석을 용이하게 할 수 있습니다.
Implementation details. All experiments are conducted on a single NVIDIA RTX3090 with PyTorch. SoTA models use the default configurations proposed by their authors. See supp. mat. and our project website for more details on baseline training. For our proposed model, we use ResNet152 for image feature extraction. The model is optimized with AdamW [27] with an initial learning rate of 10−5 . We set a linearly decreasing schedule without warmup. The batch size is set to 32 and the network is trained for 300 epochs. Other settings are kept as default by OSCAR.
구현 세부 정보. 모든 실험은 PyTorch가 있는 단일 NVIDIA RTX3090에서 수행됩니다. SoTA 모델은 작성자가 제안한 기본 구성을 사용합니다. 공급을 참조하십시오. 매트. 기본 교육에 대한 자세한 내용은 프로젝트 웹사이트를 참조하십시오. 제안된 모델의 경우 이미지 특징 추출을 위해 ResNet152를 사용합니다. 모델은 초기 학습률이 10−5인 AdamW[27]로 최적화되었습니다. 워밍업 없이 선형적으로 감소하는 일정을 설정했습니다. 배치 크기는 32로 설정되고 네트워크는 300 Epoch 동안 훈련됩니다. 다른 설정은 OSCAR에 의해 기본값으로 유지됩니다.
5.1. Results
Baseline comparison on CIRR. Table 3 (rows 1-13) compares the retrieval performance of baseline and SoTA methods for both Recall and Recall(Subset@K) on CIRR.
CIRR에 대한 기준 비교. 표 3(1-13행)은 CIRR에 대한 Recall 및 Recall(Subset@K) 모두에 대한 기준 및 SoTA 방법의 검색 성능을 비교합니다.
For global Recall, we notice that TIRG performs similar to the Image-only baseline, suggesting that its multi-modal composition layers often fail to extract information from the text. Instead, it relies primarily on visual content. We conjecture that CIRR focuses more on the fine-grained changes that are harder to capture and associate across modalities, therefore, requires stronger image-text composition layers. In addition, we note that MAAF (rows 10-13) does not generalize well to our dataset, even though it outperforms TIRG and other methods on existing ones [8]. We believe the choice of forming image tokens by spatial feature maps does not generalize to our dataset where the modification concepts are more diverse and at multiple levels. Meanwhile, adding the contextual-aware BERT pretrained weights yields little effects, suggesting a plain initialization of word embeddings, though contains validated pre-trained language information, may not help the composition layers.
글로벌 리콜의 경우 TIRG가 Image-only 기준선과 유사한 성능을 보여 다중 모드 구성 레이어가 텍스트에서 정보를 추출하지 못하는 경우가 많다는 것을 알 수 있습니다. 대신 주로 시각적 콘텐츠에 의존합니다. 우리는 CIRR이 여러 양식에 걸쳐 포착하고 연결하기 어려운 미세한 변화에 더 초점을 맞추므로 더 강력한 이미지-텍스트 합성 레이어가 필요하다고 추측합니다. 또한 MAAF(10-13행)는 기존 데이터셋에 대한 TIRG 및 기타 방법보다 성능이 뛰어나더라도 데이터 세트에 잘 일반화되지 않습니다[8]. 우리는 공간 특징 맵으로 이미지 토큰을 형성하는 선택이 수정 개념이 더 다양하고 여러 수준에 있는 데이터 세트로 일반화되지 않는다고 믿습니다. 한편, 상황 인식 BERT 사전 훈련된 가중치를 추가하면 효과가 거의 없으며, 검증된 사전 훈련된 언어 정보가 포함되어 있지만 단어 임베딩의 일반 초기화가 합성 계층에 도움이 되지 않을 수 있음을 시사합니다.
The Recall(Subset) results tell a similar story. Here the performance of all SoTA models is close to the theoretical random guess, indicating that current models fail to capture fine-grained modifications between similar images. Interestingly, we discover that the Text-only and RandomImage+Text baselines (rows 4,5) outperform SoTA models significantly. We believe this is because the modification sentences usually contain descriptions of visual content that is unique to the target image once limited to the smaller retrieval set (e.g., “add a leash to the dog” where only the target image contains the leash). However, as demonstrated by the low Recall performance, such descriptions are not detailed enough to single out the target image in the entire image corpus. This scenario further demonstrates RecallSubset reveals behaviors of models on different aspects, and can be used for more detailed analysis.
Recall(Subset) 결과도 비슷한 이야기를 합니다. 여기에서 모든 SoTA 모델의 성능은 이론적 무작위 추측에 가깝습니다. 이는 현재 모델이 유사한 이미지 간의 미세한 수정을 캡처하지 못한다는 것을 나타냅니다. 흥미롭게도 Text-only 및 RandomImage+Text 기준선(4,5행)이 SoTA 모델보다 성능이 훨씬 뛰어남을 발견했습니다. 우리는 수정 문장이 한 번 더 작은 검색 세트로 제한되었던 대상 이미지에 고유한 시각적 콘텐츠에 대한 설명을 일반적으로 포함하기 때문이라고 믿습니다(예: 대상 이미지에만 목줄이 포함된 경우 "개에게 목줄 추가"). 그러나 낮은 Recall 성능에서 알 수 있듯이 이러한 설명은 전체 이미지 말뭉치에서 대상 이미지를 단일화할 만큼 충분히 상세하지 않습니다. 이 시나리오는 RecallSubset이 다양한 측면에서 모델의 동작을 보여주고 더 자세한 분석에 사용할 수 있음을 보여줍니다.
In short, the relatively low retrieval performance suggests that our dataset poses a challenge to existing methods developed and tested on narrow-domain datasets.
요컨대, 상대적으로 낮은 검색 성능은 우리 데이터 세트가 좁은 도메인 데이터 세트에서 개발되고 테스트된 기존 방법에 도전 과제를 제기함을 시사합니다.
Performance of CIRPLANT on CIRR. Results in Table 3 (rows 14,15) compares our proposed model with SoTA methods on CIRR. We notice that on CIRR, CIRPLANT with no initialization (row 14) performs similarly as TIRG on Recall, while surpassing all other SoTA methods. This validates our design choice of using non-regional image features for composing image and text through the transformer architecture. Meanwhile, on RecallSubset our model, even without initialization, yields much higher scores than others, suggesting transformers are better in capturing more fine-grained visiolinguistic cues when composing image and text features. Comparing with SoTA methods that use LSTMs for generating a single language embedding of the entire sentence, we believe that the key difference lies within the fact that transformers accept word tokens as input, which can later be attended individually. Our model outperforms all other methods with OSCAR initialization (row 15) by a significant margin, demonstrating the benefit of VLP knowledge on open-domain images.
CIRR에서 CIRPLANT의 성능. 표 3(14,15행)의 결과는 제안된 모델을 CIRR에 대한 SoTA 방법과 비교합니다. CIRR에서 초기화가 없는 CIRPLANT(14행)는 다른 모든 SoTA 방법을 능가하는 동안 Recall에서 TIRG와 유사하게 수행됩니다. 이것은 변환기 아키텍처를 통해 이미지와 텍스트를 구성하기 위해 비영역 이미지 기능을 사용하는 디자인 선택을 검증합니다. 한편, RecallSubset에서 우리 모델은 초기화 없이도 다른 모델보다 훨씬 더 높은 점수를 산출하며, 이는 변환기가 이미지 및 텍스트 기능을 구성할 때 보다 세분화된 시각 언어 신호를 캡처하는 데 더 우수함을 시사합니다. 전체 문장의 단일 언어 임베딩을 생성하기 위해 LSTM을 사용하는 SoTA 방법과 비교할 때 중요한 차이점은 변환기가 나중에 개별적으로 참석할 수 있는 단어 토큰을 입력으로 수락한다는 사실에 있다고 믿습니다. 우리 모델은 OSCAR 초기화(15행)를 사용하여 다른 모든 방법을 훨씬 능가하여 개방형 도메인 이미지에 대한 VLP 지식의 이점을 보여줍니다.
Performance of CIRPLANT on Fashion-IQ. Table 4 compares the performance of our model with SoTA methods. We notice that our model with OSCAR initialization (row 14) outperforms most methods, including generic multimodal learning methods and TIRG. This strengthens the benefits of using transformer architecture that leverages VLP models. Additionally, we note that even on Fashion-IQ, our model still benefits greatly from OSCAR pre-trained initialization (rows 13,14). Given that the images in Fashion-IQ differ greatly from the data used for OSCAR pre-training [25], we believe this further demonstrates that the pre-trained model can transfer the learned V&L knowledge and adapt to various contexts.
Fashion-IQ에서 CIRPLANT의 성능. 표 4는 우리 모델의 성능을 SoTA 방법과 비교합니다. OSCAR 초기화(14행)가 있는 모델이 일반 다중 모드 학습 방법 및 TIRG를 포함한 대부분의 방법보다 성능이 우수하다는 것을 알았습니다. 이는 VLP 모델을 활용하는 변압기 아키텍처 사용의 이점을 강화합니다. 또한 Fashion-IQ에서도 우리 모델은 OSCAR 사전 훈련된 초기화(13,14행)의 이점을 여전히 많이 활용하고 있습니다. Fashion-IQ의 이미지가 OSCAR 사전 훈련[25]에 사용된 데이터와 크게 다르다는 점을 감안할 때 사전 훈련된 모델이 학습된 V&L 지식을 전달하고 다양한 컨텍스트에 적응할 수 있음을 추가로 보여줍니다.
We note that two recent SoTA methods for composed image retrieval (VAL and MAAF, rows 9,10) perform better than our model. Despite the visible improvements brought by OSCAR initialization, we hypothesize that our model is still underperformed by the apparent domain shift in images, as the VLP model is pre-trained on generic ImageNettype data. Meanwhile, the low generalizability of MAAF on CIRR (Table 3 rows 10-13) hints the possibility that current SoTA methods developed and tested on existing datasets may have been overly adapted to domain-specific images of low complexity. Hence, additional open-domain datasets, such as CIRR, can be beneficial in future research.
합성 이미지 검색을 위한 두 가지 최근 SoTA 방법(VAL 및 MAAF, 행 9,10)이 우리 모델보다 더 나은 성능을 보입니다. OSCAR 초기화로 인한 가시적인 개선에도 불구하고 VLP 모델이 일반 ImageNettype 데이터에 대해 사전 훈련되었기 때문에 이미지의 명백한 도메인 이동으로 인해 우리 모델이 여전히 성능이 저하되었다고 가정합니다. 한편, CIRR에 대한 MAAF의 낮은 일반화 가능성(표 3 행 10-13)은 기존 데이터 세트에서 개발 및 테스트된 현재 SoTA 방법이 복잡성이 낮은 도메인별 이미지에 지나치게 적응되었을 가능성을 암시합니다. 따라서 CIRR과 같은 추가 개방형 도메인 데이터 세트는 향후 연구에 도움이 될 수 있습니다.
5.2. Qualitative Results
Fig. 4 (left) demonstrates the retrieval rankings within the image subset (see Sec. 5) on the same query for TIRG and CIRPLANT. Specifically, we show the effectiveness of pre-training in CIRPLANT when encountering visiolinguistic concepts (i.e., pavement) that occur less frequently in the training data. Additionally, CIRPLANT better captures fine-grained cues within language (e.g., takes people around, which implies must have people in the back of the carriage), thanks to the transformer architecture that accepts, and attends to individual word tokens.
5.2. 정성적 결과
그림 4(왼쪽)는 TIRG 및 CIRPLANT에 대한 동일한 쿼리에 대한 이미지 하위 집합(섹션 5 참조) 내의 검색 순위를 보여줍니다. 특히, 훈련 데이터에서 덜 자주 발생하는 시각 언어 개념(즉, 포장 도로)을 만날 때 CIRPLANT에서 사전 훈련의 효과를 보여줍니다. 또한 CIRPLANT는 개별 단어 토큰을 수용하고 처리하는 트랜스포머 아키텍처 덕분에 언어 내에서 세분화된 신호를 더 잘 포착합니다(예: 사람을 데려가는 것은 마차 뒤에 사람이 있어야 함을 의미함).
We show one failure case of CIRPLANT on CIRR in Fig. 4 (right). Note the implicit requirement of preserving same breed of dog across the reference and target image. This requires models to identify the fine-grained visiolinguistic cues (i.e., pointy ears in this sample) and retrieve the most suitable image, bringing more challenge to the task.
그림 4(오른쪽)에서 CIRR에 대한 CIRPLANT의 한 가지 실패 사례를 보여줍니다. 참조 이미지와 대상 이미지에서 동일한 품종의 개를 보존해야 한다는 암시적인 요구 사항에 유의하십시오. 이를 위해서는 모델이 세분화된 시각 언어 신호(예: 이 샘플의 뾰족한 귀)를 식별하고 가장 적합한 이미지를 검색하여 작업에 더 많은 도전 과제를 제공해야 합니다.
6. Conclusion
This work expands the task of composed image retrieval into more complex, open-domain images. We collect the CIRR dataset, which addresses shortcomings of existing datasets by placing more emphasis on distinguishing opendomain visually similar images. Our publicly available dataset is designed to facilitate future studies on subtle reasoning over visiolinguistic concepts, as well as iterative retrieval with dialogue. We also introduce CIRPLANT, a transformer-based model that leverages V&L pre-training to compose image and text features. We validate CIRPLANT on both CIRR and the existing fashion dataset, demonstrating the generalizability of our design and the effectiveness of V&L pre-training. Collectively, we hope to inspire future work on composed image retrieval on a broader scope, yet fine-grained level.
이 작업은 합성 이미지 검색 작업을 보다 복잡한 개방형 도메인 이미지로 확장합니다. 오픈도메인의 시각적으로 유사한 이미지를 구분하는데 더욱 중점을 두어 기존 데이터셋의 단점을 보완한 CIRR 데이터셋을 수집합니다. 공개적으로 사용 가능한 데이터 세트는 대화를 통한 반복 검색뿐만 아니라 시각 언어 개념에 대한 미묘한 추론에 대한 향후 연구를 용이하게 하도록 설계되었습니다. 또한 V&L 사전 교육을 활용하여 이미지 및 텍스트 기능을 구성하는 변압기 기반 모델인 CIRPLANT를 소개합니다. 우리는 CIRR과 기존 패션 데이터 세트 모두에서 CIRPLANT를 검증하여 디자인의 일반화 가능성과 V&L 사전 교육의 효율성을 보여줍니다. 종합적으로, 우리는 더 넓은 범위에서 아직 세분화된 수준에서 구성된 이미지 검색에 대한 향후 작업에 영감을 주기를 바랍니다.
References
[1] P. Anderson, X. He, C. Buehler, D. Teney, M. Johnson, S. Gould, and L. Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2
[2] J. Aneja, A. Deshpande, and A. G. Schwing. Convolutional image captioning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2
[3] S. Antol, A. Agrawal, J. Lu, M. Mitchell, D. Batra, C. Lawrence Zitnick, and D. Parikh. VQA: Visual Question Answering. In IEEE International Conference on Computer Vision, 2015. 2
[4] T. L. Berg, A. C. Berg, and J. Shih. Automatic attribute discovery and characterization from noisy web data. In European Conference on Computer Vision, 2010. 1, 3
[5] Y. Chen, S. Gong, and L. Bazzani. Image search with text feedback by visiolinguistic attention learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 2, 6, 7
[6] Y.-C. Chen, L. Li, L. Yu, A. E. Kholy, F. Ahmed, Z. Gan, Y. Cheng, and J. Liu. Uniter: Universal image-text representation learning. In European Conference on Computer Vision, 2020. 2
[7] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Conference of the North American Chapter of the Association for Computational Linguistics, 2019. 2, 3, 5
[8] E. Dodds, J. Culpepper, S. Herdade, Y. Zhang, and K. Boakye. Modality-agnostic attention fusion for visual search with text feedback. ArXiv, abs/2007.00145, 2020. 2, 3, 5, 7
[9] M. Forbes, C. Kaeser-Chen, P. Sharma, and S. J. Belongie. Neural Naturalist: Generating fine-grained image comparisons. In Conference on Empirical Methods in Natural Language Processing, 2019. 3
[10] R. B. Girshick. Fast R-CNN. In IEEE International Conference on Computer Vision, 2015. 2
[11] X. Guo, H. Wu, Y. Cheng, S. Rennie, G. Tesauro, and R. Feris. Dialog-based interactive image retrieval. In Advances in Neural Information Processing Systems, 2018. 3
[12] X. Guo, H. Wu, Y. Gao, S. J. Rennie, and R. Feris. The Fashion IQ Dataset: Retrieving images by combining side information and relative natural language feedback. ArXiv, abs/1905.12794, 2019. 1, 2, 3, 4, 5, 6, 7
[13] X. Han, Z. Wu, P. X. Huang, X. Zhang, M. Zhu, Y. Li, Y. Zhao, and L. S. Davis. Automatic spatially-aware fashion concept discovery. In IEEE International Conference on Computer Vision, 2017. 1, 2, 3, 5
[14] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3, 5
[15] S. Hochreiter and J. Schmidhuber. Long Short-Term Memory. Neural Computation, 9:1735–1780, 1997. 5
[16] Y. Hong, Q. Wu, Y. Qi, C. Rodriguez-Opazo, and S. Gould. A recurrent vision-and-language bert for navigation. IEEE Conference on Computer Vision and Pattern Recognition, 2020. 3
[17] M. Hosseinzadeh and Y. Wang. Composed query image retrieval using locally bounded features. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 2
[18] P. Isola, J. J. Lim, and E. H. Adelson. Discovering states and transformations in image collections. In IEEE Conference on Computer Vision and Pattern Recognition, 2015. 2, 3, 5
[19] H. Jhamtani and T. Berg-Kirkpatrick. Learning to describe differences between pairs of similar images. In Conference on Empirical Methods in Natural Language Processing, 2018. 3
[20] J. Johnson, B. Hariharan, L. van der Maaten, L. Fei-Fei, C. L. Zitnick, and R. Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3
[21] J.-H. Kim, S.-W. Lee, D. Kwak, M.-O. Heo, J. Kim, J.-W. Ha, and B.-T. Zhang. Multimodal residual learning for visual qa. In Advances in neural information processing systems, 2016. 6, 7
[22] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In Association for Computing Machinery, 2017. 4, 5, 6
[23] L. H. Li, M. Yatskar, D. Yin, C.-J. Hsieh, and K.-W. Chang. Visualbert: A simple and performant baseline for vision and language, 2019. 2, 3
[24] W. Li, L. Duan, D. Xu, and I. W. Tsang. Text-based image retrieval using progressive multi-instance learning. In IEEE International Conference on Computer Vision, 2011. 1, 2
[25] X. Li, X. Yin, C. Li, X. Hu, P. Zhang, L. Zhang, L. Wang, H. Hu, L. Dong, F. Wei, Y. Choi, and J. Gao. Oscar: Objectsemantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, 2020. 2, 3, 8
[26] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang. DeepFashion: Powering robust clothes recognition and retrieval with rich annotations. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. 2
[27] I. Loshchilov and F. Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. 6
[28] J. Lu, D. Batra, D. Parikh, and S. Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-andlanguage tasks. In Advances in Neural Information Processing Systems, 2019. 2
[29] I. Masi, Y. Wu, T. Hassner, and P. Natarajan. Deep face recognition: A survey. In SIBGRAPI Conference on Graphics, Patterns and Images, 2018. 2
[30] E. Perez, F. Strub, H. de Vries, V. Dumoulin, and A. Courville. Film: Visual reasoning with a general conditioning layer, 2017. 6, 7
[31] F. Radenovic, G. Tolias, and O. Chum. Deep shape matching. ´ In European Conference on Computer Vision, 2018. 2
[32] S. Ren, K. He, R. B. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39:1137–1149, 2015. 2 2133
[33] A. Santoro, D. Raposo, D. G. Barrett, M. Malinowski, R. Pascanu, P. Battaglia, and T. Lillicrap. A simple neural network module for relational reasoning. In Advances in neural information processing systems, pages 4967–4976, 2017. 6, 7
[34] F. Schroff, D. Kalenichenko, and J. Philbin. FaceNet: A unified embedding for face recognition and clustering. In IEEE Conference on Computer Vision and Pattern Recognition, 2015. 2
[35] A. Suhr, S. Zhou, A. Zhang, I. Zhang, H. Bai, and Y. Artzi. A corpus for reasoning about natural language grounded in photographs. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2019. 2, 4, 5
[36] H. Tan and M. Bansal. Lxmert: Learning cross-modality encoder representations from transformers. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, 2019. 2
[37] D. Teney, P. Anderson, X. He, and A. V. D. Hengel. Tips and tricks for visual question answering: Learnings from the 2017 challenge. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2
[38] S. Tong and E. Chang. Support Vector Machine active learning for image retrieval. In Proceedings of the Ninth ACM International Conference on Multimedia, 2001. 1
[39] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, u. Kaiser, and I. Polosukhin. Attention is all you need. In International Conference on Neural Information Processing Systems, 2017. 2, 3, 5
[40] N. Vo, L. Jiang, C. Sun, K. Murphy, L.-J. Li, L. Fei-Fei, and J. Hays. Composing text and image for image retrieval - an empirical odyssey. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 4, 5, 6, 7
[41] H. Xu, K. He, B. A. Plummer, L. Sigal, S. Sclaroff, and K. Saenko. Multilevel language and vision integration for text-to-clip retrieval. In AAAI Conference on Artificial Intelligence, 2019. 2
[42] C. Zhang, J. Y. Chai, and R. Jin. User term feedback in interactive text-based image retrieval. Proceedings of the 28th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 2005. 1, 2