(self)
| 44 | self.assertGreater(padded_width, 0) |
| 45 | |
| 46 | def test_scale_boxes(self): |
| 47 | img1_shape = (1024, 1024) # Model input shape |
| 48 | img0_shape = (500, 300) # Original image shape |
| 49 | boxes = np.array([[512, 512, 768, 768]]) # Example bounding box |
| 50 | |
| 51 | scaled_boxes = self.model.scale_boxes(img1_shape, boxes, img0_shape) |
| 52 | |
| 53 | # Verify the output is scaled correctly |
| 54 | self.assertEqual(scaled_boxes.shape, boxes.shape) |
| 55 | self.assertTrue(np.all(scaled_boxes <= max(img0_shape))) |
| 56 | |
| 57 | def test_predict(self): |
| 58 | # Mock model inference output |
nothing calls this directly
no test coverage detected