point_to_primitive/utils/project_config.py

54 lines
940 B
Python

from argparse import Namespace
from ml_lib.utils.config import Config
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 __repr__(self):
return f'{self.__class__.__name__}({self.__dict__().__repr__()})'
class Classes(DataClass):
# Object Classes for Point Segmentation
Sphere = 0
Cylinder = 1
Cone = 2
Box = 3
Polytope = 4
Torus = 5
Plane = 6
class DataSplit(DataClass):
# DATA SPLIT OPTIONS
train = 'train',
devel = 'devel',
test = 'test'
class GlobalVar(DataClass):
# Variables for plotting
PADDING = 0.25
DPI = 50
data_split = DataSplit()
classes = Classes()
from models import *
class ThisConfig(Config):
@property
def _model_map(self):
return dict(PN2=PointNet2)