You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.py 1.7 kB

5 years ago
5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 2020 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ============================================================================
  15. from easydict import EasyDict as ed
  16. config = ed({
  17. "INFER_LONG_SIZE": 1920,
  18. "KERNEL_NUM": 7,
  19. "INFERENCE": True, # INFER MODE\TRAIN MODE
  20. # backbone
  21. "BACKBONE_LAYER_NUMS": [3, 4, 6, 3],
  22. "BACKBONE_IN_CHANNELS": [64, 256, 512, 1024],
  23. "BACKBONE_OUT_CHANNELS": [256, 512, 1024, 2048],
  24. # neck
  25. "NECK_OUT_CHANNEL": 256,
  26. # lr
  27. "BASE_LR": 2e-3,
  28. "TRAIN_TOTAL_ITER": 58000,
  29. "WARMUP_STEP": 620,
  30. "WARMUP_RATIO": 1/3,
  31. # dataset for train
  32. "TRAIN_ROOT_DIR": "psenet/ic15/",
  33. "TRAIN_IS_TRANSFORM": True,
  34. "TRAIN_LONG_SIZE": 640,
  35. "TRAIN_MIN_SCALE": 0.4,
  36. "TRAIN_BATCH_SIZE": 4,
  37. "TRAIN_REPEAT_NUM": 1800,
  38. "TRAIN_DROP_REMAINDER": True,
  39. "TRAIN_MODEL_SAVE_PATH": "./checkpoints/",
  40. # dataset for test
  41. "TEST_ROOT_DIR": "psenet/ic15/",
  42. "TEST_BUFFER_SIZE": 4,
  43. "TEST_DROP_REMAINDER": False,
  44. # air config
  45. "air_filename": "psenet_bs_1.air",
  46. })