Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成trt文件可以前向推理,map值正常,但是pkl文件非常多0坐标框? #905

Closed
Hou-MY opened this issue Aug 16, 2022 · 10 comments · Fixed by #920
Closed
Assignees

Comments

@Hou-MY
Copy link

Hou-MY commented Aug 16, 2022

我使用mmdeploy生成了一个TRT文件,生成过程没有报错,生成过程中传了一个demo图片,识别正确。使用生成的engine进行前向推理,maP值正常,值为0.562(使用pth前向推理map值差不多,说明没有生成错误)同时生成pkl文件,单独拿出pkl文件测maP值为0,load pkl 后都是四个坐标为0的框,置信度全部一样。为什么使用test.py可以测maP,但是pkl生成错误?
pkl中的结果矩阵如下:
[array([[0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222], [0. , 0. , 0. , 0. , 0.06027222]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([[312.32 , 739.2 , 360.32 , 777.6 , 0.9550781]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32)]

@tpoisonooo
Copy link
Collaborator

@lvhan028

@mm-assistant
Copy link

mm-assistant bot commented Aug 16, 2022

We recommend using English or English & Chinese for issues so that we could have broader discussion.

@Hou-MY
Copy link
Author

Hou-MY commented Aug 16, 2022

I generated a TRT file using mmdeploy. There was no error in the generation process. A demo image was passed during the generation process, and the identification was correct. When i use the generated engine for inference, the mAP is normal, with a value of 0.562 (the mAP value of PTH is similar, indicating that there is no generation error). At the same time, the pkl file is generated. After loading pkl, there are four boxes with coordinates of 0, and the confidence is all the same. And i evaluated the pkl,mAP=0. I used tools/test.py with"--metrics bbox--out xx.pkl". How can i solve this problem?
The result matrix in pkl is as above:

@RunningLeon
Copy link
Collaborator

@Hou-MY Hi, pls. post the full script and outputs of python tools/check_env.py here for reproduce.

@Hou-MY
Copy link
Author

Hou-MY commented Aug 17, 2022

`
(mmdeploy) nwpuer@nwpuer-System-Product-Name:~/htf20210909/mmdeploy$ python tools/check_env.py
2022-08-17 11:30:47,696 - mmdeploy - INFO -

2022-08-17 11:30:47,696 - mmdeploy - INFO - Environmental information
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
2022-08-17 11:30:47,780 - mmdeploy - INFO - sys.platform: linux
2022-08-17 11:30:47,780 - mmdeploy - INFO - Python: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0]
2022-08-17 11:30:47,780 - mmdeploy - INFO - CUDA available: True
2022-08-17 11:30:47,780 - mmdeploy - INFO - GPU 0,1: GeForce RTX 3080
2022-08-17 11:30:47,780 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda
2022-08-17 11:30:47,780 - mmdeploy - INFO - NVCC: Cuda compilation tools, release 11.0, V11.0.194
2022-08-17 11:30:47,780 - mmdeploy - INFO - GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
2022-08-17 11:30:47,781 - mmdeploy - INFO - PyTorch: 1.9.0+cu111
2022-08-17 11:30:47,781 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • C++ Version: 201402
  • Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.1.2 (Git Hash 98be7e8afa711dc9b66c8ff3504129cb82013cdb)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • CUDA Runtime 11.1
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
  • CuDNN 8.0.5
  • Magma 2.5.2
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.9.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

2022-08-17 11:30:47,781 - mmdeploy - INFO - TorchVision: 0.10.0+cu111
2022-08-17 11:30:47,781 - mmdeploy - INFO - OpenCV: 4.6.0
2022-08-17 11:30:47,781 - mmdeploy - INFO - MMCV: 1.6.0
2022-08-17 11:30:47,781 - mmdeploy - INFO - MMCV Compiler: GCC 7.3
2022-08-17 11:30:47,781 - mmdeploy - INFO - MMCV CUDA Compiler: 11.1
2022-08-17 11:30:47,781 - mmdeploy - INFO - MMDeploy: 0.7.0+HEAD
2022-08-17 11:30:47,781 - mmdeploy - INFO -

2022-08-17 11:30:47,781 - mmdeploy - INFO - Backend information
2022-08-17 11:30:48,039 - mmdeploy - INFO - onnxruntime: 1.8.1 ops_is_avaliable : True
2022-08-17 11:30:48,054 - mmdeploy - INFO - tensorrt: 8.2.3.0 ops_is_avaliable : True
2022-08-17 11:30:48,069 - mmdeploy - INFO - ncnn: None ops_is_avaliable : False
2022-08-17 11:30:48,073 - mmdeploy - INFO - pplnn_is_avaliable: False
2022-08-17 11:30:48,073 - mmdeploy - INFO - openvino_is_avaliable: False
2022-08-17 11:30:48,082 - mmdeploy - INFO - snpe_is_available: False
2022-08-17 11:30:48,082 - mmdeploy - INFO -

2022-08-17 11:30:48,082 - mmdeploy - INFO - Codebase information
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmdet: 2.25.1
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmseg: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmcls: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmocr: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmedit: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmdet3d: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmpose: None
2022-08-17 11:30:48,083 - mmdeploy - INFO - mmrotate: None
`
@RunningLeon

@songhc8
Copy link

songhc8 commented Aug 17, 2022

@Hou-MY 你好,请问你有测试生成int8的量化模型吗,需要提供训练数据用来做calibration吗?

@RunningLeon RunningLeon self-assigned this Aug 17, 2022
@RunningLeon
Copy link
Collaborator

RunningLeon commented Aug 17, 2022

@Hou-MY Hi, could you post here how you run tools/test.py with arguments from mmdeploy?

Followed your pipeline and tested OK with ssd + tensorrt

In [1]: import mmcv
In [2]: outputs = mmcv.load('./work-dirs/mmdet/ssd/trt/res.pkl')

In [3]: type(outputs)
Out[3]: list
In [4]: len(outputs)
Out[4]: 4952
In [5]: type(outputs[0])
Out[5]: list

In [6]: len(outputs[0])
Out[6]: 80

In [7]: print(outputs[0])
[array([[6.48493271e+01, 3.19012070e+01, 1.41877167e+02, 1.06882179e+02,
        9.98954058e-01],
       [1.67039307e+02, 3.10165997e+01, 1.85573547e+02, 6.95154190e+01,
        3.44001688e-02],
       [1.35310654e+02, 3.20123520e+01, 1.52592178e+02, 6.87356415e+01,
        3.41515653e-02],
       [1.45665421e+02, 3.12940063e+01, 1.62749252e+02, 6.88725662e+01,
        3.39105092e-02],
       [1.56150742e+02, 3.08635025e+01, 1.73992905e+02, 6.87741165e+01,
        3.37785184e-02],
       [9.47952576e+01, 3.40964775e+01, 1.43000870e+02, 7.34800720e+01,
        3.20897251e-02],
       [1.00446892e+02, 4.11660652e+01, 1.21886559e+02, 7.58583145e+01,
        3.08311991e-02],
       [1.09481163e+02, 3.74757919e+01, 1.34066101e+02, 6.61124039e+01,
        3.02050821e-02],
       [3.27441597e+01, 9.21681061e+01, 7.25298233e+01, 1.45000000e+02,
        2.95834895e-02],
       [1.23286896e+02, 3.38118439e+01, 1.42542221e+02, 6.87777634e+01,
        2.94851456e-02],
       [1.95260162e+01, 2.73890762e+01, 9.94419556e+01, 8.84846497e+01,
        2.85611786e-02],
       [6.89621964e+01, 3.32500839e+01, 1.18487389e+02, 7.28858261e+01,
        2.69048605e-02],
       [6.36150055e+01, 1.14901535e+02, 7.00188446e+01, 1.29407196e+02,
        2.65637413e-02],
       [5.75615845e+01, 1.15085670e+02, 6.46328354e+01, 1.29039764e+02,
        2.63400786e-02],
       [2.78087406e+01, 2.68180161e+01, 4.64041901e+01, 6.14650459e+01,
        2.60015167e-02],
       [6.13514862e+01, 2.91798630e+01, 7.87175140e+01, 6.09998741e+01,
        2.54254024e-02],
       [7.03263474e+01, 3.42780037e+01, 8.97751770e+01, 7.14263687e+01,
        2.50393283e-02],
       [5.41073952e+01, 1.19303848e+02, 5.93064842e+01, 1.31417572e+02,
        2.48819087e-02],
       [1.63587132e+01, 2.64054470e+01, 3.54227600e+01, 6.14783134e+01,
        2.47350410e-02],
       [1.33043625e+02, 2.68779354e+01, 1.86463455e+02, 8.35660324e+01,
        2.47167256e-02],
       [1.55861191e+02, 4.81029663e+01, 1.73916855e+02, 8.35020752e+01,
        2.45563406e-02],
       [8.02994919e+01, 3.92994270e+01, 1.00746857e+02, 7.99437408e+01,
        2.38926671e-02],
       [1.09849205e+02, 2.79747124e+01, 1.54042770e+02, 6.17698822e+01,
        2.38230452e-02],
       [9.07734375e+01, 3.54506226e+01, 1.11063080e+02, 7.07339325e+01,
        2.33138539e-02],
       [7.04593430e+01, 3.86492310e+01, 8.77060623e+01, 5.30874710e+01,
        2.32907124e-02],
       [1.77755356e+02, 3.01806545e+01, 1.96127136e+02, 7.07256393e+01,
        2.31694616e-02],
       [5.07586517e+01, 2.76725388e+01, 6.78725052e+01, 6.10758934e+01,
        2.31371708e-02],
       [1.65917263e+01, 9.70911598e+00, 3.48177147e+01, 4.54291458e+01,
        2.29934752e-02],
       [3.79014091e+01, 2.15776711e+01, 7.53713379e+01, 9.57173615e+01,
        2.27090623e-02],
       [1.55751144e+02, 1.72064495e+01, 1.74567520e+02, 5.41158791e+01,
        2.24543437e-02],
       [6.10918999e+01, 0.00000000e+00, 7.74556198e+01, 1.75687294e+01,
        2.24180687e-02],
       [1.34760544e+02, 1.78892326e+01, 1.53137543e+02, 5.40216827e+01,
        2.23024543e-02],
       [1.01120354e+02, 5.28605690e+01, 1.21659599e+02, 9.29937286e+01,
        2.21861992e-02],
       [5.61431618e+01, 1.19393211e+02, 6.59211121e+01, 1.32537155e+02,
        2.20333766e-02],
       [5.95185852e+01, 4.01973114e+01, 9.80230942e+01, 1.10745110e+02,
        2.19824407e-02],
       [6.25842857e+01, 1.21492210e+02, 7.03944931e+01, 1.36932831e+02,
        2.16821525e-02],
       [1.66891830e+02, 4.79165573e+01, 1.86212021e+02, 8.33194656e+01,
        2.15860587e-02],
       [5.03884163e+01, 0.00000000e+00, 6.69748306e+01, 1.79484844e+01,
        2.15169918e-02],
       [5.47187691e+01, 1.18964149e+02, 6.02667961e+01, 1.25233078e+02,
        2.13999860e-02],
       [3.94914207e+01, 2.70074596e+01, 5.71431122e+01, 6.15744972e+01,
        2.12929863e-02],
       [8.23500977e+01, 0.00000000e+00, 9.86173706e+01, 1.69671040e+01,
        2.11401191e-02],
       [2.78889027e+01, 9.75779152e+00, 4.60106506e+01, 4.47613220e+01,
        2.11167894e-02],
       [9.94718323e+01, 3.24187202e+01, 1.23049622e+02, 5.61024895e+01,
        2.10964642e-02],
       [7.18174362e+01, 0.00000000e+00, 8.80327530e+01, 1.74454613e+01,
        2.09208410e-02],
       [1.45191666e+02, 1.74355354e+01, 1.63686905e+02, 5.47578087e+01,
        2.08268724e-02],
       [1.75431564e+02, 7.68159714e+01, 1.82411697e+02, 8.67197037e+01,
        2.08251160e-02],
       [4.93261909e+01, 1.18695763e+02, 5.34004631e+01, 1.31142303e+02,
        2.08078139e-02],
       [6.81567612e+01, 3.36061783e+01, 9.57690125e+01, 5.39413643e+01,
        2.05936395e-02],
       [1.24598022e+02, 2.05381947e+01, 1.42763046e+02, 5.30163879e+01,
        2.05772370e-02],
       [1.23195488e+02, 4.77951546e+01, 1.42604721e+02, 8.17979126e+01,
        2.02491917e-02],
       [1.11019020e+02, 4.69731827e+01, 1.34342972e+02, 8.21800308e+01,
        2.01673806e-02],
       [7.03996201e+01, 1.30634642e+00, 1.22979797e+02, 5.45137863e+01,
        2.01026220e-02],
       [1.51913559e+02, 3.28309441e+01, 1.98102600e+02, 6.81117401e+01,
        2.00965293e-02]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([[8.49362183e+00, 8.84435654e+01, 1.42450211e+02, 1.12237244e+02,
        1.09119281e-01],
       [6.36337700e+01, 9.74570770e+01, 1.25242699e+02, 1.10458298e+02,
        5.08451834e-02],
       [6.50359116e+01, 8.58679962e+01, 1.81661804e+02, 1.13556969e+02,
        4.02679630e-02],
       [6.68891678e+01, 8.85235291e+01, 1.16700630e+02, 1.06604805e+02,
        3.57255973e-02],
       [4.94025660e+00, 8.68252106e+01, 1.86917236e+02, 1.30936386e+02,
        3.31094414e-02],
       [8.81781921e+01, 9.68122787e+01, 1.47987869e+02, 1.10646988e+02,
        2.80377362e-02],
       [6.55301895e+01, 9.33219299e+01, 9.97278366e+01, 1.12492981e+02,
        2.66304053e-02],
       [6.64282303e+01, 6.26844177e+01, 1.50005402e+02, 1.05878174e+02,
        2.61485558e-02],
       [7.26828079e+01, 9.06987305e+01, 1.35527435e+02, 1.14313316e+02,
        2.60274559e-02],
       [6.96744385e+01, 1.05194084e+02, 1.34507797e+02, 1.17431854e+02,
        2.05729622e-02]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([[7.43766556e+01, 1.03259758e+02, 9.22175217e+01, 1.23189354e+02,
        2.67535411e-02],
       [6.96306381e+01, 9.95483322e+01, 8.56884689e+01, 1.19502304e+02,
        2.33481005e-02],
       [8.53700638e+01, 1.07867401e+02, 1.04102837e+02, 1.25555603e+02,
        2.27380209e-02],
       [7.21851273e+01, 1.11097908e+02, 9.16446228e+01, 1.28521790e+02,
        2.06455961e-02],
       [6.72665634e+01, 1.17576347e+02, 8.68338623e+01, 1.32230042e+02,
        2.01209504e-02],
       [5.36348572e+01, 1.23513275e+02, 6.97150803e+01, 1.42861816e+02,
        2.00038850e-02]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([[7.7949257e+01, 8.4273567e+01, 8.9297890e+01, 9.8912125e+01,
        3.6970135e-02]], dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32)]

@Hou-MY
Copy link
Author

Hou-MY commented Aug 17, 2022

hi, this is my arguments.
python tools/test.py \ configs/mmdet/detection/detection_tensorrt-fp16_dynamic-320x320-1344x1344.py \ work_dirs/cascade_rcnn_r50_fpn_dconv_c3-c5_1x/all_cascade_rcnn_r50_fpn_dconv_c3-c5_1x.py \ --model mmdeploy_model/cascade_dcn_realVal/end2end.engine \ --metrics bbox \ --device cuda:0 \ --out cascade_dcn_realVal.pkl
@RunningLeon

@Hou-MY
Copy link
Author

Hou-MY commented Aug 17, 2022

@Hou-MY 你好,请问你有测试生成int8的量化模型吗,需要提供训练数据用来做calibration吗?

是的,有个参数可以设置

@RunningLeon
Copy link
Collaborator

@Hou-MY hi, maybe because the dataset is sorted in mmdeploy and the pkl file evaluated with tools/analysis_tools/eval_metric.py from mmdet is mismatched. Could you change the following line to dataset = task_processor.build_dataset(model_cfg, dataset_type, is_sort_dataset=False) and try again?

dataset = task_processor.build_dataset(model_cfg, dataset_type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants