open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.75k stars 631 forks source link

[Bug] mengine - ERROR - mmdeploy/tools/deploy.py - create_process - 82 - visualize tensorrt model failed. #1933

Closed baiguosummer closed 1 year ago

baiguosummer commented 1 year ago

Checklist

Describe the bug

I used mmdeploy to export the dynamic yolo model, including replacing the TRTBatchNMS operator, I set use_efficientnms to true,etc., and an error occurred

Reproduction

base = ['./base_dynamic.py'] backend_config = dict( type='tensorrt', common_config=dict(fp16_mode=False, max_workspace_size=1 << 30), model_inputs=[ dict( input_shapes=dict( input=dict( min_shape=[1, 3, 192, 192], opt_shape=[1, 3, 640, 640], max_shape=[1, 3, 960, 960]))) ]) use_efficientnms = True

python mmdeploy/tools/deploy.py mmyolo/configs/deploy/detection_tensorrt_dynamic-192x192-960x960.py mmyolo/work_train_dir/yolov5_s_coco-c5-n7w/yolov5_s-v61_syncbn_fast_8xb16-300e_images3000.py mmyolo/work_train_dir/yolov5_s_coco-c5-n7w/best_coco/bbox_mAP_epoch_194.pth mmyolo/data/work-1000/images/0433.jpg --dump-info --work-dir mmyolo/yolo_model_dir/yolov5_s_coco-c5-n7w-dynamic

Environment

(openmmlab) panda@amd:~/Pycharm/openMMlab$ python mmdeploy/tools/deploy.py mmyolo/configs/deploy/detection_tensorrt_dynamic-192x192-960x960.py mmyolo/work_train_dir/yolov5_s_coco-c5-n7w/yolov5_s-v61_syncbn_fast_8xb16-300e_images3000.py mmyolo/work_train_dir/yolov5_s_coco-c5-n7w/best_coco/bbox_mAP_epoch_194.pth mmyolo/data/work-1000/images/0433.jpg --dump-info --work-dir mmyolo/yolo_model_dir/yolov5_s_coco-c5-n7w-dynamic
03/29 15:33:25 - mmengine - WARNING - Failed to get codebase, got: 'Cannot get key by value "mmyolo" of <enum \'Codebase\'>'. Then export a new codebase in Codebase MMYOLO: mmyolo
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - The "mmyolo_tasks" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:25 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:25 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:26 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
03/29 15:33:26 - mmengine - WARNING - Failed to get codebase, got: 'Cannot get key by value "mmyolo" of <enum \'Codebase\'>'. Then export a new codebase in Codebase MMYOLO: mmyolo
03/29 15:33:26 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:26 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:26 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:33:26 - mmengine - WARNING - The "mmyolo_tasks" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
03/29 15:33:26 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:33:26 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: mmyolo/work_train_dir/yolov5_s_coco-c5-n7w/best_coco/bbox_mAP_epoch_194.pth
Switch model to deploy modality.
03/29 15:33:29 - mmengine - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future. 
03/29 15:33:29 - mmengine - INFO - Export PyTorch model to ONNX: mmyolo/yolo_model_dir/yolov5_s_coco-c5-n7w-dynamic/end2end.onnx.
03/29 15:33:29 - mmengine - WARNING - Can not find torch._C._jit_pass_onnx_autograd_function_process, function rewrite will not be applied
03/29 15:33:29 - mmengine - WARNING - Can not find mmdet.models.dense_heads.DETRHead.forward_single, function rewrite will not be applied
03/29 15:33:29 - mmengine - WARNING - Can not find torch._C._jit_pass_onnx_deduplicate_initializers, function rewrite will not be applied
03/29 15:33:29 - mmengine - WARNING - Can not find mmdet.models.utils.transformer.PatchMerging.forward, function rewrite will not be applied
/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/torch/onnx/utils.py:1294: UserWarning: Provided key input for dynamic axes is not a valid input/output name
  warnings.warn("Provided key {} for dynamic axes is not a valid input/output name".format(key))
/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/codebase/mmdet/models/detectors/single_stage.py:84: TracerWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
  img_shape = [int(val) for val in img_shape]
