INNER CODE UNIT · Python

tile_size

GeekAlexis/FastMOT · fastmot/detector.py:124

        tile_size = np.array(self.model.INPUT_SHAPE[:0:-1])
        tiling_grid = np.array(self.tiling_grid)
        step_size = (1 - self.tile_overlap) * tile_size
        total_size = (tiling_grid - 1) * step_size + tile_size
        total_size = np.rint(total_size).astype(int)
        tiles = np.array([to_tlbr((c * step_size[0], r * step_size[1], *tile_size))
                          for r in range(tiling_grid[1]) for c in range(tiling_grid[0])])
        return tiles, tuple(total_size)

    def _merge_dets(self, detections, tile_ids):
        detections = np.fromiter(detections, DET_DTYPE, len(detections)).view(np.recarray)
        tile_ids = np.fromiter(tile_ids, int, len(tile_ids))
        if len(detections) == 0:
            return detections
        detections = self._merge(detections, tile_ids, self.batch_size, self.merge_thresh)
        return detections.view(np.recarray)

    @staticmethod

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…