huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.05k stars 26.3k forks source link

Speed up image processors - cast to array before BatchFeature #31205

Open amyeroberts opened 3 months ago

amyeroberts commented 3 months ago

Feature request

Complete work initially started in #28221

Motivation

Converting the model outputs to an array before creating the BatchFeature object can speed up image processing, especially for nested outputs, such as for videos.

Your contribution

Open to the community to add

yaswanth19 commented 2 weeks ago

Hi @amyeroberts , If this Issue is still open then I would like to work on it. If so, can you provide me some more context to work on.