diff --git a/rcnn/BatchedNmsPlugin.h b/rcnn/BatchedNmsPlugin.h index 476a67b..49467e8 100644 --- a/rcnn/BatchedNmsPlugin.h +++ b/rcnn/BatchedNmsPlugin.h @@ -30,7 +30,7 @@ class BatchedNmsPlugin : public IPluginV2Ext { float _nms_thresh; int _detections_per_im; - size_t _count; + size_t _count = 1; protected: void deserialize(void const* data, size_t length) { diff --git a/rcnn/README.md b/rcnn/README.md index c4b4bb1..7ea3dd1 100644 --- a/rcnn/README.md +++ b/rcnn/README.md @@ -124,6 +124,8 @@ sudo ./rcnn -d faster.engine ../samples - you can build fasterRcnn with maskRcnn weights file. +- do initializing for _pre_nms_topk in RpnNmsPlugin and _count in BatchedNmsPlugin inside class to prevent error assert, because the configurePlugin function is implemented after clone() and before serialize(). one can also set it through constructor. + ## Quantization 1. quantizationType:fp32,fp16,int8. see BuildRcnnModel(rcnn.cpp line 276) for detail. diff --git a/rcnn/RpnNmsPlugin.h b/rcnn/RpnNmsPlugin.h index 792e5e9..7deb18e 100644 --- a/rcnn/RpnNmsPlugin.h +++ b/rcnn/RpnNmsPlugin.h @@ -28,7 +28,7 @@ class RpnNmsPlugin : public IPluginV2Ext { float _nms_thresh; int _post_nms_topk; - size_t _pre_nms_topk; + size_t _pre_nms_topk = 1; mutable int size = -1; protected: