class_docstr: Implementation of the adversarial texture attack on object trackers in PyTorch.
  
  | Paper link: https://arxiv.org/abs/1904.11042
class_docstr_tok: ["Implementation","of","the","adversarial","texture","attack","on","object","trackers","in","PyTorch",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1904.11042"]
docstr: Predict object tracking estimator on patched videos.
  
  :param videos: Video samples.
  :param y_init: Initial labels/boxes.
  :param foreground: Foreground mask.
  :param patch_points: Array of shape (nb_frames, 4, 2) containing four pairs of integers (height, width)
                       corresponding to the coordinates of the four corners top-left, top-right, bottom-right,
                       bottom-left of the transformed image in the coordinate-system of the original image.
  :return: Predicted labels/boxes.
docstr_tok: ["Predict","object","tracking","estimator","on","patched","videos",".",":","param","videos",":","Video","samples",".",":","param","y_init",":","Initial","labels\/boxes",".",":","param","foreground",":","Foreground","mask",".",":","param","patch_points",":","Array","of","shape","(","nb_frames",",","4",",","2",")","containing","four","pairs","of","integers","(","height",",","width",")","corresponding","to","the","coordinates","of","the","four","corners","top-left",",","top-right",",","bottom-right",",","bottom-left","of","the","transformed","image","in","the","coordinate-system","of","the","original","image",".",":","return",":","Predicted","labels\/boxes","."]
code: def _predictions(
      self,
      videos: "torch.Tensor",
      y_init: "torch.Tensor",
      foreground: Optional["torch.Tensor"],
      patch_points: Optional[np.ndarray],
  ) -> List[Dict[str, "torch.Tensor"]]:
      """
      Predict object tracking estimator on patched videos.
  
      :param videos: Video samples.
      :param y_init: Initial labels/boxes.
      :param foreground: Foreground mask.
      :param patch_points: Array of shape (nb_frames, 4, 2) containing four pairs of integers (height, width)
                           corresponding to the coordinates of the four corners top-left, top-right, bottom-right,
                           bottom-left of the transformed image in the coordinate-system of the original image.
      :return: Predicted labels/boxes.
      """
      import torch
  
      patched_input = self._apply_texture(
          videos,
          self._patch,
          foreground=foreground,
          patch_points=patch_points,
      )
      patched_input = torch.clamp(
          patched_input,
          min=self.estimator.clip_values[0],
          max=self.estimator.clip_values[1],
      )
  
      predictions = self.estimator.predict(
          patched_input, y_init=y_init
      )  # pylint: disable=W0212
  
      return predictions
  
imports: import logging
  from typing import Dict, List, Optional, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.object_tracking.object_tracker import ObjectTrackerMixin
  from art.summary_writer import SummaryWriter
label_desc: Use image node_id 3 for calling the AdversarialTexturePyTorch obj's underlying member method code with example usage: obj._predictions(videos, y_init, foreground, patch_points) and returns: predictions