def process(self, images, return_time=False):
    with torch.no_grad():
        output = self.model(images)[(- 1)]
        hm = output['hm'].sigmoid_()
        wh = output['wh']
        reg = (output['reg'] if self.opt.reg_offset else None)
        if self.opt.flip_test:
            hm = ((hm[0:1] + flip_tensor(hm[1:2])) / 2)
            wh = ((wh[0:1] + flip_tensor(wh[1:2])) / 2)
            reg = (reg[0:1] if (reg is not None) else None)
        torch.cuda.synchronize()
        forward_time = time.time()
        dets = ctdet_decode(hm, wh, reg=reg, cat_spec_wh=self.opt.cat_spec_wh, K=self.opt.K)
    if return_time:
        return (output, dets, forward_time)
    else:
        return (output, dets)
def process(self, images, return_time=False):
    with torch.no_grad():
        output = self.model(images)[(- 1)]
        hm = output['hm'].sigmoid_()
        wh = output['wh']
        reg = (output['reg'] if self.opt.reg_offset else None)
        if self.opt.flip_test:
            hm = ((hm[0:1] + flip_tensor(hm[1:2])) / 2)
            wh = ((wh[0:1] + flip_tensor(wh[1:2])) / 2)
            reg = (reg[0:1] if (reg is not None) else None)
        torch.cuda.synchronize()
        forward_time = time.time()
        dets = ctdet_decode(hm, wh, reg=reg, cat_spec_wh=self.opt.cat_spec_wh, K=self.opt.K)
    if return_time:
        return (output, dets, forward_time)
    else:
        return (output, dets)