Views
No views yet
[batch_size, 3, height, width]height and width must be multiples of 32.[0, 1] (divide by 255).1import onnxruntime as ort
2from huggingface_hub import hf_hub_download
3
4# Download and load model
5model_path = hf_hub_download(repo_id="KvaytG/craft-mlt-25k-onnx", filename="craft.onnx")
6session = ort.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
7
8# Prepare input (example)
9# img_tensor shape: (1, 3, 768, 768)
10outputs = session.run(None, {'input': img_tensor})