def __init__(
        self,
        root: str,
        transform: Optional[Callable[[torch.Tensor], torch.Tensor]] = None,
    ):
        """
        Market1501 dataset for train stage of reid task.

        Args:
            root: path to a directory that contains Market-1501-v15.09.15
            transform: transformation that should be applied to images
        """
        self.root = Path(root)
        self._data_dir = self.root / "Market-1501-v15.09.15/bounding_box_train"
        self.transform = transform
        self.images, self.pids = self._load_data(self._data_dir)

        Market1501 dataset for train stage of reid task.

        Args:
            root: path to a directory that contains Market-1501-v15.09.15
            transform: transformation that should be applied to images
        
catalyst/contrib/datasets/market1501.py