Replies: 3 comments
-
I'm testing this feature. CLIP multimodal model enables zero-shot image classification. I've tested it on multiple datasets and the model is more than 99% correct provided the cue words are provided. We just need to write If a prompt is encountered that has never been processed before, the program automatically performs the conversion and adjustment of the dichotomous task. See the example code for details. hcaptcha-challenger/src/objects.yaml Lines 553 to 574 in d38be1b |
Beta Was this translation helpful? Give feedback.
-
Example"""
1. **positive_labels** can contain only the slashed prompt, i.e., the meaning specified by the prompt
2. **negative_labels** usually have multiple categories,
please observe the other labels in the 9 images and fill in the label_name
3. **positive_labels** can fill in more than one, when there is ambiguity in the prompt.
For example, if the prompt asks to select a `vehicle`, but `car` and `airplane` appear in the task.
You can fill in this: `positive_labels = ["vehicle", "car", "airplane"]`
4. Sometimes the prompt doesn't change, but its corresponding image group is replaced.
If you observe this, update your `datalake_post` to do so!
5. If a prompt never appears, i.e. you don't update it to datalake, the program automatically disassembles the prompt
and adds simple antonyms to the mapping network to ensure that the binary classification task proceeds properly.
This process works sometimes, but the correctness rate is obviously no better than the way you fill it out manually
"""
from hcaptcha_challenger import split_prompt_message, label_cleaning, DataLake
def handle(x): return split_prompt_message(label_cleaning(x), "en")
datalake_post = {
# --> off-road vehicle
handle("Please click each image containing an off-road vehicle"): {
"positive_labels": ["off-road vehicle"],
"negative_labels": ["car", "bicycle"],
},
# --> pair of headphones
handle("Please click each image containing a pair of headphones"): {
"positive_labels": ["headphones"],
"negative_labels": ["car", "elephant", "cat"]
},
# --> item of office equipment
handle("Please click each image containing an item of office equipment"): {
"positive_labels": ["office equipment", "chair"],
"negative_labels": ["shoes", "guitar", "drum", "musical instruments"]
}
}
def common():
from hcaptcha_challenger import ModelHub
# ... Some of the operations you are familiar
modelhub = ModelHub.from_github_repo()
modelhub.parse_objects()
print(f"Before {modelhub.datalake.keys()=}")
# Merge the data. And use this modelhub object later
for prompt, serialized_binary in datalake_post.items():
modelhub.datalake[prompt] = DataLake.from_serialized(serialized_binary)
print(f"After {modelhub.datalake.keys()=}")
# ... Some of the operations you are familiar
if __name__ == '__main__':
common() |
Beta Was this translation helpful? Give feedback.
-
How i can download the challenge images? @QIN2DIM |
Beta Was this translation helpful? Give feedback.
-
@PieceOfGood @ndtrongvn Maybe you'll be interested in this implementation
Beta Was this translation helpful? Give feedback.
All reactions