resize_labels

behavenet.data.preprocess.resize_labels(labels, xpix_new, ypix_new, xpix_old, ypix_old)[source]

Update label values to reflect scale of corresponding images.

Parameters:
  • labels (array-like) – np.ndarray of shape (n_time, 2 * n_labels); for a given row, all x-values come first, followed by all y-values

  • xpix_new (int) – xpix of new images

  • ypix_new (int) – ypix of new images

  • xpix_old (int) – xpix of original images

  • ypix_old (int) – ypix of original images

Returns:

resized label values

Return type:

array-like