evaluator.py 898 B

1234567891011121314151617181920212223242526
  1. # !/usr/bin/env python3
  2. # -*- coding: UTF-8 -*-
  3. ################################################################################
  4. #
  5. # Copyright (c) 2024 Baidu.com, Inc. All Rights Reserved
  6. #
  7. ################################################################################
  8. """
  9. Author: PaddlePaddle Authors
  10. """
  11. from ..object_detection import DetEvaluator
  12. from .model_list import MODELS
  13. class InstanceSegEvaluator(DetEvaluator):
  14. """ Instance Segmentation Model Evaluator """
  15. entities = MODELS
  16. def update_config(self):
  17. """update evalution config
  18. """
  19. if self.eval_config.log_interval:
  20. self.pdx_config.update_log_interval(self.eval_config.log_interval)
  21. self.pdx_config.update_dataset(self.global_config.dataset_dir,
  22. "COCOInstSegDataset")
  23. self.pdx_config.update_weights(self.eval_config.weight_path)