running the executable from terminal is slower than running it from qt creator
-
Hello all,
this is my first question.
I'm developping an application using opencv, dlib and qt in c++. when i run the code from qt creator i get a result of 15FPS. however, when i run the executable from terminal i only get 8FPS. I noticed that in both modes i'm using the same amount of ressources.
I would like you to help me find the source of the problem.thank you in advance.
-
i tried to track the problem by running each section of the app alone. it seems like the issue came from the face detection model "res10_300x300_ssd_iter_140000.caffemodel". All i hade to do is change the input size of the model and the executable runs with the same fps as running from qt creator (except that its slower now since i changed the input size lol).
What can be the origin of this strange behavior ? -
Hi and welcome to devnet,
Are you sure the same set of libraries are loaded between Qt Creator and the terminal ?
Maybe some environmental variable that are not the same ? -
yes I'm pretty sure the same set of libraries are loaded. for the environmental variables I'm not really sure.
I don't know if this is going to help or not but i tried to run the code on a docker container in the same machine from qt creator and i get the same results as the terminal.
where can i check the environmental variables for the executable?
thank you in advance. -
i tried to track the problem by running each section of the app alone. it seems like the issue came from the face detection model "res10_300x300_ssd_iter_140000.caffemodel". All i hade to do is change the input size of the model and the executable runs with the same fps as running from qt creator (except that its slower now since i changed the input size lol).
What can be the origin of this strange behavior ? -
As I suggested, check the librairies that are loaded when running on the command line.
You can also use a software line heaptrack to get some insight about what is happening within your application.