roboflow / roboflow/inference

needs to be checked if PE model accepts batches (if so - maybe worth claiming use of batches of inputs)

Open
#1,377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.5k
Forks
319
Avg merge
1d 14h
Merged PRs (30d)
133

Description

needs to be checked if PE model accepts batches (if so - maybe worth claiming use of batches of inputs)

Originally posted by @PawelPeczek-Roboflow in https://github.com/roboflow/inference/pull/1350#discussion_r2138408406

looks like it does:

Clip also does actually and block decalres input the same way:
data: Union[Selector(kind=[IMAGE_KIND, STRING_KIND]), str]

@PawelPeczek-Roboflow Is this the only thing that would need to be added?

@classmethod
def get_parameters_accepting_batches(cls) -> List[str]:
    return ["data"]

(above results in 'Batch' object has no attribute 'to_inference_format')

Contributor guide

Open the contributing guide

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 with inference/core/entities/requests/perception_encoder.py around line 45 and inspect how the PE model declares batch-capable parameters. Reproduce the reported 'Batch' object has no attribute 'to_inference_format' error, then verify that batched inputs are accepted and processed successfully. Confirm whether the required change is limited to the PE model declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.