keys.py 1000 B

1234567891011121314151617181920212223242526272829303132
  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 TableRecKeys(object):
  12. """
  13. This class defines a set of keys used for communication of TableRec 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_SIZE = 'image_size'
  21. IM_PATH = 'input_path'
  22. ORI_IM = 'original_image'
  23. ORI_IM_SIZE = 'original_image_size'
  24. # Suite-specific keys
  25. SHAPE_LIST = 'shape_list'
  26. STRUCTURE_PROB = 'structure_probs'
  27. LOC_PROB = 'loc_probs'
  28. BBOX_RES = 'cell_bbox'
  29. HTML_RES = 'html'