(self, index)
| 91 | return self.annotations[index][0] |
| 92 | |
| 93 | def pull_item(self, index): |
| 94 | id_ = self.ids[index] |
| 95 | |
| 96 | res, img_info, file_name = self.annotations[index] |
| 97 | # load image and preprocess |
| 98 | img_file = os.path.join( |
| 99 | self.data_dir, self.name, file_name |
| 100 | ) |
| 101 | img = cv2.imread(img_file) |
| 102 | assert img is not None |
| 103 | |
| 104 | return img, res.copy(), img_info, np.array([id_]) |
| 105 | |
| 106 | @Dataset.resize_getitem |
| 107 | def __getitem__(self, index): |
no outgoing calls
no test coverage detected