/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/codebase/mmdet/models/detectors/single_stage.py:84: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  img_shape = [int(val) for val in img_shape]
/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/core/optimizers/function_marker.py:160: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  ys_shape = tuple(int(s) for s in ys.shape)
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of TRT::EfficientNMS_TRT type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
03/29 15:33:31 - mmengine - INFO - Execute onnx optimize passes.
03/29 15:33:31 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx
03/29 15:33:33 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in subprocess
03/29 15:33:33 - mmengine - INFO - Successfully loaded tensorrt plugins from /home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/lib/libmmdeploy_tensorrt_ops.so
[03/29/2023-15:33:33] [TRT] [I] [MemUsageChange] Init CUDA: CPU +329, GPU +0, now: CPU 409, GPU 876 (MiB)
[03/29/2023-15:33:33] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +327, GPU +104, now: CPU 755, GPU 980 (MiB)
[03/29/2023-15:33:33] [TRT] [I] ----------------------------------------------------------------
[03/29/2023-15:33:33] [TRT] [I] Input filename:   mmyolo/yolo_model_dir/yolov5_s_coco-c5-n7w-dynamic/end2end.onnx
[03/29/2023-15:33:33] [TRT] [I] ONNX IR version:  0.0.7
[03/29/2023-15:33:33] [TRT] [I] Opset version:    11
[03/29/2023-15:33:33] [TRT] [I] Producer name:    pytorch
[03/29/2023-15:33:33] [TRT] [I] Producer version: 1.10
[03/29/2023-15:33:33] [TRT] [I] Domain:           
[03/29/2023-15:33:33] [TRT] [I] Model version:    0
[03/29/2023-15:33:33] [TRT] [I] Doc string:       
[03/29/2023-15:33:33] [TRT] [I] ----------------------------------------------------------------
[03/29/2023-15:33:34] [TRT] [W] onnx2trt_utils.cpp:369: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[03/29/2023-15:33:34] [TRT] [W] onnx2trt_utils.cpp:395: One or more weights outside the range of INT32 was clamped
[03/29/2023-15:33:34] [TRT] [I] No importer registered for op: EfficientNMS_TRT. Attempting to import as plugin.
[03/29/2023-15:33:34] [TRT] [I] Searching for plugin: EfficientNMS_TRT, plugin_version: 1, plugin_namespace: 
[03/29/2023-15:33:34] [TRT] [I] Successfully created plugin: EfficientNMS_TRT
[03/29/2023-15:33:34] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +747, GPU +318, now: CPU 1534, GPU 1297 (MiB)
[03/29/2023-15:33:35] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +618, GPU +268, now: CPU 2152, GPU 1565 (MiB)
[03/29/2023-15:33:35] [TRT] [W] TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.2.1
[03/29/2023-15:33:35] [TRT] [I] Local timing cache in use. Profiling results in this builder pass will not be stored.
[03/29/2023-15:33:52] [TRT] [I] Some tactics do not have sufficient workspace memory to run. Increasing workspace size will enable more tactics, please check verbose output for requested sizes.
[03/29/2023-15:34:34] [TRT] [I] Detected 1 inputs and 4 output network tensors.
[03/29/2023-15:34:34] [TRT] [I] Total Host Persistent Memory: 121760
[03/29/2023-15:34:34] [TRT] [I] Total Device Persistent Memory: 154112
[03/29/2023-15:34:34] [TRT] [I] Total Scratch Memory: 8225280
[03/29/2023-15:34:34] [TRT] [I] [MemUsageStats] Peak memory usage of TRT CPU/GPU memory allocators: CPU 7 MiB, GPU 561 MiB
[03/29/2023-15:34:34] [TRT] [I] [BlockAssignment] Algorithm ShiftNTopDown took 14.1918ms to assign 8 blocks to 154 nodes requiring 35683328 bytes.
[03/29/2023-15:34:34] [TRT] [I] Total Activation Memory: 35683328
[03/29/2023-15:34:34] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 3091, GPU 2015 (MiB)
[03/29/2023-15:34:34] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 3091, GPU 2023 (MiB)
[03/29/2023-15:34:34] [TRT] [W] TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.2.1
[03/29/2023-15:34:34] [TRT] [I] [MemUsageChange] TensorRT-managed allocation in building engine: CPU +3, GPU +30, now: CPU 3, GPU 30 (MiB)
[03/29/2023-15:34:34] [TRT] [W] The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
[03/29/2023-15:34:34] [TRT] [W] The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
03/29 15:34:34 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend
03/29 15:34:34 - mmengine - INFO - visualize tensorrt model start.
03/29 15:34:35 - mmengine - WARNING - Failed to get codebase, got: 'Cannot get key by value "mmyolo" of <enum \'Codebase\'>'. Then export a new codebase in Codebase MMYOLO: mmyolo
03/29 15:34:35 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:34:35 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:34:35 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:34:35 - mmengine - WARNING - The "mmyolo_tasks" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
03/29 15:34:35 - mmengine - WARNING - Import mmdeploy.codebase.mmyolo.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmyolo'
03/29 15:34:35 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:34:35 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "backend_detectors" registry tree. As a workaround, the current "backend_detectors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
03/29 15:34:36 - mmengine - INFO - Successfully loaded tensorrt plugins from /home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/lib/libmmdeploy_tensorrt_ops.so
03/29 15:34:36 - mmengine - INFO - Successfully loaded tensorrt plugins from /home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/lib/libmmdeploy_tensorrt_ops.so
[03/29/2023-15:34:36] [TRT] [W] TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.2.1
[03/29/2023-15:34:36] [TRT] [W] TensorRT was linked against cuDNN 8.4.1 but loaded cuDNN 8.2.1
2023-03-29:15:34:39 - root - ERROR - 
Traceback (most recent call last):
  File "/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/utils/utils.py", line 41, in target_wrapper
    result = target(*args, **kwargs)
  File "/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/apis/visualize.py", line 90, in visualize_model
    task_processor.visualize(
  File "/home/panda/Pycharm/openMMlab/mmdeploy/mmdeploy/codebase/base/task.py", line 327, in visualize
    visualizer.add_datasample(
  File "/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/dist/utils.py", line 360, in wrapper
    return func(*args, **kwargs)
  File "/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmdet/visualization/local_visualizer.py", line 369, in add_datasample
    pred_img_data = self._draw_instances(image, pred_instances,
  File "/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmdet/visualization/local_visualizer.py", line 133, in _draw_instances
    self.draw_bboxes(
  File "/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/dist/utils.py", line 360, in wrapper
    return func(*args, **kwargs)
  File "/home/panda/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/visualization/visualizer.py", line 732, in draw_bboxes
    assert (bboxes[:, 0] <= bboxes[:, 2]).all() and (bboxes[:, 1] <=
AssertionError
03/29 15:34:40 - mmengine - ERROR - mmdeploy/tools/deploy.py - create_process - 82 - visualize tensorrt model failed.

Error traceback

No response

fnwkqwan commented 4 months ago

I had the same problem. How did you solve it?