keys.py 849 B

12345678910111213141516171819202122232425262728
  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. class DetKeys(object):
  12. """
  13. This class defines a set of keys used for communication of Det predictors
  14. and transforms. Both predictors and transforms accept a dict or a list of
  15. dicts as input, and they get the objects of their interest from the dict, or
  16. put the generated objects into the dict, all based on these keys.
  17. """
  18. # Common keys
  19. IMAGE = 'image'
  20. IM_PATH = 'input_path'
  21. IM_SIZE = 'image_size'
  22. SCALE_FACTOR = 'scale_factors'
  23. # Suite-specific keys
  24. BOXES = 'boxes'
  25. MASKS = 'masks'