Class to read the ALOV dataset :param root: Path to the ALOV folder that contains JPEGImages, annotations, etc. folders. :param input_size: The input size of network that is using this data, for rescaling. :param download: Specify whether to
(self, root, transform, input_size, download=False)
| 25 | VOID_LABEL = 255 |
| 26 | |
| 27 | def __init__(self, root, transform, input_size, download=False): |
| 28 | """ |
| 29 | Class to read the ALOV dataset |
| 30 | |
| 31 | :param root: Path to the ALOV folder that contains JPEGImages, |
| 32 | annotations, etc. folders. |
| 33 | :param input_size: The input size of network that is using this data, |
| 34 | for rescaling. |
| 35 | :param download: Specify whether to download the dataset if it is not |
| 36 | present. |
| 37 | :param num_samples: Number of samples to pass to the batch |
| 38 | """ |
| 39 | super(ALOV300, self).__init__() |
| 40 | |
| 41 | # Makes a unique path for a given instance of davis |
| 42 | self.root = root |
| 43 | self.download = download |
| 44 | self.img_path = os.path.join(self.root, "JPEGImages") |
| 45 | self.box_path = os.path.join(self.root, "box/") |
| 46 | self.frame_path = os.path.join(self.root, "frame/") |
| 47 | |
| 48 | # Check if Davis is installed and download it if necessary |
| 49 | self._check_directories() |
| 50 | |
| 51 | self.input_size = input_size |
| 52 | self.transform = transform |
| 53 | self.x, self.y = self._parse_data(self.frame_path, self.box_path) |
| 54 | self.len = len(self.y) |
| 55 | |
| 56 | def __len__(self): |
| 57 | return self.len |
nothing calls this directly
no test coverage detected