prophesee-automotive-dataset-toolbox
prophesee-automotive-dataset-toolbox copied to clipboard
failed to get_size()
video = PSEELoader(file_path) video.get_size()
[None, None]
when I tried to get the size of NCARS datasets, it got None.
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 :
So if you want to get the size of the whole dataset, you may need to interate inside the dataset
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.