pesser / edflow

Reduce boilerplate code for your ML projects. TensorFlow and PyTorch.
https://edflow.readthedocs.io/
MIT License
24 stars 13 forks source link

SubDataset changes the type of some keys. Here "keypoints" #190

Closed mritv closed 4 years ago

mritv commented 4 years ago

Describe the bug SubDataset from edflow.data.dataset changes the type of some keys from np.array to list. Here the key "keypoints" was altered.

To Reproduce

In [1]: from abc_pose.data.video_prjoti import Prjoti_clean                                                                                                                                                        

In [2]: from edflow.data.dataset import SubDataset                                                                                                                                                                 

In [3]: full_prjoti = Prjoti_clean({"spatial_size": 256, "box_factor":1})                                                                                                                                          

In [4]: type(full_prjoti.labels["keypoints"])                                                                                                                                                                      
Out[4]: numpy.ndarray

In [5]: sub_prjoti = SubDataset(full_prjoti, range(5))                                                                                                                                                             

In [6]: type(sub_prjoti.labels["keypoints"])                                                                                                                                                                       
Out[6]: list

Expected behavior Expected the type of the key of the SubDataset class to stay the same.

pesser commented 4 years ago

should be fixed by #193 !