Wizaron / instance-segmentation-pytorch

Semantic Instance Segmentation with a Discriminative Loss Function in PyTorch
https://arxiv.org/abs/1708.02551
GNU General Public License v3.0
458 stars 95 forks source link

datasets #6

Closed zhengduoru closed 6 years ago

zhengduoru commented 6 years ago

when I ran dataset.py in code/lib

the code if __name__ == '__main__': ds = SegDataset('../../../data/processed/lmdb/training-lmdb/') image, image_rgb, annotation, box_annotation, box_coordinate, \ n_objects = ds[5] seamed to be something wrong.

I saw the Class SegDataset only return 'img, annotation, n_objects', but the code need six ?

I got the error

File "/home/duoduo/github/instance-segmentation-pytorch/code/lib/dataset.py", line 256, in n_objects = ds[5]

ValueError: need more than 3 values to unpack

Wizaron commented 6 years ago

I updated main part of lib/dataset.py.

Thanks!