Hi @leo2105,
It’s not because it’s python. The root cause is you give absolute path to the model, i.e
model-engine-file=/opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
When you give it path started with “/”, it will run into below “if (file_path[0] == ‘/’) {” and fail on realpath() function, and then report Error - “Error: Could not parse model engine file path” because the engine file does not exist.
Maybe this is a bug of DeepStream, we will discuss this internally,
Thanks for chasing this issue!
File: /opt/nvidia/deepstream/deepstream-5.0/sources/gst-plugins/gst-nvinfer/gstnvinfer_property_parser.cpp
static gboolean
get_absolute_file_path (
const gchar * cfg_file_path, const gchar * file_path,
char *abs_path_str)
{
gchar abs_cfg_path[PATH_MAX + 1];
gchar abs_real_file_path[PATH_MAX + 1];
gchar *abs_file_path;
gchar *delim;/* Absolute path. No need to resolve further. /
if (file_path[0] == ‘/’) {
/ Check if the file exists, return error if not. */
if (!realpath (file_path, abs_real_file_path)) {
return FALSE;
}
g_strlcpy (abs_path_str, abs_real_file_path, _PATH_MAX);
return TRUE;
}
…