eric-yyjau/pytorch-superpoint

Homographic adapatation time is too long

jeethesh-pai opened this issue · 2 comments

Hi Eric,

The detector exporting time for homographic adaptation on MSCOCO dataset is taking too long. Is there any possibility to parallelize code here? Because GPU is not getting completely utilized during this process

Thanks a lot for help.

Hi @jeethesh-pai,

Thanks for your comment.
Unfortunately I didn't look into how to optimize the speed of homographic adaptation.
I think it is possible to optimize through making the process all in GPU.
Maybe the bottleneck is here:

pts = fe.getPtsFromHeatmap(outputs.detach().cpu().squeeze()) # (x,y, prob)

If you have some finding, please also share with me. Thank you!

Hi Eric,

You are correct. That is also a bottleneck during the process as it cannot be batched. But I found that there can significant increase in speed if you use Dataloader(pin_memory=True, prefetch_factor=2, num_workers=2) depending on the size of GPU for loading