wutianyiRosun/CGNet

Speed Question(Wrong Speed Test)

lxtGH opened this issue · 11 comments

lxtGH commented

Hi!! Thanks for sharing your codes.
I have seen your result in your paper about bi-seg. I tried to reproduce the result of bi-seg, however I only got 71%IOU(single scale), have you successfully got 74% IOU results on that? May be he use ms test.
what is your advantages compared with bi-seg? More Light (Less memory cost)?

lxtGH commented

Hi! @wutianyiRosun
There are two questions I want to ask:

  1. I test your model with 1024 * 2048 as input images. However I only got 9.5 fps on single 1080TI.
    I use the code like the following
    start = time.time()
    out = model(img)
    torch.cuda.synchronize()
    print('Speed: {} fps.'.format(1.0/(time.time()-start)))

  2. In your paper, ICnet only 16 fps which is not consistent with his paper. (30 fps)
    I don't know why. The gap between K80 and 1080TI is such large ??
    Is my testing method wrong? I want to know the way you evalute your model for speed.
    Also, I use my test method to test ESP-net which result in nearly the same as your paper report(49 fps)

lxtGH commented

I think it is wrong speed testing.

Hi, @lxtGH
A1: The speed we report is the average speed on the verification set. What is your cuda and cudnn version?
A2: The speed of ICNet is tested on K80, The paper of ICNet reported 30 fps, which is tested on 1080TI. The speed between them is about two to three times the difference.

lxtGH commented

Hi , @wutianyiRosun
Did you use this line ?
torch.cuda.synchronize() for speed test?

@lxtGH @wutianyiRosun
I have a problem:
Pytorch DwConv's implement is not good,it's very slow. The CGNet'paper result is based on Pytorch?

lxtGH commented

@wutianyiRosun If you didn't use the line of code, your speed reported in your paper is wrong.
@yyfyan What speed results you get ?

I got the same result as you, a single 1080Ti got about 9 FPS. @lxtGH
And if I didn't use torch.cuda.synchronize()
The FPS will increase to ~70Fps, this code is necessary.

lxtGH commented

@Reagan1311 Yes, GPU and CPU must synchronize (CPU must wait until the end of GPU forwarding )

10FPS only! I test it on 1080Ti.
I suggest that you change your arxiv paper.

I met the same question. I hope I can get an answer. Thank you.

@meteorshowers, @LinZhuoChen We will update in the next few days.