onnx / onnx/models

Image classification models don't support batching, batch size fixed at 1

Open
#233 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
9.8k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

For example, if I look at the resnet50 model I see an input shape like this: [ 1, 3, 224, 224 ].
Why is the batch dimension fixed at 1 instead of being -1? Batching often provides large speedups when running these models so by limiting these examples to batch-size 1 you are not showing off the performance potential of ONNX (and runtimes like ONNXRuntime). Is it possible to regenerate or modify the existing models so that they support batching?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing image classification models, including ResNet-50, and checking their input shapes in ONNXRuntime. Determine which models use a fixed batch dimension and what changes are needed for variable batching. Done means the relevant models accept batch sizes greater than one and their batching behavior is demonstrated.

Written by the indexing model from the issue text.

Assessment

Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.