def compute_multibox_transform_loc(attrs, inputs, _, target): """Compute definition of multibox_detection""" clip = bool(get_const_int(attrs.clip)) threshold = get_const_float(attrs.threshold) variances = get_float_tuple(attrs.variances) return topi.vision.ssd.multibox_transform_loc( inputs[0], inputs[1], inputs[2], clip, threshold, variances)
def compute_get_valid_counts(attrs, inputs, _, target): """Compute definition of get_valid_counts""" score_threshold = get_const_float(attrs.score_threshold) id_index = get_const_int(attrs.id_index) score_index = get_const_int(attrs.score_index) return topi.vision.get_valid_counts(inputs[0], score_threshold, id_index, score_index)
def compute_nms(attrs, inputs, _, target): """Compute definition of nms""" overlap_threshold = get_const_float(attrs.overlap_threshold) force_suppress = bool(get_const_int(attrs.force_suppress)) topk = get_const_int(attrs.topk) return [ topi.vision.nms(inputs[0], inputs[1], overlap_threshold, force_suppress, topk) ]
def _compute_nms(attrs, inputs, out_type): return_indices = bool(get_const_int(attrs.return_indices)) max_output_size = get_const_int(attrs.max_output_size) iou_threshold = get_const_float(attrs.iou_threshold) force_suppress = bool(get_const_int(attrs.force_suppress)) top_k = get_const_int(attrs.top_k) coord_start = get_const_int(attrs.coord_start) score_index = get_const_int(attrs.score_index) id_index = get_const_int(attrs.id_index) invalid_to_bottom = bool(get_const_int(attrs.invalid_to_bottom)) return [topi_compute(inputs[0], inputs[1], max_output_size, iou_threshold, force_suppress, top_k, coord_start, score_index, id_index, return_indices, invalid_to_bottom)]
def compute_nms(attrs, inputs, _, target): """Compute definition of nms""" return_indices = bool(get_const_int(attrs.return_indices)) max_output_size = get_const_int(attrs.max_output_size) iou_threshold = get_const_float(attrs.iou_threshold) force_suppress = bool(get_const_int(attrs.force_suppress)) top_k = get_const_int(attrs.top_k) id_index = get_const_int(attrs.id_index) invalid_to_bottom = bool(get_const_int(attrs.invalid_to_bottom)) return [ topi.vision.non_max_suppression(inputs[0], inputs[1], max_output_size, iou_threshold, force_suppress, top_k, id_index, return_indices, invalid_to_bottom) ]
def compute_nms(attrs, inputs, _, target): """Compute definition of nms""" return_indices = bool(get_const_int(attrs.return_indices)) max_output_size = get_const_int(attrs.max_output_size) iou_threshold = get_const_float(attrs.iou_threshold) force_suppress = bool(get_const_int(attrs.force_suppress)) top_k = get_const_int(attrs.top_k) coord_start = get_const_int(attrs.coord_start) score_index = get_const_int(attrs.score_index) id_index = get_const_int(attrs.id_index) invalid_to_bottom = bool(get_const_int(attrs.invalid_to_bottom)) return [ topi.vision.non_max_suppression(inputs[0], inputs[1], max_output_size, iou_threshold, force_suppress, top_k, coord_start, score_index, id_index, return_indices, invalid_to_bottom) ]
def _compute_get_valid_counts(attrs, inputs, out_type): score_threshold = get_const_float(attrs.score_threshold) id_index = get_const_int(attrs.id_index) score_index = get_const_int(attrs.score_index) return topi_compute(inputs[0], score_threshold, id_index, score_index)
def compute_get_valid_counts(attrs, inputs, _, target): """Compute definition of get_valid_counts""" score_threshold = get_const_float(attrs.score_threshold) return topi.vision.get_valid_counts(inputs[0], score_threshold)