original_docstring:  For each frame in frames, extracts a square crop centered at box_extract, of area search_area_factor^2
      times box_extract area. The extracted crops are then resized to output_sz. Further, the co-ordinates of the box
      box_gt are transformed to the image crop co-ordinates
  
      args:
          frames - list of frames
          box_extract - list of boxes of same length as frames. The crops are extracted using anno_extract
          box_gt - list of boxes of same length as frames. The co-ordinates of these boxes are transformed from
                      image co-ordinates to the crop co-ordinates
          search_area_factor - The area of the extracted crop is search_area_factor^2 times box_extract area
          output_sz - The size to which the extracted crops are resized
  
      returns:
          list - list of image crops
          list - box_gt location in the crop co-ordinates
          
docstring: For each frame in frames, extracts a square crop centered at box_extract, of area search_area_factor^2
  times box_extract area. The extracted crops are then resized to output_sz. Further, the co-ordinates of the box
  box_gt are transformed to the image crop co-ordinates
  
  list of frames
  box_extract - list of boxes of same length as frames. The crops are extracted using anno_extract
  box_gt - list of boxes of same length as frames.
  
  list of image crops
  list - box_gt location in the crop co-ordinates
docstring_tokens: For each frame in frames extracts a square crop centered at box_extract of area search_area_factor^2 times box_extract area . The extracted crops are then resized to output_sz . Further the co - ordinates of the box box_gt are transformed to the image crop co - ordinates list of frames box_extract - list of boxes of same length as frames . The crops are extracted using anno_extract box_gt - list of boxes of same length as frames . list of image crops list - box_gt location in the crop co - ordinates
code: def jittered_center_crop(frames, box_extract, box_gt, search_area_factor, output_sz, masks=None):
      """ For each frame in frames, extracts a square crop centered at box_extract, of area search_area_factor^2
      times box_extract area. The extracted crops are then resized to output_sz. Further, the co-ordinates of the box
      box_gt are transformed to the image crop co-ordinates
  
      args:
          frames - list of frames
          box_extract - list of boxes of same length as frames. The crops are extracted using anno_extract
          box_gt - list of boxes of same length as frames. The co-ordinates of these boxes are transformed from
                      image co-ordinates to the crop co-ordinates
          search_area_factor - The area of the extracted crop is search_area_factor^2 times box_extract area
          output_sz - The size to which the extracted crops are resized
  
      returns:
          list - list of image crops
          list - box_gt location in the crop co-ordinates
          """
  
      if masks is None:
          crops_resize_factors = [sample_target(f, a, search_area_factor, output_sz)
                                  for f, a in zip(frames, box_extract)]
          frames_crop, resize_factors, att_mask = zip(*crops_resize_factors)
          masks_crop = None
      else:
          crops_resize_factors = [sample_target(f, a, search_area_factor, output_sz, m)
                                  for f, a, m in zip(frames, box_extract, masks)]
          
          frames_crop, resize_factors, att_mask, masks_crop = zip(*crops_resize_factors)
      # frames_crop: tuple of ndarray (128,128,3), att_mask: tuple of ndarray (128,128)
      crop_sz = torch.Tensor([output_sz, output_sz])
      # find the bb location in the crop
      '''Note that here we use normalized coord'''
      box_crop = [transform_image_to_crop(a_gt, a_ex, rf, crop_sz, normalize=True)
                  for a_gt, a_ex, rf in zip(box_gt, box_extract, resize_factors)]  # (x1,y1,w,h) list of tensors
      
      return frames_crop, box_crop, att_mask, masks_crop
code_tokens: def jittered_center_crop ( frames , box_extract , box_gt , search_area_factor , output_sz , masks = None ) : if masks is None : crops_resize_factors = [ sample_target ( f , a , search_area_factor , output_sz ) for f , a in zip ( frames , box_extract ) ] frames_crop , resize_factors , att_mask = zip ( * crops_resize_factors ) masks_crop = None else : crops_resize_factors = [ sample_target ( f , a , search_area_factor , output_sz , m ) for f , a , m in zip ( frames , box_extract , masks ) ] frames_crop , resize_factors , att_mask , masks_crop = zip ( * crops_resize_factors ) crop_sz = torch . Tensor ( [ output_sz , output_sz ] ) '''Note that here we use normalized coord''' box_crop = [ transform_image_to_crop ( a_gt , a_ex , rf , crop_sz , normalize = True ) for a_gt , a_ex , rf in zip ( box_gt , box_extract , resize_factors ) ] return frames_crop , box_crop , att_mask , masks_crop
short_docstring: For each frame in frames, extracts a square crop centered at box_extract, of area search_area_factor^2
  times box_extract area.
short_docstring_tokens: For each frame in frames extracts a square crop centered at box_extract of area search_area_factor^2 times box_extract area .
comment: """ For each frame in frames, extracts a square crop centered at box_extract, of area search_area_factor^2
      times box_extract area. The extracted crops are then resized to output_sz. Further, the co-ordinates of the box
      box_gt are transformed to the image crop co-ordinates
  
      args:
          frames - list of frames
          box_extract - list of boxes of same length as frames. The crops are extracted using anno_extract
          box_gt - list of boxes of same length as frames. The co-ordinates of these boxes are transformed from
                      image co-ordinates to the crop co-ordinates
          search_area_factor - The area of the extracted crop is search_area_factor^2 times box_extract area
          output_sz - The size to which the extracted crops are resized
  
      returns:
          list - list of image crops
          list - box_gt location in the crop co-ordinates
          """$SEP$# frames_crop: tuple of ndarray (128,128,3), att_mask: tuple of ndarray (128,128)$SEP$# find the bb location in the crop$SEP$'''Note that here we use normalized coord'''$SEP$# (x1,y1,w,h) list of tensors