katotetsuro / roi_align

RoI Align with Chainer
Apache License 2.0
5 stars 2 forks source link

Improve performance #1

Open katotetsuro opened 6 years ago

katotetsuro commented 6 years ago

After I changed pooling layer from RoI Pooling to RoI Align, training time take longer abount 2x.

yukitsuji commented 6 years ago

Did you improve the computation time? or do you have any idea?

katotetsuro commented 6 years ago

Hi, I checked forward/backward computation time by this script. (not strict one) times are roughly same. https://github.com/katotetsuro/roi_align/blob/master/test_performance.py

At practical case, RoIAlign is about 10% slower than RoIPooling in training of my implementation of MaskRCNN https://github.com/katotetsuro/chainer-maskrcnn

Caffe2 implementation might be better than mine. It starts from for each RoI loop. https://github.com/caffe2/caffe2/blob/master/caffe2/operators/roi_align_gradient_op.cu

yukitsuji commented 6 years ago

Thank you for you reply.

I think if you want to measure gpu time of roi align, you should synchronize gpus. I usually measure gpu time like below. https://github.com/yukitsuji/Yolo_v2_chainer/blob/master/utils/timer.py

katotetsuro commented 6 years ago

Thanks! I'll check later.