Skip to content

Commit 7b85cfd

Browse files
authored
fix bugs (wang-xinyu#602)
see note in README
1 parent 101e603 commit 7b85cfd

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

rcnn/BatchedNmsPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class BatchedNmsPlugin : public IPluginV2Ext {
3030
float _nms_thresh;
3131
int _detections_per_im;
3232

33-
size_t _count;
33+
size_t _count = 1;
3434

3535
protected:
3636
void deserialize(void const* data, size_t length) {

rcnn/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ 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.
128+
127129
## Quantization
128130

129131
1. quantizationType:fp32,fp16,int8. see BuildRcnnModel(rcnn.cpp line 276) for detail.

rcnn/RpnNmsPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class RpnNmsPlugin : public IPluginV2Ext {
2828
float _nms_thresh;
2929
int _post_nms_topk;
3030

31-
size_t _pre_nms_topk;
31+
size_t _pre_nms_topk = 1;
3232
mutable int size = -1;
3333

3434
protected:

0 commit comments

Comments
 (0)