(args)
| 133 | |
| 134 | |
| 135 | def build_matcher(args): |
| 136 | if args.matcher_type == 'HungarianMatcher': |
| 137 | return HungarianMatcher(cost_class=args.set_cost_class, |
| 138 | cost_bbox=args.set_cost_bbox, |
| 139 | cost_giou=args.set_cost_giou, |
| 140 | focal_alpha=args.focal_alpha, |
| 141 | cost_keypoints=args.set_cost_keypoints, |
| 142 | cost_kpvis=args.set_cost_kpvis, |
| 143 | cost_oks=args.set_cost_oks, |
| 144 | num_body_points=args.num_body_points) |
| 145 | elif args.matcher_type == 'HungarianMatcherBox': |
| 146 | return HungarianMatcherBox(cost_class=args.set_cost_class, |
| 147 | cost_bbox=args.set_cost_bbox, |
| 148 | cost_giou=args.set_cost_giou, |
| 149 | focal_alpha=args.focal_alpha) |
| 150 | else: |
| 151 | raise NotImplementedError('Unknown args.matcher_type: {}'.format( |
| 152 | args.matcher_type)) |
| 153 | |
| 154 | |
| 155 |
no test coverage detected