sxhxliang / detectron2_backbone

detectron2 backbone: resnet18, efficientnet, hrnet, mobilenet v2, resnest, bifpn
212 stars 41 forks source link

Question mAP and FPS #2

Open wenjun90 opened 4 years ago

wenjun90 commented 4 years ago

Dir sxhxliang,

Could I ask you the mAP and FPS you obtain with detectron_efficientNet on COCO dataset?

Thank you

sxhxliang commented 4 years ago
build_fcos_efficientnet_fpn_backbone
epoch:6 batchsize:8 gpus:4 coco results:
AP AP50 AP75 APs APm APl
29.017 45.281 30.911 16.333 31.203 38.439
wenjun90 commented 4 years ago

Could you share me FPS ou prediction time, please? Thank you so much.

sxhxliang commented 4 years ago

sorry, I have no time to do this, it is easy to measure the speed and you can test the model yourself.

def compute_speed(model, input_size, device, iteration):
    print('input_size', input_size)
    torch.cuda.set_device(device)
    torch.backends.cudnn.benchmark = True

    model.eval()
    model = model.cuda()

    input = torch.randn(*input_size).cuda()

    for _ in range(10):
        model(input)

    print('=========Speed Testing=========')
    torch.cuda.synchronize()
    torch.cuda.synchronize()
    t_start = time.time()
    for _ in range(iteration):
        model(input)
    torch.cuda.synchronize()
    torch.cuda.synchronize()
    elapsed_time = time.time() - t_start
    print(
        'Elapsed time: [%.2f s / %d iter]' % (elapsed_time, iteration))
    print('Speed Time: %.2f ms / iter    FPS: %.2f' % (
        elapsed_time / iteration * 1000, iteration / elapsed_time))