from argparse import Namespace class DataClass(Namespace): def __len__(self): return len(self.__dict__()) def __dict__(self): return {key: val for key, val in self.__class__.__dict__.items() if '__' not in key} def items(self): return self.__dict__().items() def __repr__(self): return f'{self.__class__.__name__}({self.__dict__().__repr__()})' def __getitem__(self, item): return self.__dict__()[item] class ClassesALL(DataClass): # Object Classes for Point Segmentation Sphere = 0 Cylinder = 1 Box = 2 # All SubTypes of Planes Polytope = 3 # Plane = 4 # class ClassesPolyAsPlane(DataClass): # Object Classes for Point Segmentation Sphere = 0 Cylinder = 1 Plane = 2 # All SubTypes of Planes class ClusterTypes(DataClass): prim = 'prim' grid = 'grid' none = '' class DataSplit(DataClass): # DATA SPLIT OPTIONS train = 'train' devel = 'devel' test = 'test' predict = 'predict' classesAll = ClassesALL() classesPolyAsPlane= ClassesPolyAsPlane() clusterTypes = ClusterTypes() dataSplit=DataSplit()