Arulkumar03/Wheat_HEAD_Detection_Counting_ComputerVision_Model
0
1# Copyright (c) Facebook, Inc. and its affiliates.2from __future__ import absolute_import, division, print_function, unicode_literals3import torch4 5 6def pairwise_iou_rotated(boxes1, boxes2):7 """8 Return intersection-over-union (Jaccard index) of boxes.9 10 Both sets of boxes are expected to be in11 (x_center, y_center, width, height, angle) format.12 13 Arguments:14 boxes1 (Tensor[N, 5])15 boxes2 (Tensor[M, 5])16 17 Returns:18 iou (Tensor[N, M]): the NxM matrix containing the pairwise19 IoU values for every element in boxes1 and boxes220 """21 return torch.ops.detectron2.box_iou_rotated(boxes1, boxes2)22 