Skip to content

CodeCamp #101: Support MMDetection 3.x RTMDet model deployment on RV1126#1551

Merged
lvhan028 merged 11 commits intoopen-mmlab:dev-1.xfrom
Qingrenn:rv1126-yolov5-rtmdet
Jan 6, 2023
Merged

CodeCamp #101: Support MMDetection 3.x RTMDet model deployment on RV1126#1551
lvhan028 merged 11 commits intoopen-mmlab:dev-1.xfrom
Qingrenn:rv1126-yolov5-rtmdet

Conversation

@Qingrenn
Copy link
Copy Markdown
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Support MMDetection 3.x RTMDet model deployment on RV1126.

Modification

  1. Partition RTMDet ONNX representation.
  2. Add RTMDet deploy config.
  3. Add RTMDet postprocess in sdk.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

  1. Convert RTMDet
cd ${MMDeploy}

python ${MMDeploy}/tools/deploy.py \
${MMDeploy}/configs/mmdet/detection/detection_rknn-int8_static-640x640.py \
${MMDet}/configs/rtmdet/rtmdet_m_8xb32-300e_coco.py \
./checkpoints/rtmdet_m_8xb32-300e_coco_20220719_112220-229f527c.pth \
${MMDeploy}/demo/resources/det.jpg \
--work-dir ./mmdeploy_models/mmdet/rtmdet_m \
--device cpu \
--dump-info
  1. Compile mmdeploy sdk.
  2. Push sdk, image and rtmdet_m to rv1126.
  3. Perform infer in rv1126.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 16, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @Qingrenn. Could you rebase the branch to dev-1.x. My commits are now in the PR.

@lvhan028 lvhan028 self-requested a review December 20, 2022 06:00
Copy link
Copy Markdown
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May fix the lint error. If you are using vscode, may install clang-format plugin and set property.json like following:

    "editor.formatOnSave": true,
    "clang-format.fallbackStyle": "Google",
    "clang-format.language.cuda.fallbackStyle": "Google",
    "clang-format.language.cuda.style": "Google",
    "clang-format.language.cpp.enable": true,
    "[cpp]": {
        "editor.defaultFormatter": "xaver.clang-format",
        "editor.wordBasedSuggestions": false,
        "editor.suggest.insertMode": "replace",
        "editor.semanticHighlighting.enabled": true
    },
    "clang-format.executable": "/home/linuxbrew/.linuxbrew/bin/clang-format",

@Qingrenn Qingrenn force-pushed the rv1126-yolov5-rtmdet branch from 5f37e75 to e6a21d3 Compare December 24, 2022 12:39
Copy link
Copy Markdown
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May update docs like here?

@Qingrenn
Copy link
Copy Markdown
Contributor Author

Qingrenn commented Jan 4, 2023

May update docs like here?

No problem🫡.

Copy link
Copy Markdown
Member

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Qingrenn
Copy link
Copy Markdown
Contributor Author

Qingrenn commented Jan 5, 2023

Mentor @lvhan028 😁.
There is a url will be valid after these codes being merged, but this will inevitably lead to a lint error.
Specifically, I add a config file detection_rknn-int8_static-640x640.py, and the corresponding url (https://github.com/open-mmlab/mmdeploy/blob/dev-1.x/configs/mmdet/detection/detection_rknn-int8_static-640x640.py) will be valid after this part of code being merged.

Copy link
Copy Markdown
Collaborator

@lvhan028 lvhan028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvhan028 lvhan028 merged commit 71fc8e3 into open-mmlab:dev-1.x Jan 6, 2023
lvhan028 pushed a commit that referenced this pull request Mar 1, 2023
…126 (#1551)

* * partition rtmdet

* * add rtmdet deploy config

* * add rtmdet deploy config

* * modify rtmdet pipline anchor_generator's info dump
* support rtmdet infer in sdk

* fix a bug

* * fix a bug in csrc/mmdeploy/preprocess/transform/normalize.cpp

* * fix a bug

* * update docs

* * fix lint

* * update several urls in docs
ewernn pushed a commit to ewernn/mmdeploy that referenced this pull request Nov 17, 2025
…ent on RV1126 (open-mmlab#1551)

* * partition rtmdet

* * add rtmdet deploy config

* * add rtmdet deploy config

* * modify rtmdet pipline anchor_generator's info dump
* support rtmdet infer in sdk

* fix a bug

* * fix a bug in csrc/mmdeploy/preprocess/transform/normalize.cpp

* * fix a bug

* * update docs

* * fix lint

* * update several urls in docs
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 this pull request may close these issues.

4 participants