From 1c1aec2ef1d6822fae3ffbb973b4c941f65f4ddf Mon Sep 17 00:00:00 2001 From: linlin Date: Wed, 19 Jun 2024 11:36:44 +0200 Subject: [PATCH] Update object_detection.md (#31488) Define MAX_SIZE before it is used. --- docs/source/en/tasks/object_detection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/en/tasks/object_detection.md b/docs/source/en/tasks/object_detection.md index 39362b46158..dfad80b949f 100644 --- a/docs/source/en/tasks/object_detection.md +++ b/docs/source/en/tasks/object_detection.md @@ -204,6 +204,8 @@ Instantiate the image processor from the same checkpoint as the model you want t ```py >>> from transformers import AutoImageProcessor +>>> MAX_SIZE = IMAGE_SIZE + >>> image_processor = AutoImageProcessor.from_pretrained( ... MODEL_NAME, ... do_resize=True, @@ -225,8 +227,6 @@ and it uses the exact same dataset as an example. Apply some geometric and color ```py >>> import albumentations as A ->>> max_size = IMAGE_SIZE - >>> train_augment_and_transform = A.Compose( ... [ ... A.Perspective(p=0.1),