Python bbox.bbox_overlaps_cython() Examples
The following are 17
code examples of bbox.bbox_overlaps_cython().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
bbox
, or try the search function
.
Example #1
Source File: bbox_transform.py From Deep-Feature-Flow with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #2
Source File: bbox_transform.py From Decoupled-Classification-Refinement with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #3
Source File: bbox_transform.py From Sequence-Level-Semantics-Aggregation with Apache License 2.0 | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #4
Source File: bbox_transform.py From Faster_RCNN_for_DOTA with Apache License 2.0 | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #5
Source File: bbox_transform.py From Accel with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #6
Source File: bbox_transform.py From Relation-Networks-for-Object-Detection with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #7
Source File: bbox_transform.py From RoITransformer_DOTA with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #8
Source File: bbox_transform.py From Deformable-ConvNets with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #9
Source File: bbox_transform.py From Flow-Guided-Feature-Aggregation with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #10
Source File: geometry.py From AerialDetection with Apache License 2.0 | 5 votes |
def bbox_overlaps_cy(boxes, query_boxes): box_device = boxes.device boxes_np = boxes.cpu().numpy().astype(np.float) query_boxes_np = query_boxes.cpu().numpy().astype(np.float) ious = bbox_overlaps_cython(boxes_np, query_boxes_np) return torch.from_numpy(ious).to(box_device) # def bbox_overlaps_cy2(boxes, query_boxes): # box_device = boxes.device # boxes_np = boxes.cpu().numpy().astype(np.float) # query_boxes_np = query_boxes.cpu().numpy().astype(np.float) # ious = bbox_overlaps_cython_v2(boxes_np, query_boxes_np) # return torch.from_numpy(ious).to(box_device)
Example #11
Source File: bbox_transform.py From MANet_for_Video_Object_Detection with Apache License 2.0 | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #12
Source File: bbox_transform.py From kaggle-rsna18 with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #13
Source File: bbox_transform.py From kaggle-rsna18 with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #14
Source File: bbox_transform.py From Deep-Feature-Flow-Segmentation with MIT License | 5 votes |
def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes)
Example #15
Source File: geometry.py From AerialDetection with Apache License 2.0 | 5 votes |
def rbbox_overlaps_cy(boxes_np, query_boxes_np): # TODO: first calculate the hbb overlaps, for overlaps > 0, calculate the obb overlaps polys_np = RotBox2Polys(boxes_np).astype(np.float) query_polys_np = RotBox2Polys(query_boxes_np).astype(np.float) h_bboxes_np = poly2bbox(polys_np).astype(np.float) h_query_bboxes_np = poly2bbox(query_polys_np).astype(np.float) # hious ious = bbox_overlaps_cython(h_bboxes_np, h_query_bboxes_np) import pdb # pdb.set_trace() inds = np.where(ious > 0) for index in range(len(inds[0])): box_index = inds[0][index] query_box_index = inds[1][index] box = polys_np[box_index] query_box = query_polys_np[query_box_index] # calculate obb iou # import pdb # pdb.set_trace() overlap = polyiou.iou_poly(polyiou.VectorDouble(box), polyiou.VectorDouble(query_box)) ious[box_index][query_box_index] = overlap return ious
Example #16
Source File: geometry.py From AerialDetection with Apache License 2.0 | 5 votes |
def rbbox_overlaps_cy_warp(rbboxes, query_boxes): # TODO: first calculate the hbb overlaps, for overlaps > 0, calculate the obb overlaps # import pdb # pdb.set_trace() box_device = query_boxes.device query_boxes_np = query_boxes.cpu().numpy().astype(np.float) # polys_np = RotBox2Polys(boxes_np) # TODO: change it to only use pos gt_masks # polys_np = mask2poly(gt_masks) # polys_np = np.array(Tuplelist2Polylist(polys_np)).astype(np.float) polys_np = RotBox2Polys(rbboxes).astype(np.float) query_polys_np = RotBox2Polys(query_boxes_np) h_bboxes_np = poly2bbox(polys_np) h_query_bboxes_np = poly2bbox(query_polys_np) # hious ious = bbox_overlaps_cython(h_bboxes_np, h_query_bboxes_np) import pdb # pdb.set_trace() inds = np.where(ious > 0) for index in range(len(inds[0])): box_index = inds[0][index] query_box_index = inds[1][index] box = polys_np[box_index] query_box = query_polys_np[query_box_index] # calculate obb iou # import pdb # pdb.set_trace() overlap = polyiou.iou_poly(polyiou.VectorDouble(box), polyiou.VectorDouble(query_box)) ious[box_index][query_box_index] = overlap return torch.from_numpy(ious).to(box_device)
Example #17
Source File: geometry.py From AerialDetection with Apache License 2.0 | 5 votes |
def mask_overlaps(): pass # def bbox_overlaps_cy(boxes, query_boxes): # box_device = boxes.device # boxes_np = boxes.cpu().numpy().astype(np.float) # query_boxes_np = query_boxes.cpu().numpy().astype(np.float) # ious = bbox_overlaps_cython(boxes_np, query_boxes_np) # return torch.from_numpy(ious).to(box_device)