def _load_data(data_dir: Path) -> Tuple[torch.Tensor, torch.Tensor]:
        """
        Load data from train directory of the dataset.
        Parse names of images to get person id as labels.

        Args:
            data_dir: path to directory that contains training data

        Returns:
            images for training and their labels
        """
        filenames = list(data_dir.glob("*.jpg"))
        data = torch.from_numpy(
            np.array([imread(filename) for filename in filenames])
        ).float()
        targets = torch.from_numpy(
            np.array([int(filename.name.split("_")[0]) for filename in filenames])
        )
        return data, targets

        Load data from train directory of the dataset.
        Parse names of images to get person id as labels.

        Args:
            data_dir: path to directory that contains training data

        Returns:
            images for training and their labels
        
catalyst/contrib/datasets/market1501.py