(self, idx)
| 519 | return self.data.shape[0] |
| 520 | |
| 521 | def __getitem__(self, idx): |
| 522 | item = self.data.iloc[idx] |
| 523 | vid = item['video_id'] |
| 524 | |
| 525 | label = 1 if item['annotation']=='假' else 0 |
| 526 | label = torch.tensor(label) |
| 527 | |
| 528 | bbox_vgg = pickle.load(open(os.path.join(self.bboxfeapath,vid+'.pkl'),'rb')) |
| 529 | bbox_vgg = torch.FloatTensor(bbox_vgg) |
| 530 | |
| 531 | return { |
| 532 | 'label': label, |
| 533 | 'bbox_vgg': bbox_vgg |
| 534 | } |
| 535 | |
| 536 | |
| 537 | class Title_W2V_Dataset(Dataset): |
nothing calls this directly
no outgoing calls
no test coverage detected