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.

rpn_r50_fpn.py 1.8 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # model settings
  2. model = dict(
  3. type='RPN',
  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. num_outs=5),
  19. rpn_head=dict(
  20. type='RPNHead',
  21. in_channels=256,
  22. feat_channels=256,
  23. anchor_generator=dict(
  24. type='AnchorGenerator',
  25. scales=[8],
  26. ratios=[0.5, 1.0, 2.0],
  27. strides=[4, 8, 16, 32, 64]),
  28. bbox_coder=dict(
  29. type='DeltaXYWHBBoxCoder',
  30. target_means=[.0, .0, .0, .0],
  31. target_stds=[1.0, 1.0, 1.0, 1.0]),
  32. loss_cls=dict(
  33. type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
  34. loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
  35. # model training and testing settings
  36. train_cfg=dict(
  37. rpn=dict(
  38. assigner=dict(
  39. type='MaxIoUAssigner',
  40. pos_iou_thr=0.7,
  41. neg_iou_thr=0.3,
  42. min_pos_iou=0.3,
  43. ignore_iof_thr=-1),
  44. sampler=dict(
  45. type='RandomSampler',
  46. num=256,
  47. pos_fraction=0.5,
  48. neg_pos_ub=-1,
  49. add_gt_as_proposals=False),
  50. allowed_border=0,
  51. pos_weight=-1,
  52. debug=False)),
  53. test_cfg=dict(
  54. rpn=dict(
  55. nms_pre=2000,
  56. max_per_img=1000,
  57. nms=dict(type='nms', iou_threshold=0.7),
  58. min_bbox_size=0)))

No Description

Contributors (2)