When I try to run Object detection in 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.