There are also pre-built ubuntu docker images available on docker hub.
docker pull vsnm/lensai_profiler_cpp:latest
docker run -it --rm vsnm/lensai_profiler_cpp
Once the library is built and successfully installed then integrate the profiling code in your inference script
Define the configuration file based on the output from the previous step of computing the thresholds.
Please keep all the metrics that need to be computed,
if deleted the corresponding metrics are not computed,
use NaN to disable sampling and just compute the metrics.
The metrics always a lower and upper threshold is defined to capture the samples at the tails of the distribution. default values for the confidence are 0.01 and 0.9 meaning it samples the images that model is 99.9 % confident or above or 1 % confident or below.
define the frequency at which you want to save the metrics
int saveIntervalSec =1; int img_channels =3; // Number of Channels