tusen-ai / simpledet

A Simple and Versatile Framework for Object Detection and Instance Recognition
Apache License 2.0
3.08k stars 488 forks source link

quantization problem #287

Open Liu-ShiSan opened 4 years ago

Liu-ShiSan commented 4 years ago

Describe the bug The network I use is cascade_r101v1_fpn_1x.py, I then use Quantization during Training method, quantified cascade_r101v1_fpn_1x.py based on the quantization Settings of the faster_r50v1c4_c5_512roi_1x.py network in the int8 folder. The quantization Settings are exactly the same. Running detection_test.py after the training is complete produced an error.

Screenshots or stack traces Traceback (most recent call last): File "detection_test.py", line 137, in mod.set_params(arg_params, aux_params, allow_extra=False) File "/content/drive/My Drive/simpledet/core/detection_module.py", line 370, in set_params allow_extra=allow_extra) File "/content/drive/My Drive/simpledet/core/detection_module.py", line 333, in init_params _impl(desc, arr, aux_params) File "/content/drive/My Drive/simpledet/core/detection_module.py", line 320, in _impl raise RuntimeError("%s is not presented" % name) RuntimeError: bbox_fc1_1st_3rd_relu_minmax is not presented

Which config are you using cascade_r101v1_fpn_1x.py Which dataset are you using Own coco-formatted data set Hardware info CPU, GPU, Storage(Disk or NFS)

Software info cuda=10.1 OS verison

How did you set up your MXNet for SimpleDet

Additional context Add any other context about the problem here.

huangzehao commented 4 years ago

@XiaotaoChen It seems that @TangjikedeJ doesn't modify the symbol of cascade rcnn bbox head.

XiaotaoChen commented 4 years ago

Hi @TangjikedeJ As @huangzehao says. This error caused by the mismatch between train symbol and test symbol. there may be some mistakes in generate test symbol code. I check the train.json and test.json. there are no bbox_fc1_1st_3rd_relu node in train.json , but exists in test.json. Quantize node was attached after bbox_fc1_1st_3rd_relu node in test stage, But not in train stage. So the parameter of bbox_fc1_1st_3rd_relu_minmax don't exist in params.