We lifted 15 functions out of this paper's own repositories and ran 10 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| lcfractal/tgdt | pwc_unofficial | 10 of 15 |
| Function | Status | Where it lives |
|---|---|---|
| EncoderText | Ran | lcfractal/tgdt/models/text.py code served (permissive licence) · get_code("e1d7360c5be25e25") |
| cosine_sim | Ran | lcfractal/tgdt/utils.py code served (permissive licence) · get_code("f2e17288ada8cf89") |
| dot_sim | Ran | lcfractal/tgdt/models/loss.py code served (permissive licence) · get_code("6a49bab714ec6122") |
| dot_sim | Ran | lcfractal/tgdt/utils.py code served (permissive licence) · get_code("36545e75ca862270") |
| find_nhead | Ran | lcfractal/tgdt/models/visual.py code served (permissive licence) · get_code("6e963f0bd8b4ec0f") |
| generate_square_subsequent_mask | Ran | lcfractal/tgdt/models/utils.py code served (permissive licence) · get_code("894b253f35765276") |
| get_paths | Ran | lcfractal/tgdt/data.py code served (permissive licence) · get_code("66f891f51e3bec44") |
| get_transform | Ran | lcfractal/tgdt/data.py code served (permissive licence) · get_code("e7518699cbc1bd68") |
| l2norm | Ran | lcfractal/tgdt/models/utils.py code served (permissive licence) · get_code("f92e514b398e75d8") |
| my_collate | Ran | lcfractal/tgdt/evaluate_utils/compute_relevance.py code served (permissive licence) · get_code("d9047caaedf4aadb") |
| accuracy | Not yet run | lcfractal/tgdt/train_ft.py code served (permissive licence) · get_code("f0c9a29156911331") |
| cosine_sim | Not yet run | lcfractal/tgdt/models/loss.py code served (permissive licence) · get_code("7f3908ad08980104") |
| encode_data | Not yet run | lcfractal/tgdt/evaluation.py code served (permissive licence) · get_code("5a365ec8a05fffb9") |
| get_model | Not yet run | lcfractal/tgdt/utils.py code served (permissive licence) · get_code("a1ea9bbed7fcc094") |
| order_sim | Not yet run | lcfractal/tgdt/models/loss.py code served (permissive licence) · get_code("da16023b8239c604") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Image-text retrieval is a central problem for understanding the semantic relationship between vision and language, and serves as the basis for various visual and language tasks. Most previous works either simply learn coarse-grained representations of the overall image and text, or elaborately establish the correspondence between image regions or pixels and text words. However, the close relations between coarse- and fine-grained representations for each modality are important for image-text retrieval but almost neglected. As a result, such previous works inevitably suffer from low retrieval accuracy or heavy computational cost. In this work, we address image-text retrieval from a novel perspective by combining coarse- and fine-grained representation learning into a unified framework. This framework is consistent with human cognition, as humans simultaneously pay attention to the entire sample and regional elements to understand the semantic content. To this end, a Token-Guided Dual Transformer (TGDT) architecture which consists of two homogeneous branches for image and text modalities, respectively, is proposed for image-text retrieval. The TGDT incorporates both coarse- and fine-grained retrievals into a unified framework and beneficially leverages the advantages of both retrieval approaches. A novel training objective called Consistent Multimodal Contrastive (CMC) loss is proposed accordingly to ensure the intra- and inter-modal semantic consistencies between images and texts in the common embedding space. Equipped with a two-stage inference method based on the mixed global and local cross-modal similarity, the proposed method achieves state-of-the-art retrieval performances with extremely low inference time when compared with representative recent approaches.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2306.08789")
get_code_for_paper("2306.08789")
have("2306.08789")
Connect an agent — have() is free.