Skip to content

Commit c70a338

Browse files
authored
fix a bug with maskrcnn (wang-xinyu#758)
1 parent 7c1a145 commit c70a338

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rcnn/MaskRcnnInferencePlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int maskRcnnInference(int batchSize,
2525
class MaskRcnnInferencePlugin : public IPluginV2Ext {
2626
int _detections_per_im;
2727
int _output_size;
28-
int _num_classes;
28+
int _num_classes = 1;
2929

3030
protected:
3131
void deserialize(void const* data, size_t length) {

rcnn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ sudo ./rcnn -d faster.engine ../samples
124124

125125
- you can build fasterRcnn with maskRcnn weights file.
126126

127-
- 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.
127+
- 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.
128128

129129
## Quantization
130130

0 commit comments

Comments
 (0)