Bingsu / vitB32_bert_ko_small_clip

huggingface.co
Total runs: 54
24-hour runs: -8
7-day runs: -16
30-day runs: -75
Model's Last Updated: September 17 2023
feature-extraction

Introduction of vitB32_bert_ko_small_clip

Model Details of vitB32_bert_ko_small_clip

vitB32_bert_ko_small_clip

openai/clip-vit-base-patch32 + lassl/bert-ko-small CLIP Model

training code(github)

Train

SBERT의 Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation 를 참고하여, openai/clip-vit-base-patch32 텍스트 모델의 가중치를 lassl/bert-ko-small 로 복제하였습니다. 논문과는 달리 mean pooling을 사용하지 않고, huggingface모델의 기본 pooling을 그대로 사용하였습니다.

사용한 데이터: Aihub 한국어-영어 번역(병렬) 말뭉치

How to Use
1.
import requests
from PIL import Image
from transformers import VisionTextDualEncoderProcessor, VisionTextDualEncoderModel  # or Auto...

model = VisionTextDualEncoderModel.from_pretrained("Bingsu/vitB32_bert_ko_small_clip")
processor = VisionTextDualEncoderProcessor.from_pretrained("Bingsu/vitB32_bert_ko_small_clip")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(text=["고양이 두 마리", "개 두 마리"], images=image, return_tensors="pt", padding=True)

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image
probs = logits_per_image.softmax(dim=1)
>>> probs
tensor([[0.9756, 0.0244]], grad_fn=<SoftmaxBackward0>)
2.
from transformers import AutoModel, AutoProcessor, pipeline

model = AutoModel.from_pretrained("Bingsu/vitB32_bert_ko_small_clip")
processor = AutoProcessor.from_pretrained("Bingsu/vitB32_bert_ko_small_clip")
pipe = pipeline("zero-shot-image-classification", model=model, feature_extractor=processor.feature_extractor, tokenizer=processor.tokenizer)

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
result = pipe(images=url, candidate_labels=["고양이 한 마리", "고양이 두 마리", "고양이 두 마리와 리모컨 두 개"], hypothesis_template="{}")
>>> result
[{'score': 0.871887743473053, 'label': '고양이 두 마리와 리모컨 두 개'},
 {'score': 0.12316706776618958, 'label': '고양이 두 마리'},
 {'score': 0.004945191089063883, 'label': '고양이 한 마리'}]

Runs of Bingsu vitB32_bert_ko_small_clip on huggingface.co

54
Total runs
-8
24-hour runs
-11
3-day runs
-16
7-day runs
-75
30-day runs

More Information About vitB32_bert_ko_small_clip huggingface.co Model

More vitB32_bert_ko_small_clip license Visit here:

https://choosealicense.com/licenses/mit

vitB32_bert_ko_small_clip huggingface.co

vitB32_bert_ko_small_clip huggingface.co is an AI model on huggingface.co that provides vitB32_bert_ko_small_clip's model effect (), which can be used instantly with this Bingsu vitB32_bert_ko_small_clip model. huggingface.co supports a free trial of the vitB32_bert_ko_small_clip model, and also provides paid use of the vitB32_bert_ko_small_clip. Support call vitB32_bert_ko_small_clip model through api, including Node.js, Python, http.

vitB32_bert_ko_small_clip huggingface.co Url

https://huggingface.co/Bingsu/vitB32_bert_ko_small_clip

Bingsu vitB32_bert_ko_small_clip online free

vitB32_bert_ko_small_clip huggingface.co is an online trial and call api platform, which integrates vitB32_bert_ko_small_clip's modeling effects, including api services, and provides a free online trial of vitB32_bert_ko_small_clip, you can try vitB32_bert_ko_small_clip online for free by clicking the link below.

Bingsu vitB32_bert_ko_small_clip online free url in huggingface.co:

https://huggingface.co/Bingsu/vitB32_bert_ko_small_clip

vitB32_bert_ko_small_clip install

vitB32_bert_ko_small_clip is an open source model from GitHub that offers a free installation service, and any user can find vitB32_bert_ko_small_clip on GitHub to install. At the same time, huggingface.co provides the effect of vitB32_bert_ko_small_clip install, users can directly use vitB32_bert_ko_small_clip installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

vitB32_bert_ko_small_clip install url in huggingface.co:

https://huggingface.co/Bingsu/vitB32_bert_ko_small_clip

Url of vitB32_bert_ko_small_clip

vitB32_bert_ko_small_clip huggingface.co Url

Provider of vitB32_bert_ko_small_clip huggingface.co

Bingsu
ORGANIZATIONS

Other API from Bingsu

huggingface.co

Total runs: 9.8M
Run Growth: 362.5K
Growth Rate: 3.68%
Updated:November 21 2024
huggingface.co

Total runs: 208
Run Growth: 167
Growth Rate: 80.29%
Updated:August 04 2023
huggingface.co

Total runs: 31
Run Growth: 11
Growth Rate: 35.48%
Updated:November 28 2022
huggingface.co

Total runs: 10
Run Growth: -2
Growth Rate: -20.00%
Updated:April 24 2023
huggingface.co

Total runs: 6
Run Growth: -1
Growth Rate: -16.67%
Updated:January 02 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 16 2023