The code creates this error is
depth_im = cv2.resize(depth_img, (self.output_size, self.output_size), interpolation=cv2.INTER_LINEAR)

I will try to run this op in the for loop and see whehter the error will happen or not