def __init__(self, gpu_id=0, weight_path=None, visiual=None, eval=False, mode_path=None):
    self.__num_class = cfg.VOC_DATA['NUM']
    self.__conf_threshold = cfg.VAL['CONF_THRESH']
    self.__nms_threshold = cfg.VAL['NMS_THRESH']
    self.__device = gpu.select_device(gpu_id)
    self.__multi_scale_val = cfg.VAL['MULTI_SCALE_VAL']
    self.__flip_val = cfg.VAL['FLIP_VAL']
    self.__visiual = visiual
    self.__eval = eval
    self.__classes = cfg.VOC_DATA['CLASSES']
    if (cfg.MODEL_TYPE['TYPE'] == 'NSGA-YOLOv4'):
        self.__model = Build_Model(weight_path=mode_path).to(self.__device)
    else:
        self.__model = Build_Model(weight_path=weight_path).to(self.__device)
    self.__load_model_weights(weight_path)
    self.__evalter = Evaluator(self.__model, showatt=False)
def __init__(self, gpu_id=0, weight_path=None, visiual=None, eval=False, mode_path=None):
    self.__num_class = cfg.VOC_DATA['NUM']
    self.__conf_threshold = cfg.VAL['CONF_THRESH']
    self.__nms_threshold = cfg.VAL['NMS_THRESH']
    self.__device = gpu.select_device(gpu_id)
    self.__multi_scale_val = cfg.VAL['MULTI_SCALE_VAL']
    self.__flip_val = cfg.VAL['FLIP_VAL']
    self.__visiual = visiual
    self.__eval = eval
    self.__classes = cfg.VOC_DATA['CLASSES']
    if (cfg.MODEL_TYPE['TYPE'] == 'NSGA-YOLOv4'):
        self.__model = Build_Model(weight_path=mode_path).to(self.__device)
    else:
        self.__model = Build_Model(weight_path=weight_path).to(self.__device)
    self.__load_model_weights(weight_path)
    self.__evalter = Evaluator(self.__model, showatt=False)