(self, box_clip_method, expected_output)
| 64 | ), |
| 65 | ) |
| 66 | def test_clip_boxes(self, box_clip_method, expected_output): |
| 67 | coder_cfg = box_coder.BoxCoder.default_config().set(clip_boxes=box_clip_method) |
| 68 | coder = coder_cfg.instantiate() |
| 69 | encoded_boxes = jnp.asarray([[10.0, 126.0, 20.0, 126.0], [120.0, 40.0, 130.0, 50.0]]) |
| 70 | anchors = jnp.asarray([[12.0, 124.0, 22.0, 126.0], [122.0, 38.0, 134.0, 48.0]]) |
| 71 | decoded_boxes = coder.decode(encoded_boxes=encoded_boxes, anchors=anchors) |
| 72 | np.testing.assert_allclose( |
| 73 | jnp.asarray(expected_output), |
| 74 | decoded_boxes, |
| 75 | ) |
| 76 | |
| 77 | @parameterized.parameters( |
| 78 | ( |
nothing calls this directly
no test coverage detected