SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.18231 · 2023

TCP:Textual-based Class-aware Prompt tuning for Visual-Language Model

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 4 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.

RepositoryRoleRan
htyao89/textual-based_class-aware_prompt_tuning canonical 4 of 6
FunctionStatusWhere it lives
basic_clean Ran htyao89/textual-based_class-aware_prompt_tuning/clip/simple_tokenizer.py
code served (permissive licence) · get_code("98f385d847636a3e")
compute_ci95 Ran htyao89/textual-based_class-aware_prompt_tuning/parse_test_res.py
code served (permissive licence) · get_code("ba26afd892405335")
get_pairs Ran htyao89/textual-based_class-aware_prompt_tuning/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
whitespace_clean Ran htyao89/textual-based_class-aware_prompt_tuning/clip/simple_tokenizer.py
code served (permissive licence) · get_code("9542161e9640b858")
build_model Not yet run htyao89/textual-based_class-aware_prompt_tuning/clip/model.py
code served (permissive licence) · get_code("39e6b23b55f376ea")
load Not yet run htyao89/textual-based_class-aware_prompt_tuning/clip/clip.py
code served (permissive licence) · get_code("d2d5e3faa2e935cb")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Prompt tuning represents a valuable technique for adapting pre-trained visual-language models (VLM) to various downstream tasks. Recent advancements in CoOp-based methods propose a set of learnable domain-shared or image-conditional textual tokens to facilitate the generation of task-specific textual classifiers. However, those textual tokens have a limited generalization ability regarding unseen domains, as they cannot dynamically adjust to the distribution of testing classes. To tackle this issue, we present a novel Textual-based Class-aware Prompt tuning(TCP) that explicitly incorporates prior knowledge about classes to enhance their discriminability. The critical concept of TCP involves leveraging Textual Knowledge Embedding (TKE) to map the high generalizability of class-level textual knowledge into class-aware textual tokens. By seamlessly integrating these class-aware prompts into the Text Encoder, a dynamic class-aware classifier is generated to enhance discriminability for unseen domains. During inference, TKE dynamically generates class-aware prompts related to the unseen classes. Comprehensive evaluations demonstrate that TKE serves as a plug-and-play module effortlessly combinable with existing methods. Furthermore, TCP consistently achieves superior performance while demanding less training time. Code:https://github.com/htyao89/Textual-based_Class-aware_prompt_tuning/

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2311.18231")
get_code_for_paper("2311.18231")
have("2311.18231")

Connect an agent — have() is free.