prophesee-ai / prophesee-automotive-dataset-toolbox

A set of Python scripts to evaluate the Automotive Datasets provided by Prophesee
Apache License 2.0
157 stars 30 forks source link

failed to get_size() #21

Closed cytheria43 closed 1 year ago

cytheria43 commented 2 years ago

video = PSEELoader(file_path) video.get_size()

[None, None]

when I tried to get the size of NCARS datasets, it got None.

leonel-psee commented 2 years ago

Hi cytheria43, Di you try to get the size of the whole datasets or just for one .dat file of the datasets? seems that PSEELoader() can only load .dat and .npy file : image

So if you want to get the size of the whole dataset, you may need to interate inside the dataset

laurentbristiel commented 2 years ago

Hello @cytheria43 ,

I looked at NCARS dataset DAT files and they don't contain height,width information, this is why the get_size() function returns [None,None]. I will update the README and not mention this datasets here as it can not be used in its current version with the code of this repo.

Where you specifically interested in this dataset? If you are looking for a Gen1 Car Dataset, I would recommend to use "GEN1 Automotive Detection Dataset" which is larger but contains everything you need (DAT files with size, Labels in numpy format). See https://www.prophesee.ai/2020/01/24/prophesee-gen1-automotive-detection-dataset/

Now if you want to use the N-CARS dataset, you can compute the size with code similar to this:

from src.io.psee_loader import PSEELoader
import numpy as np

video = PSEELoader(td_file)
events = []
while not video.done:
    events.append(video.load_delta_t(10000))
events = np.concatenate(events)
height = events["y"].max() + 1
width = events["x"].max() + 1

and then you can even update the DAT files with this size.

Hope this helps.