Thanks a lot for your answer!
I thought that passing e.g. 8 images through resnet would not be so much slower than passing just 1, since they are processed in parallel,  but this does not seem to be the case. Do you have any idea how could I avoid this overhead?