(self, rect1, rect2)
| 262 | return res |
| 263 | |
| 264 | def _has_intersection(self, rect1, rect2): |
| 265 | x_min1, y_min1, x_max1, y_max1 = rect1 |
| 266 | x_min2, y_min2, x_max2, y_max2 = rect2 |
| 267 | if x_min1 > x_max2 or x_max1 < x_min2: |
| 268 | return False |
| 269 | if y_min1 > y_max2 or y_max1 < y_min2: |
| 270 | return False |
| 271 | return True |
| 272 | |
| 273 | |
| 274 | def save_structure_res(res, save_folder, img_name, img_idx=0): |