Qwen3.5
Alibaba の Qwen3.5-VL 画像言語モデルを、Workflows、Dedicated Deployments、またはセルフホスト Inference で使用します
最終更新
役に立ちましたか?
役に立ちましたか?
export ROBOFLOW_API_KEY="your-key-here"pip install -U inference-sdk supervisionimport os
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/quickstart/dog.jpeg")
client = InferenceHTTPClient(
api_url="https://your-deployment.roboflow.cloud",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer_lmm(
image,
model_id="qwen3_5-2b",
prompt="この画像を簡潔に説明してください。",
max_new_tokens=256,
)
print(result["response"])白い T シャツと赤いショートパンツを着た人物が、肩に黒いバックパックを担いでおり、その上にビーグル犬が乗っています。場面は住宅街の屋外で、背景には近代的なアパート群があり、歩道沿いには緑が見えます。人物は大きな窓のある建物の近くを歩いているか、立っているように見えます。pip install "inference[transformers]"from inference.models.qwen3_5vl.qwen3_5vl_inference_models import (
InferenceModelsQwen35VLAdapter,
)
model = InferenceModelsQwen35VLAdapter(
model_id="qwen3_5-0.8b",
api_key="YOUR_API_KEY",
)
image = "https://media.roboflow.com/dog.jpeg"
prompt = "この画像には何匹の犬がいますか?"
preprocessed, metadata = model.preprocess(image, prompt)
predictions = model.predict(preprocessed)
result = model.postprocess(predictions, metadata)
print(result[0].response)