Object Detection notebook error: AttributeError: 'DetrImageProcessor' object has no attribute 'pad_and_create_pixel_mask'
When I try to runObject detectionin Colab, I get this error:---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-17-cf33f4c65434> in <cell line: 11>()
      9 )
     10 
---> 11 trainer.train()

6 frames
<ipython-input-13-ebea88e47f9a> in collate_fn(batch)
      1 def collate_fn(batch):
      2     pixel_values = [item["pixel_values"] for item in batch]
----> 3     encoding = image_processor.pad_and_create_pixel_mask(pixel_values, return_tensors="pt")
      4     labels = [item["labels"] for item in batch]
      5     batch = {}

AttributeError: 'DetrImageProcessor' object has no attribute 'pad_and_create_pixel_mask'Please help to solve this. I’m trying to fine tune the model.
2023-07-31T16:34:11Z
Hi,The guide you link to usespadrather thanpad_and_create_pixel_mask(the method has been renamed).
2023-07-31T16:55:03Z
Thanks@nielsryou saved my day! This is working
2023-09-21T20:09:24Z
Confirm: this works. Thanks!