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

[Bug] 使用默认的命令导出的模型,没有lable_name标签信息?如何增加? #2859

Open
3 tasks done
happybear1015 opened this issue Dec 16, 2024 · 1 comment

Comments

@happybear1015
Copy link

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

python mmdeploy/tools/deploy.py 导出时,如何指定类别标签 label_name?

Reproduction

no

Environment

no

Error traceback

No response

@happybear1015
Copy link
Author

导出命令:python mmdeploy/tools/deploy.py mmdeploy/configs/mmdet/instance-seg/instance-seg_onnxruntime_dynamic.py mmdetection/configs/mask_rcnn/mask-rcnn_x101-64x4d_fpn_ms-poly_3x_coco.py epoch_24.pth 1.jpg --work-dir mmdeploy_model/mask-rcnn/ --device cpu --dump-info
部分结果文件:
image

detail.json内容如下:
{
"version": "1.3.1",
"codebase": {
"task": "ObjectDetection",
"codebase": "mmdet",
"version": "3.3.0",
"pth": "epoch_12.pth",
"config": "mmdetection/configs/mask_rcnn/mask-rcnn_x101-64x4d_fpn_ms-poly_3x_coco.py"
},
"codebase_config": {
"type": "mmdet",
"task": "ObjectDetection",
"model_type": "end2end",
"post_processing": {
"score_threshold": 0.05,
"confidence_threshold": 0.005,
"iou_threshold": 0.5,
"max_output_boxes_per_class": 200,
"pre_top_k": 5000,
"keep_top_k": 100,
"background_label_id": -1,
"export_postprocess_mask": false
}
},
"onnx_config": {
"type": "onnx",
"export_params": true,
"keep_initializers_as_inputs": false,
"opset_version": 11,
"save_file": "end2end.onnx",
"input_names": [
"input"
],
"output_names": [
"dets",
"labels",
"masks"
],
"input_shape": null,
"optimize": true,
"dynamic_axes": {
"input": {
"0": "batch",
"2": "height",
"3": "width"
},
"dets": {
"0": "batch",
"1": "num_dets"
},
"labels": {
"0": "batch",
"1": "num_dets"
},
"masks": {
"0": "batch",
"1": "num_dets",
"2": "height",
"3": "width"
}
}
},
"backend_config": {
"type": "onnxruntime"
},
"calib_config": {}
}
pipeline.json内容如下:
{
"pipeline": {
"input": [
"img"
],
"output": [
"post_output"
],
"tasks": [
{
"type": "Task",
"module": "Transform",
"name": "Preprocess",
"input": [
"img"
],
"output": [
"prep_output"
],
"transforms": [
{
"type": "LoadImageFromFile",
"backend_args": null
},
{
"type": "Resize",
"keep_ratio": true,
"size": [
1333,
800
]
},
{
"type": "Normalize",
"to_rgb": true,
"mean": [
123.675,
116.28,
103.53
],
"std": [
58.395,
57.12,
57.375
]
},
{
"type": "Pad",
"size_divisor": 32
},
{
"type": "DefaultFormatBundle"
},
{
"type": "Collect",
"meta_keys": [
"img_norm_cfg",
"flip_direction",
"filename",
"pad_shape",
"ori_filename",
"img_path",
"img_id",
"pad_param",
"ori_shape",
"valid_ratio",
"flip",
"scale_factor",
"img_shape"
],
"keys": [
"img"
]
}
]
},
{
"name": "maskrcnn",
"type": "Task",
"module": "Net",
"is_batched": true,
"input": [
"prep_output"
],
"output": [
"infer_output"
],
"input_map": {
"img": "input"
},
"output_map": {}
},
{
"type": "Task",
"module": "mmdet",
"name": "postprocess",
"component": "ResizeInstanceMask",
"params": {
"rpn": {
"nms_pre": 1000,
"max_per_img": 1000,
"nms": {
"type": "nms",
"iou_threshold": 0.7
},
"min_bbox_size": 0
},
"rcnn": {
"score_thr": 0.05,
"nms": {
"type": "nms",
"iou_threshold": 0.5
},
"max_per_img": 200,
"mask_thr_binary": 0.5
},
"min_bbox_size": 0,
"score_thr": 0.05,
"mask_thr_binary": 0.5,
"is_resize_mask": true
},
"output": [
"post_output"
],
"input": [
"prep_output",
"infer_output"
]
}
]
}
}

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

No branches or pull requests

1 participant