BaseEgoDataset: this class is not concerned with rasterisation or vectorisation, but only defines methods to get indices and subdataset. It defines a get_frame method which will be used to get the dict of data by calling the sample function
EgoDataset: ego dataset supporting rasterisation. The name has not been changed for backward compatibility
AgentDataset: agent dataset supporting rasterisation. The name has not been changed for backward compatibility
This is still not ideal (as a lot of code would be replicated if we wanted to implement AgentDatasetVectorized). We should prefer modularisation over inheritance.
Also, the sample function is now built from a method which can be changed through inheritance.
Implement hierarchy for
Dataset
.This PR introduces the following hierarchy:
BaseEgoDataset
: this class is not concerned with rasterisation or vectorisation, but only defines methods to get indices and subdataset. It defines aget_frame
method which will be used to get the dict of data by calling the sample functionEgoDataset
: ego dataset supporting rasterisation. The name has not been changed for backward compatibilityAgentDataset
: agent dataset supporting rasterisation. The name has not been changed for backward compatibilityEgoDatasetVectorized
: ego dataset supporting vectorisationThis is still not ideal (as a lot of code would be replicated if we wanted to implement
AgentDatasetVectorized
). We should prefer modularisation over inheritance.Also, the sample function is now built from a method which can be changed through inheritance.