ApolloScapeAuto / dataset-api

The ApolloScape Open Dataset for Autonomous Driving and its Application.
http://apolloscape.auto/
Apache License 2.0
569 stars 140 forks source link

Can not open car_models in 3d_car_instance_sample in python3.6 #64

Open LovPe opened 4 years ago

LovPe commented 4 years ago

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?

gkouros commented 3 years ago

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.