mirror of https://github.com/JDAI-CV/DCL.git
Update dataset_DCL.py
parent
3b5b5e95ac
commit
d9ddacda59
|
@ -162,10 +162,10 @@ def collate_fn4backbone(batch):
|
||||||
img_name = []
|
img_name = []
|
||||||
for sample in batch:
|
for sample in batch:
|
||||||
imgs.append(sample[0])
|
imgs.append(sample[0])
|
||||||
if len(sample) == 5:
|
if len(sample) == 7:
|
||||||
label.append(sample[1])
|
|
||||||
else:
|
|
||||||
label.append(sample[2])
|
label.append(sample[2])
|
||||||
|
else:
|
||||||
|
label.append(sample[1])
|
||||||
img_name.append(sample[-1])
|
img_name.append(sample[-1])
|
||||||
return torch.stack(imgs, 0), label, img_name
|
return torch.stack(imgs, 0), label, img_name
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue