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 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. """Config parameters for Darknet based yolov3_darknet53 models."""
  16. class ConfigYOLOV3DarkNet53:
  17. """
  18. Config parameters for the yolov3_darknet53.
  19. Examples:
  20. ConfigYOLOV3DarkNet53()
  21. """
  22. # train_param
  23. # data augmentation related
  24. hue = 0.1
  25. saturation = 1.5
  26. value = 1.5
  27. jitter = 0.3
  28. resize_rate = 1
  29. multi_scale = [[320, 320],
  30. [352, 352],
  31. [384, 384],
  32. [416, 416],
  33. [448, 448],
  34. [480, 480],
  35. [512, 512],
  36. [544, 544],
  37. [576, 576],
  38. [608, 608]
  39. ]
  40. num_classes = 80
  41. max_box = 50
  42. backbone_input_shape = [32, 64, 128, 256, 512]
  43. backbone_shape = [64, 128, 256, 512, 1024]
  44. backbone_layers = [1, 2, 8, 8, 4]
  45. # confidence under ignore_threshold means no object when training
  46. ignore_threshold = 0.7
  47. # h->w
  48. anchor_scales = [(10, 13),
  49. (16, 30),
  50. (33, 23),
  51. (30, 61),
  52. (62, 45),
  53. (59, 119),
  54. (116, 90),
  55. (156, 198),
  56. (373, 326)]
  57. out_channel = 255
  58. # test_param
  59. test_img_shape = [416, 416]