For the complete documentation index, see llms.txt. This page is also available as Markdown.

핵심 모델

동기 및 비동기 메서드를 사용해 inference-sdk HTTP 클라이언트를 통해 CLIP 및 DocTR 파운데이션 모델을 호출하세요.

InferenceHTTPClient Inference에서 호스팅되는 핵심 모델을 지원합니다. 이러한 모델 중 일부는 Roboflow 호스팅 추론 플랫폼에서 사용할 수 있습니다(사용 https://serverless.roboflow.com 을 URL로); 다른 모델들은 로컬로 배포할 수 있습니다(일반적으로 로컬 서버는 http://localhost:9001).

CLIP

from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="http://localhost:9001",  # 또는 호스팅 서비스를 사용하려면 "https://serverless.roboflow.com"
    api_key="ROBOFLOW_API_KEY"
)

CLIENT.get_clip_image_embeddings(inference_input="./my_image.jpg")  # 단일 이미지 요청
CLIENT.get_clip_image_embeddings(inference_input=["./my_image.jpg", "./other_image.jpg"])  # 배치 이미지 요청
CLIENT.get_clip_text_embeddings(text="some")  # 단일 텍스트 요청
CLIENT.get_clip_text_embeddings(text=["some", "other"])  # 기타 텍스트 요청
CLIENT.clip_compare(
    subject="./my_image.jpg",
    prompt=["fox", "dog"],
)

해당 CLIENT.clip_compare(...) 메서드를 사용하면 다양한 조합을 비교할 수 있습니다 subject_typeprompt_type:

  • (이미지, 이미지) (기본값)

  • (이미지, 텍스트)

  • (텍스트, 이미지)

  • (텍스트, 텍스트)

비동기 메서드도 사용할 수 있습니다:

다음 내용을 참조하세요. CLIP 모델 참조 모델 자체에 대한 자세한 내용은.

DocTR

비동기 대응: CLIENT.ocr_image_async(...). 다음을 참조하세요 DocTR 모델 참조 를 참조하세요.

Gaze(지원 중단)

마지막 업데이트

도움이 되었나요?