Low fps

I am using a python script that I downloaded from pyimagesearch.com, facial recognition with open cv, I would like to run this program with the gpu as a test, since when I launch it from the terminal without more, it works with low fps, How can I do that? I’ve searched everywhere and I can’t find a solution (I already installed jetpack and all the libraries needed to run the python script)