dataset-api icon indicating copy to clipboard operation
dataset-api copied to clipboard

Can not open car_models in 3d_car_instance_sample in python3.6

Open LovPe opened this issue 4 years ago • 1 comments

Hi I tried to open .pkl files in 3d_car_instance_sample/car_models with code in python3.6

roots = r'/home/xxx/3d_car_instance_sample/3d_car_instance_sample/car_models'
files = glob.glob(os.path.join(roots, "*.pkl"))
for each in files[2:]:
    with open(each) as f:
        anns = pickle.load(f)

then a error occur:

    anns = pickle.load(f)
TypeError: a bytes-like object is required, not 'str'

How to fix this error?

LovPe avatar Sep 10 '20 06:09 LovPe

There are issues with the pickle files plus some python version incompatibilities. You can download and use the json files instead from this kaggle link. I have fixed some python-version-related errors in my fork so you can have a look if you want.

gkouros avatar Jul 11 '21 16:07 gkouros