Gets bounding box of the given instance
(self, instance)
| 389 | self.bbox_area_threshold = bbox_area_threshold |
| 390 | |
| 391 | def get_bbox(self, instance): |
| 392 | """ Gets bounding box of the given instance |
| 393 | """ |
| 394 | min_h, max_h = instance[:,:,1].min(), instance[:,:,1].max() |
| 395 | min_w, max_w = instance[:,:,0].min(), instance[:,:,0].max() |
| 396 | return [min_h, min_w, max_h, max_w] |
| 397 | |
| 398 | def extend_instance_points(self, instance, border_fn): |
| 399 | """ Given an instance and a border function `border_fn`, extends the instance points with crossing points between the instance and |
no test coverage detected