打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
【寒武纪硬件产品型号】必填*:MLU220edge
【使用操作系统】必填*:ubuntu20.04
【使用驱动版本】必填*:CNRT: 4.10.7 a16cc83”
【出错信息】必填*:我按文档配置cnstream的json文件如下:
未过滤配置:====================================================================================================
{
"detector" : {
"class_name" : "cnstream::Inferencer2",
"parallelism" : 2,
"max_input_queue_size" : 20,
"custom_params" : {
"model_path" : "../../../data/models/yolov5_b4c4_rgb_mlu220.cambricon",
"func_name" : "subnet0",
"preproc_name" : "VideoPreprocYolov5",
"postproc_name" : "VideoPostprocYolov5",
"keep_aspect_ratio" : "true",
"model_input_pixel_format" : "RGB24",
"batching_timeout" : 100,
"threshold" : 0.6,
"engine_num" : 2,
"infer_interval" : 1,
"device_id" : 0
}
}
}
标签未换,这个问题不大
过滤配置===========================================================================================================
{
"detector" : {
"class_name" : "cnstream::Inferencer2",
"parallelism" : 2,
"max_input_queue_size" : 20,
"custom_params" : {
"model_path" : "../../../data/models/yolov5_b4c4_rgb_mlu220.cambricon",
"func_name" : "subnet0",
"preproc_name" : "VideoPreprocYolov5",
"postproc_name" : "VideoPostprocYolov5",
"keep_aspect_ratio" : "true",
"model_input_pixel_format" : "RGB24",
"batching_timeout" : 100,
"threshold" : 0.6,
"engine_num" : 2,
"infer_interval" : 1,
" _infer" : "true", // 设置过滤
"obj_filter_name" : "CarFilter", // 设置汽车过滤
"device_id" : 0
}
}
}
控制台信息:
运行的命令:../../bin/cns_launcher --data_path ../../files.list_video --src_ _rate 25 --config_fname ./config.json --log_to_stderr=true
CNRT: 4.10.7 a16cc83
WARNING: Logging before InitCNStreamLogging() is written to STDERR
CNSTREAM REFLEX_ I0628 17:08:04.078861 177549] Register named [PreprocLprnet]
CNSTREAM REFLEX_ I0628 17:08:04.079609 177549] Register named [PreprocCpu]
CNSTREAM REFLEX_ I0628 17:08:04.079747 177549] Register named [ObjPreprocCpu]
CNSTREAM REFLEX_ I0628 17:08:04.079860 177549] Register named [PreprocYolov3]
CNSTREAM REFLEX_ I0628 17:08:04.079983 177549] Register named [PreprocYolov5]
CNSTREAM REFLEX_ I0628 17:08:04.080096 177549] Register named [VideoPreprocCpu]
CNSTREAM REFLEX_ I0628 17:08:04.080240 177549] Register named [VideoObjPreprocCpu]
CNSTREAM REFLEX_ I0628 17:08:04.080358 177549] Register named [VideoPreprocYolov3]
CNSTREAM REFLEX_ I0628 17:08:04.080482 177549] Register named [VideoPreprocYolov5]
CNSTREAM REFLEX_ I0628 17:08:04.080632 177549] Register named [PostprocClassification]
CNSTREAM REFLEX_ I0628 17:08:04.080775 177549] Register named [ObjPostprocClassification]
CNSTREAM REFLEX_ I0628 17:08:04.080891 177549] Register named [PostprocLprnet]
CNSTREAM REFLEX_ I0628 17:08:04.081015 177549] Register named [PostprocMSSDPlateDetection]
CNSTREAM REFLEX_ I0628 17:08:04.081126 177549] Register named [PostprocSsd]
CNSTREAM REFLEX_ I0628 17:08:04.081261 177549] Register named [PostprocVehicleCts]
CNSTREAM REFLEX_ I0628 17:08:04.081399 177549] Register named [PostprocYolov3]
CNSTREAM REFLEX_ I0628 17:08:04.081511 177549] Register named [PostprocYolov5]
CNSTREAM REFLEX_ I0628 17:08:04.081660 177549] Register named [VideoPostprocClassification]
CNSTREAM REFLEX_ I0628 17:08:04.081797 177549] Register named [VideoObjPostprocClassification]
CNSTREAM REFLEX_ I0628 17:08:04.081915 177549] Register named [VideoPostprocSsd]
CNSTREAM REFLEX_ I0628 17:08:04.082049 177549] Register named [VideoPostprocYolov3]
CNSTREAM REFLEX_ I0628 17:08:04.082166 177549] Register named [VideoPostprocYolov3MM]
CNSTREAM REFLEX_ I0628 17:08:04.082304 177549] Register named [VideoPostprocYolov5]
CNSTREAM REFLEX_ I0628 17:08:04.082415 177549] Register named [CarFilter]
CNSTREAM REFLEX_ I0628 17:08:04.082520 177549] Register named [PlateFilter]
CNSTREAM REFLEX_ I0628 17:08:04.082634 177549] Register named [VehicleFilter]
CNSTREAM REFLEX_ I0628 17:08:04.083153 177549] Register named [PostprocBody25Pose]
CNSTREAM REFLEX_ I0628 17:08:04.083294 177549] Register named [PostprocCOCOPose]
CNSTREAM REFLEX_ I0628 17:08:04.083635 177549] Register named [DefaultKafkaHandler]
CNSTREAM DEMO I0628 17:08:04.083973 177549] CNSTREAM VERSION:v6.2.0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0628 17:08:04.198666 177549 mlu_context.cpp:130] [EasyDK Device] [CnrtInitTool] Cambricon runtime init success.
I0628 17:08:04.203487 177549 model_manager.cpp:172] [EasyDK InferServer] [ModelManager] Load model from file: ./../configs/../../../data/models/yolov5_b4c4_rgb_mlu220.cambricon
I0628 17:08:04.328605 177549 model_cnrt.cpp:213] [EasyDK InferServer] [Model] Load function from offline model succeeded
CNSTREAM CORE I0628 17:08:04.394804 177549] Pipeline[MyPipeline] Start
CNSTREAM CORE I0628 17:08:04.396076 177549] [stream_0]: Stream opening...
CNSTREAM CORE I0628 17:08:04.396694 177549] Add stream success, stream id : [stream_0]
CNSTREAM SOURCE I0628 17:08:04.450706 177594] [stream_0]: Got video info.
CNSTREAM SOURCE I0628 17:08:04.451182 177594] [stream_0]: Begin create decoder
CNSTREAM SOURCE I0628 17:08:04.473217 177594] [stream_0]: Finish create decoder
CNSTREAM VideoEncoderMlu I0628 17:08:04.724020 177592] VideoEncoderMlu200(1920x1080, NV12, H264)
CNSTREAM RtspServer I0628 17:08:04.726212 177600] Stream URL "rtsp://192.168.1.60:9554/live"
CNSTREAM VideoEncoderMlu I0628 17:08:04.850968 177602] ReceivePacket() got parameter sets, size=36
********************** Performance Print Start (Whole) **********************
=========================== Pipeline: [MyPipeline] ===========================
---------------------- Module: [MyPipeline/decode/source] ----------------------
----------Process Name: [PROCESS]
[Counter]: 35, [Throughput]: 18.9955fps
---------------- Module: [MyPipeline/ _detection/detector] ----------------
----------Process Name: [PROCESS]
[Counter]: 35, [Throughput]: 359.321fps
------------------ Module: [MyPipeline/osd_label_map_coco/osd] -----------------
----------Process Name: [PROCESS]
[Counter]: 32, [Throughput]: 67.1891fps
--------------------- Module: [MyPipeline/sinker/rtsp_sink] -------------------- (slowest)
----------Process Name: [PROCESS]
[Counter]: 20, [Throughput]: 12.7911fps
----------------------------------- Overall ----------------------------------
[Counter]: 20, [Throughput]: 10.8604fps
*********************** Performance Print End (Whole) ***********************
CarFilter的代码:
【当前已做了哪些信息确认】选填:
确认是按文档一步步做的,而且都是官方代码和素材。
我的初衷是想要做区域过滤,只对感兴趣的区域做推理,所以试了下obj filter,发现不行。如果可行,是不是我把CarFilter中的代码换成区域过滤代码,返回true即可实现区域过滤?
希望大牛帮我解决一下。谢谢!
【参考配置文档链接】:基于推理服务的推理模块 — 寒武纪CNStream用户手册 6.2.0 文档 (cambricon.com)
【相关日志文档】选填
如有,可附件
【出错代码链接】选填:
github的或gitee的代码的链接,
热门帖子
精华帖子