(self, cur_idx)
| 51 | ) |
| 52 | |
| 53 | def get_data(self, cur_idx): |
| 54 | data = [] |
| 55 | if self.num_samples == 1: |
| 56 | data.append(self._dataset[cur_idx]) |
| 57 | else: |
| 58 | sequence_name = self._dataset[cur_idx]['sequence_name'] |
| 59 | frame_offsets = self.get_frame_offsets() |
| 60 | for i in frame_offsets: |
| 61 | next_idx = cur_idx + i |
| 62 | if next_idx < len(self._dataset) and self._dataset[next_idx]['sequence_name'] == sequence_name: |
| 63 | data.append(self._dataset[next_idx]) |
| 64 | else: |
| 65 | data.append(data[-1]) |
| 66 | return data |
| 67 | |
| 68 | def get_frame_offsets(self): |
| 69 | if self.max_frame_dist == 0: |
no test coverage detected