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
[Feature]: Support exporting to ONNX with batch and dynamic shape #5039
Conversation
…mmlab#4781) * fix fcos deploy bug and add fcos fsaf ssd head unittest case * add pickle file to be used in test case * cancel deploy_nms_pre and add with_nms * optimized implementation * optimaze code * fix docstring typo
* add area name grouped map bar plots * update function name, add comments, fix typo * make all changes optional, add adjustable area region support, add area stat plots * clean unnecessary comma
* Add mmdet_handler * Add mmdet2torchserve * Move serve to docker folder
* Update doc * Update docs * Update docs * Update 1_exist_data_model.md Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
…lab#4796) * Support batch infer in RetinaNet * Suport batch multiclass_nms * Revert multiclass_nms * Fix api deprecated warning * do not repeat anchors * Move img_shapes * Update Yolov3 * Support FCOS * Support RPN * Fix RPN topk_inds error * make batch exportable to onnx for yolohead * make fcos_head exportable to onnx with batch dim * Support ATSS * Support CornerNet and centripetalNet * Update RetinaNet and delta_xywh * Remove ugly code * Remove ugly code of FCOS * Remove ugly code of ATSS/YOLOV3 * Support RPN and revert bbox_head * expand anchors to batch and remove BG class when use deploy_nms_pre * Update * Use dim=-1 instead of dim=2 * Rename anchor_head method * Keep the original format output when nms is not use * Rename method and unified code style * Fix paa_head and unittest * Fix FASF onnx export error * Fix error * fix single stage img_shapes for onnx * move conf_thr * fix rpn_head for onnx * Add distance2bbox unittest * Remove TODO * Fix RPN * Update docstrs * Faster R-CNN support batch_infer * update for exporting to onnx * add dummy onnx::nms for anchor head * add dummy onnx::nms for rpn_head * update bbox head for fasterrcnn batch export to onnx * update to support pytorch2onnx with batch * add onnx helper * add dummn onnx:nms for yolo head * add dummy onnx:nms for fcos head * add topk to rpn head for onnx * update pytorch2onnx doc * ignore background class for anchor head if not use_sigmoid_cls * change to 1d indexing for onnx_helper * Support faster rcnn * Support faster rcnn * Fix Lint * change max_output_boxes_per_class defaults to 200 * set value to zero for bboxes in rpn head as well * set deploy_nms_pre in rpn head * add topk of deploy_nms_pre in bbox head before nms * Add docstr * add deploy_nms_pre for rpn head and remove topk after nms * Fix docstr * Update docstr * add with_nms control over onnx exporting * update doc for pytorch2onnx * support trt backend for exporting to onnx * update onnx2tensorrt and its doc * Update code * Update docstr * MaskRCNN support batch infer * Update * change dtype in range in anchor_free_head * change to support onnx2tensorrt with batch * update coder for onnx * move dynamic clip to onnx_helper * move dynamic clip to onnx_helper * sort trt_dets in onnx2tensorrt * reorganize output structure to support batch export to onnx * support maskrcnn to onnx with TensorRT backend * fix after nms topk for batch export * Revert "support maskrcnn to onnx with TensorRT backend" This reverts commit 37fcefb. * Revert "Update" from haian for mask export This reverts commit ce725bf. * remove import torch from simple_test in rpn * resolve comment for code style * Revert "MaskRCNN support batch infer" This reverts commit aa6ced5. * fix code style Co-authored-by: hhaAndroid <1286304229@qq.com>
* Fix some typos Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com>
…mlab#4880) Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
* Update get_started.md * Update get_started.md
* add change log for v2.11.0 * fix typo * version 2.11.0 * fix typo * to meet the specification of change log * Update changelog.md Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
* Support faster rcnn * Fix Lint * Add docstr * Fix docstr * Update docstr * Update code * Update docstr * MaskRCNN support batch infer * Update * Delete todo * Fix error * Fix comments
* pytorch2onnx and onnx2trt doc * fix onnx2tensorrt.md * update md * fix error link in onnx2tensorrt.md * fix typo in md * updata docs * updata docs * update docs * update docs * fix the bug in docs * remove max_shape in onnx2tensorrt.md
* Support Concatenate dataset for testing * Support faster rcnn * Fix Lint * Add docstr * Fix docstr * Update docstr * Allow onnx mrcnn * Update code * Update docstr * MaskRCNN support batch infer * Update * Add mrcnn trt export * [Refactor]: Add deprecate warnings of LoadImage (open-mmlab#4813) * Remove LoadImage * Add deprecation warning * [feature] improve coco_error_analysis.py (open-mmlab#4712) * add area name grouped map bar plots * update function name, add comments, fix typo * make all changes optional, add adjustable area region support, add area stat plots * clean unnecessary comma * [Fix]: minor syntax typo fix (open-mmlab#4836) * [Feature]: Add mmdet2torchserve tool (open-mmlab#4810) * Add mmdet_handler * Add mmdet2torchserve * Move serve to docker folder * Support no gt test mode (open-mmlab#4827) * Update doc * Update docs * Update docs * Update 1_exist_data_model.md Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com> * [Feature]: Add Localization Distillation for Object Detection (open-mmlab#4758) * add Localization Distillation for Object Detection https://arxiv.org/abs/2102.12252 * fix lint * fix lint * fix lint * fix lint * fix lint * fix config * add kd detector * edit loss name * overide setattr but failed * move init_detector into init * seperate ld and gfocal, fix unused param error * small fix * small fix * add test, reload magic function, create kd_loss.py * del teacher model warnings * fix reference * add ignored bbox test fix docstring * small fix * docstring fix * change names * fix * fix * fix test * fix import * fix * docstring fix * fix * retest * add test * docstring fix * Fix some typos (open-mmlab#4858) * Fix some typos Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com> * More Signed-off-by: lizz <lizz@sensetime.com> * MaskRCNN support batch infer * Update * cherry pick commits to support maskrcnn with tensorrt * Fix supplement size in simple_test_bboxes (open-mmlab#4860) * Delete todo * Fix error * Use a unified add_dummy_nms_for_onnx for bbox_head * Fix comments * fix lint * remove inplace operation and update doc Co-authored-by: hhaAndroid <1286304229@qq.com> Co-authored-by: David de la Iglesia Castro <daviddelaiglesiacastro@gmail.com> Co-authored-by: fcakyon <34196005+fcakyon@users.noreply.github.com> Co-authored-by: tczhao <evantczhao@gmail.com> Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com> Co-authored-by: HikariTJU <30501451+HikariTJU@users.noreply.github.com> Co-authored-by: lizz <innerlee@users.noreply.github.com> Co-authored-by: maningsheng <maningsheng@sensetime.com> Co-authored-by: Ye Liu <yeliudev@outlook.com>
* fix onnxsim to official version * update code
…tch inference (open-mmlab#4940) * add test dynamic and batch * update comment * update doc * update doc
|
* fix mask output without threshold * mask output compatible with ort and trt * add ort test tool * update parameters of nms for bboxhead and rpnhead * update doc * reorganize to mmdet.core.export * update doc * reorganize import for export * rename ort_test.py * update performance of maskrcnn * fix yolo and onnx2trt * update code style
Codecov Report
@@ Coverage Diff @@
## master #5039 +/- ##
==========================================
- Coverage 66.66% 66.16% -0.50%
==========================================
Files 259 261 +2
Lines 20269 20524 +255
Branches 3447 3479 +32
==========================================
+ Hits 13512 13580 +68
- Misses 6029 6209 +180
- Partials 728 735 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Can be merged if the GPU tests are passed. @hhaAndroid |
This PR includes: