DocTR
DocTR OCR モデルを Serverless Cloud API で使用します
コード例
3
モデルを実行する
import os
import supervision as sv
from inference_sdk import InferenceHTTPClient
# テキストを含むサンプル画像
image = sv.load_image_from_url("https://media.roboflow.com/inference/license_plate_1.jpg")
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.ocr_image(inference_input=image, model="doctr")
print(result["result"]) # 抽出されたテキストMr
AUTPMATIC
280SE
34 T6511推論速度
モデル
レイテンシ(ms)
Inference(セルフホスト)で使用
参考資料
最終更新
役に立ちましたか?