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

[Enhancement] Add a visualize script for inference result comparation. #2012

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

IRONICBo
Copy link

Motivation

  1. add a visualization script to visualize the backend inference results, refer to the visualization section in tools/deploy.py
  2. script parameters include deployment config, model config, backend model path, image list, pytorch model (ckpt, optional), visualization result save path, etc.
  3. require that when the pytorch model is passed in, the back-end results and the pytorch results graph are concatenated for comparison

Modification

tools/visualize.py

Use cases (Optional)

Run command:

python mmdeploy/tools/visualize.py \
    --deploy-cfg mmdeploy/configs/mmdet/detection/detection_onnxruntime_dynamic.py \
    --model-cfg mmdetection/configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py \
    --deploy-path mmdeploy_model/faster-rcnn/end2end.onnx \
    --checkpoint checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
    --test-img mmdetection/demo/demo.jpg mmdetection/demo/demo2.jpg \
    --save-dir mmdeploy_model/faster-rcnn \
    --device cuda

Inference result:
image

@CLAassistant
Copy link

CLAassistant commented Apr 19, 2023

CLA assistant check
All committers have signed the CLA.

@RunningLeon RunningLeon added the enhancement New feature or request label Apr 20, 2023
@RunningLeon RunningLeon self-requested a review April 20, 2023 06:50
@RunningLeon
Copy link
Collaborator

@IRONICBo
Copy link
Author

@IRONICBo
Copy link
Author

@IRONICBo Hi, thanks for your PR. Could you update the docs as well? https://github.com/open-mmlab/mmdeploy/blob/main/docs/en/02-how-to-run/useful_tools.md https://github.com/open-mmlab/mmdeploy/blob/main/docs/zh_cn/02-how-to-run/useful_tools.md

It seems to have confilct in branch, I have merge it and open new PR in #2013.

@RunningLeon
Copy link
Collaborator

@IRONICBo Hi, you could update and push to the same pr

@IRONICBo IRONICBo reopened this Apr 23, 2023
@IRONICBo
Copy link
Author

@IRONICBo Hi, you could update and push to the same pr

OK,I have changed to this PR.

@RunningLeon
Copy link
Collaborator

@IRONICBo hi, do you have time to update this PR?

@IRONICBo
Copy link
Author

IRONICBo commented May 6, 2023

@IRONICBo hi, do you have time to update this PR?

Yes, I will update it these days.

@IRONICBo
Copy link
Author

I'm sorry for my late PR, does "batch inference" mean synchronized display or parallel interence?

@RunningLeon
Copy link
Collaborator

I'm sorry for my late PR, does "batch inference" mean synchronized display or parallel interence?

@IRONICBo for inference with two images at the same time.

@RunningLeon
Copy link
Collaborator

RunningLeon commented Jun 7, 2023

@IRONICBo hi, could you update the PR? Hope this PR is ready to merge soon.

  1. Merge and fix the conflicts with the latest main branch
  2. Update docs
  3. Test the tool on models from codebases like mmpretrain, mmdet, mmseg, mmpose, mmocr.

@IRONICBo
Copy link
Author

IRONICBo commented Jun 7, 2023

@IRONICBo hi, could you update the PR? Hope this PR is ready to merge soon.

  1. Merge and fix the conflicts with the latest main branch
  2. Update docs
  3. Test the tool on models from codebases like mmpretrain, mmdet, mmseg, mmpose, mmocr.

Ok, I am working on a school project and I will update the PR as soon as possible :)

@IRONICBo IRONICBo marked this pull request as draft June 21, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants