We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max_size
DetrImageProcessor.preprocess
transformers
@amyeroberts, @qubvel and I think @NielsRogge worked on it too ?
examples
import logging import numpy as np from transformers.models.detr.image_processing_detr import DetrImageProcessor logging.basicConfig(level=logging.WARNING) logger = logging.getLogger(__name__) images = [np.ones((512, 512, 3))] annotations = [{'image_id': [], 'annotations': []}] size = {'max_height': 600, 'max_width': 600} image_processor = DetrImageProcessor() images = image_processor.preprocess(images, do_resize=True, do_rescale=False, size=size, annotations=annotations, format='coco_detection')
Hello!
I noticed that the preprocess method in the DetrImageProcessor class always passes max_size to the resize method,
preprocess
DetrImageProcessor
resize
transformers/src/transformers/models/detr/image_processing_detr.py
Lines 1445 to 1447 in 4120cb2
and that triggers a deprecation warning in resize method,
The `max_size` parameter is deprecated and will be removed in v4.26. Please specify in `size['longest_edge'] instead`.
Lines 992 to 997 in 4120cb2
I propose removing the unused max_size argument from the preprocess method since it is always None,
None
Line 1340 in 4120cb2
Would it be okay if I work on this and submit a pull request? I can try to see if the problem also occurs in other models.
The text was updated successfully, but these errors were encountered:
Hi @HichTala! Nice catch, would appreciate a PR!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
System Info
transformers
version: 4.47.0.dev0Who can help?
@amyeroberts, @qubvel
and I think @NielsRogge worked on it too ?
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
Hello!
I noticed that the
preprocess
method in theDetrImageProcessor
class always passesmax_size
to theresize
method,transformers/src/transformers/models/detr/image_processing_detr.py
Lines 1445 to 1447 in 4120cb2
and that triggers a deprecation warning in
resize
method,transformers/src/transformers/models/detr/image_processing_detr.py
Lines 992 to 997 in 4120cb2
I propose removing the unused
max_size
argument from the preprocess method since it is alwaysNone
,transformers/src/transformers/models/detr/image_processing_detr.py
Line 1340 in 4120cb2
Would it be okay if I work on this and submit a pull request? I can try to see if the problem also occurs in other models.
The text was updated successfully, but these errors were encountered: