[英]unable to retrieve outputs from deepstream custom parser
i have a detection task using deepstream custom bounding box parser.我有一个使用 deepstream 自定义边界框解析器的检测任务。 I store the inference result in
我将推理结果存储在
std::vector<NvDsInferParseObjectInfo>& objectList
in such a way:以这样的方式:
NvDsInferObjectDetectionInfo object;
object. classId = static_cast<unsigned int>(class);
object.left = static_cast<unsigned int>(left);
object.top = static_cast<unsigned int>(top);
object.width = static_cast<unsigned int>(width);
object.height = static_cast<unsigned int>(height);
object.detectionConfidence = static_cast<float>(score);
objectList.push_back(object);
I printed out the above values, they do exist.我打印出上述值,它们确实存在。 However, when i try to print them out in my program through:
但是,当我尝试通过以下方式在我的程序中打印它们时:
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
l_frame = batch_meta.frame_meta_list
frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
frame_number=frame_meta.frame_num
num_rects = frame_meta.num_obj_meta
l_obj=frame_meta.obj_meta_list
print(l_obj)
print(num_rects)
It shows None or 0. No output at all.它显示 None 或 0。根本没有输出。
Any idea on which part i did wrongly?知道我做错了哪一部分吗? Thanks
谢谢
Does num_rects
show 0 too ? num_rects
显示 0 吗?
Be sure to set detection-threshold
in the config file of detector Also make sure the bounding boxes lie in the roi property (if set) in the config file确保在
detection-threshold
器的配置文件中设置detection-threshold
同时确保边界框位于配置文件中的 roi 属性(如果设置)中
If detector is not primary detector then make sure to set the operate-on-gie
property in the config file.如果检测器不是主要检测器,请确保在配置文件中设置
operate-on-gie
属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.