INNER CODE UNIT · Python

_filter_dets

GeekAlexis/FastMOT · fastmot/detector.py:156

    def _filter_dets(det_out, tiles, topk, label_mask, max_area, thresh, scale_factor):
        detections = []
        tile_ids = []
        for tile_idx in range(len(tiles)):
            tile = tiles[tile_idx]
            w, h = get_size(tile)
            tile_offset = tile_idx * topk
            for det_idx in range(topk):
                offset = (tile_offset + det_idx) * 7
                label = int(det_out[offset + 1])
                conf = det_out[offset + 2]
                if conf < thresh:
                    break
                if label_mask[label]:
                    xmin = (det_out[offset + 3] * w + tile[0]) * scale_factor[0]
                    ymin = (det_out[offset + 4] * h + tile[1]) * scale_factor[1]
                    xmax = (det_out[offset + 5] * w + tile[0]) * scale_factor[0]
                    ymax = (det_out[offset + 6] * h + tile[1]) * scale_factor[1]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…