From c70a33882796b5bb37f1a1bf548a551e8403ea85 Mon Sep 17 00:00:00 2001 From: JumpPandaer <834662983@qq.com> Date: Wed, 13 Oct 2021 19:04:39 +0800 Subject: [PATCH] fix a bug with maskrcnn (#758) --- rcnn/MaskRcnnInferencePlugin.h | 2 +- rcnn/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rcnn/MaskRcnnInferencePlugin.h b/rcnn/MaskRcnnInferencePlugin.h index bbf591c..ddf97ff 100644 --- a/rcnn/MaskRcnnInferencePlugin.h +++ b/rcnn/MaskRcnnInferencePlugin.h @@ -25,7 +25,7 @@ int maskRcnnInference(int batchSize, class MaskRcnnInferencePlugin : public IPluginV2Ext { int _detections_per_im; int _output_size; - int _num_classes; + int _num_classes = 1; protected: void deserialize(void const* data, size_t length) { diff --git a/rcnn/README.md b/rcnn/README.md index 79aab10..ab94d5a 100644 --- a/rcnn/README.md +++ b/rcnn/README.md @@ -124,7 +124,7 @@ 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. +- do initializing for _pre_nms_topk in RpnNmsPlugin, _count in BatchedNmsPlugin and _num_classes in MaskRcnnInferencePlugin 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