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.

retinanet_r50_fpn.py 1.8 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # model settings
  2. model = dict(
  3. type='RetinaNet',
  4. backbone=dict(
  5. type='ResNet',
  6. depth=50,
  7. num_stages=4,
  8. out_indices=(0, 1, 2, 3),
  9. frozen_stages=1,
  10. norm_cfg=dict(type='BN', requires_grad=True),
  11. norm_eval=True,
  12. style='pytorch',
  13. init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
  14. neck=dict(
  15. type='FPN',
  16. in_channels=[256, 512, 1024, 2048],
  17. out_channels=256,
  18. start_level=1,
  19. add_extra_convs='on_input',
  20. num_outs=5),
  21. bbox_head=dict(
  22. type='RetinaHead',
  23. num_classes=80,
  24. in_channels=256,
  25. stacked_convs=4,
  26. feat_channels=256,
  27. anchor_generator=dict(
  28. type='AnchorGenerator',
  29. octave_base_scale=4,
  30. scales_per_octave=3,
  31. ratios=[0.5, 1.0, 2.0],
  32. strides=[8, 16, 32, 64, 128]),
  33. bbox_coder=dict(
  34. type='DeltaXYWHBBoxCoder',
  35. target_means=[.0, .0, .0, .0],
  36. target_stds=[1.0, 1.0, 1.0, 1.0]),
  37. loss_cls=dict(
  38. type='FocalLoss',
  39. use_sigmoid=True,
  40. gamma=2.0,
  41. alpha=0.25,
  42. loss_weight=1.0),
  43. loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
  44. # model training and testing settings
  45. train_cfg=dict(
  46. assigner=dict(
  47. type='MaxIoUAssigner',
  48. pos_iou_thr=0.5,
  49. neg_iou_thr=0.4,
  50. min_pos_iou=0,
  51. ignore_iof_thr=-1),
  52. allowed_border=-1,
  53. pos_weight=-1,
  54. debug=False),
  55. test_cfg=dict(
  56. nms_pre=1000,
  57. min_bbox_size=0,
  58. score_thr=0.05,
  59. nms=dict(type='nms', iou_threshold=0.5),
  60. max_per_img=100))

No Description

Contributors (3)