The speed of Model process Image
QJieWang opened this issue · 2 comments
When I ran your code, I observed that the model could process 220 images per second without using the eye_refinement function. However, when the eye_refinement function was applied, the processing speed dropped to 2 images per second. These experiments were conducted using an NVIDIA 3090 GPU.
In your paper, you mentioned achieving the processing of 1440 images in 16.56 seconds. Could you please confirm if this result was obtained by using a batch size of 64 or any other batchsize?
Yes, it obtained by using a batch size of 64 (~10GB of GPU), and parallel process with joblib for eye_refinement function
Parallel(n_jobs=4)(delayed(eye_refinement)(img_mask_predict[idx, :, :], img_names[idx]) for idx in range(img_mask_predict.shape[0]))
I re-run it on my NVIDIA 3090 GPU (python 3.7, pytorch 1.13.1+cu117, opencv 3.4.2) with batch size of 64:
- Without eye_refinement ~2.6 seconds
- With eye_refinement ~13.4 seconds
Thank you very much for your professional response. It answered my questions and I wish you success in your work as well.