Commit Graph

110 Commits (dd7550a08d65d1afff08b47c463c729820fb0b9c)

Author SHA1 Message Date
AllentDan 47b8e6e71c
[Doc] update benchmark add supported-model-list (#286)
* update benchmark add supported-model-list

* fix lint

* fix lint

* loc mmocr maximum version
2022-04-01 12:26:34 +08:00
hanrui1sensetime 3fa2cc8845
[Fix] add support for headless device (#250)
* add support for headless device

* move headless code

* fix lint

* add no $DISPLAY warning

* add some warnings

* fix info
2022-03-25 09:53:03 +08:00
RunningLeon 8552d35ceb
[Docs]: update docs and argument descriptions (#196)
* bump version to v0.4.0

* update docs and argument descriptions

* revert version change
2022-03-08 16:53:11 +08:00
Zaida Zhou f0c110e6e6
Add a new pre-commit-hook to automatically add a copyright (#166)
* Add a new pre-commit-hook to automatically add copyright

* Add a new pre-commit-hook to automatically add copyright

* append 'demo' and 'tools' directories to .pre-commit-config.yaml
2022-02-23 11:38:40 +08:00
RunningLeon be93956015
fix tools (#160)
* add non-zero error code

* update mmdeploy version
2022-02-16 11:50:04 +08:00
Yifan Zhou 230596bad9
[Enhacement] Allow test.py to save evaluation results (#108)
* Add log file

* Delete debug code

* Rename logger

* resolve comments
2022-01-26 19:57:00 +08:00
VVsssssk 003cf1bfd7
[Fix]fix check_env (#101)
* fix check_env

* update
2022-01-25 19:57:08 +08:00
Semyon Bevzyuk 997d111a6f
[Fix] Fixed device_id in tools/test.py for the CPU. (#58)
* [Fix] fix bugs for mmcls performance test (#269)

* fix bugs for mmcls performance test

* fix yapf

* add comments of CLASSES attribute

* Rewrote the dictionary traversal for new versions of Python.

* Fix device_id for cpu

* Rewrite parse_device_id and tests

* Added None for cpu

Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
2022-01-13 15:37:23 +08:00
lzhangzz bb655af629
Add Python wrapper for SDK (#27)
* add python API for detector

* integrate detection

* add python segmentor

* add segmentation support

* add classifier, text-detector, text-recognizer and restorer

* integrate classifier

* integrate textdet, textrecog and restorer

* simplify

* add inst-seg

* fix inst-seg

* integrate inst-seg

* Moidfy _build_wrapper

* better pipeline substitution

* use registry for backend model creation

* build Python module according to C API targets

* minor fix

* move sdk data pipeline to backend_config

* remove debugging lines

* add docstring for SDKEnd2EndModel

* fix type hint

* fix lint

* fix lint

* insert build/lib to sys.path

Co-authored-by: SingleZombie <singlezombie@163.com>
2022-01-13 11:31:51 +08:00
q.yao d157243077
[Fix] move target_wrapper into utils (#20)
* move target_wrapper into utils

* fix for lint

* add typehint and docstring

* update unit test

* fix isort

* update import
2022-01-11 15:43:47 +08:00
AllentDan dbc12686ea
[Enhancement] use mmcv.utils.get_logger (#24)
* use mmcv.utils.get_logger

* add a unit test

* fix ut

* refine docstring

* fix lint
2022-01-10 15:46:42 +08:00
StephenFang f203306cf6
modified device selection (#21)
* modified device selection

device cannot sucessfully control through argments "device"

* update with_sync

* Update ORTWrapper

change the way to create ort session, previous work would load same model twice.

* Update wrapper.py

fixed for lint

* Update wrapper.py

* Update wrapper.py

remove the backslash

* formating

using yapf to format the file

Co-authored-by: AllentDan <AllentDan@yeah.net>
2021-12-31 18:26:51 +08:00
Semyon Bevzyuk 8cdb4abcc9
[Fix] Fix input names (#12)
* [Fix] fix bugs for mmcls performance test (#269)

* fix bugs for mmcls performance test

* fix yapf

* add comments of CLASSES attribute

* Fix input name

* support all codebases and update dump info

* fix docstring

* Added random names.

* onnx_config -> ir_config

* fix test

* fix test

* add a TODO

* use self.output_names

* Fixes

* Rewrite test_torch2onnx.

Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
Co-authored-by: AllentDan <AllentDan@yeah.net>
Co-authored-by: grimoire <yaoqian@sensetime.com>
2021-12-30 19:56:03 +08:00
Yifan Zhou 0f9f0a60e4
[Enhancement]: Update configs for OpenVINO (#306)
* Update config for OpenVINO

* Update test

* Update better test

* Update instance-seg config of OpenVINO
2021-12-20 17:56:25 +08:00
AllentDan f94d7b5abe
[Feature] Dump jsons to SDK (#279)
* save cods

* save codes

* save codes

* add docstring and fix ut

* use Resize to replace img_scale

* use Dict instead of dict()

* net && weights

* resolve comments

* update pipeline

* update pipeline

* update pipeline

* refactor preprocess

* merge master

* use imagetotensor

* use imagetotensor

* fix typos and improve docstring

* resolve comments

* update lq to img in mmedit

* add mask_thr_binary

* refactor dump info

* resolve comments

* add instance seg to dump info temperarily

* update meta_keys

* update meta_keys

* add meta_keys condition

* update postprocess for mmseg
2021-12-17 11:39:16 +08:00
Yifan Zhou de6fc147bd
[Feature]: Add onnx2pplnn tool (#296)
* Add onnx2pplnn tool

* format

* typo

* update opt-shapes and wrapper

* Update opt-shape

* Update comment

* lint
2021-12-16 17:01:33 +08:00
q.yao 43256977fa
Add onnx2ncnn tool (#276)
* Add onnx2ncnn tool

* fix docs

* fix lint
2021-12-15 18:43:09 +08:00
q.yao b1a202ef04
Add onnx2tensorrt tool (#275)
* add onnx2tensorrt

* add docs

* fix log

* fix docs
2021-12-15 11:20:10 +08:00
AllentDan 0dea300714
[Fix] Reanme ppl to pplnn for all cases (#273)
* add speed benchmark for pplnn and replace all ppl in docs with pplnn

* replace ppl with pplnn for all codes

* docs zh

* fix crnn config path

* update docstring

* rename

* update ppl to pplnn in readme_zh

Co-authored-by: maningsheng <mnsheng@yeah.net>
2021-12-14 15:04:39 +08:00
hanrui1sensetime 0f90a0af0a
[Fix] fix bugs for mmcls performance test (#269)
* fix bugs for mmcls performance test

* fix yapf

* add comments of CLASSES attribute
2021-12-10 14:15:08 +08:00
q.yao ad72c19482
[Feature] Add torch2onnx tools (#260)
* Add torch2onnx tools

* fix lint

* update docs

* fix docs2

* fix log
2021-12-09 14:38:54 +08:00
Yifan Zhou 03c95a1149
[Enhancement]: Optimize config utils (#263)
* Optimize config utils

* Update `get_backend`

* Add assert
2021-12-08 14:55:59 +08:00
Semyon Bevzyuk bb9b0a98de
[Enhancement]: Added static config and CI tests for OpenVINO. (#218)
* Add openvino_static.

* Add openvino-dev.

* Fix skipping ORT tests in test_mmocr_models.

* Updated docs.

* Fix print.

* Fix

* Fix

* Fix other backends

* Fix is_available

* fix ncnn

* Add constrict for get rewrite output

* add not

* Fix

* fix

* Fix

* Fix

* Improve tests

* Remove rebundant `cuda`

* Prevent None object and rename variable

* Fix multi-line string

* rename get_backend_checker

* Add Troubleshooting to doc.

* Fix postprocessing_masks with empty masks.

* Fix tests

* lint

* Update docs.

Co-authored-by: SingleZombie <singlezombie@163.com>
2021-12-01 14:03:48 +08:00
q.yao a8abc75065
Add licence head to code (#236) 2021-11-30 15:00:37 +08:00
AllentDan d0bb497b0c
[Fix] fix ncnn apis, add onnx2ncnn unit tests, and rename test_mmseg/test_utils.py to avoid conflicts (#233)
* refactor ncnn convert

* refine docstring

* add onnx2ncnn test

* resolve comments and rename test_utils.py in test_mmseg

Co-authored-by: maningsheng <mnsheng@yeah.net>
2021-11-26 11:43:27 +08:00
VVsssssk 75fc0bde64
[Feature]add file to verify install and check env #issue#168 (#199)
* add file to verify install and env

* add openvino and ppl

* fix comment

* add __version__

* fix comment

* resolve comment

* fix lint
2021-11-25 19:05:07 +08:00
q.yao 3a785f1223
[Refactor] Refactor codebase (#220)
* [WIP] Refactor v2.0 (#163)

* Refactor backend wrapper

* Refactor mmdet.inference

* Fix

* merge

* refactor utils

* Use deployer and deploy_model to manage pipeline

* Resolve comments

* Add a real inference api function

* rename wrappers

* Set execute to private method

* Rename deployer deploy_model

* Refactor task

* remove type hint

* lint

* Resolve comments

* resolve comments

* lint

* docstring

* [Fix]: Fix bugs in details in refactor branch (#192)

* [WIP] Refactor v2.0 (#163)

* Refactor backend wrapper

* Refactor mmdet.inference

* Fix

* merge

* refactor utils

* Use deployer and deploy_model to manage pipeline

* Resolve comments

* Add a real inference api function

* rename wrappers

* Set execute to private method

* Rename deployer deploy_model

* Refactor task

* remove type hint

* lint

* Resolve comments

* resolve comments

* lint

* docstring

* Fix errors

* lint

* resolve comments

* fix bugs

* conflict

* lint and typo

* Resolve comment

* refactor mmseg (#201)

* support mmseg

* fix docstring

* fix docstring

* [Refactor]: Get the count of backend files (#202)

* Fix backend files

* resolve comments

* lint

* Fix ncnn

* [Refactor]: Refactor folders of mmdet (#200)

* Move folders

* lint

* test object detection model

* lint

* reset changes

* fix openvino

* resolve comments

* __init__.py

* Fix path

* [Refactor]: move mmseg (#206)

* [Refactor]: Refactor mmedit (#205)

* feature mmedit

* edit2.0

* edit

* refactor mmedit

* fix __init__.py

* fix __init__

* fix formai

* fix comment

* fix comment

* Fix wrong func_name of ConvFCBBoxHead (#209)

* [Refactor]: Refactor mmdet unit test (#207)

* Move folders

* lint

* test object detection model

* lint

* WIP

* remove print

* finish unit test

* Fix tests

* resolve comments

* Add mask test

* lint

* resolve comments

* Refine cfg file

* Move files

* add files

* Fix path

* [Unittest]: Refine the unit tests in mmdet #214

* [Refactor] refactor mmocr to mmdeploy/codebase (#213)

* refactor mmocr to mmdeploy/codebase

* fix docstring of show_result

* fix docstring of visualize

* refine docstring

* replace print with logging

* refince codes

* resolve comments

* resolve comments

* [Refactor]: mmseg  tests (#210)

* refactor mmseg tests

* rename test_codebase

* update

* add model.py

* fix

* [Refactor] Refactor mmcls and the package (#217)

* refactor mmcls

* fix yapf

* fix isort

* refactor-mmcls-package

* fix print to logging

* fix docstrings according to others comments

* fix comments

* fix comments

* fix allentdans comment in pr215

* remove mmocr init

* [Refactor] Refactor mmedit tests (#212)

* feature mmedit

* edit2.0

* edit

* refactor mmedit

* fix __init__.py

* fix __init__

* fix formai

* fix comment

* fix comment

* buff

* edit test and code refactor

* refactor dir

* refactor tests/mmedit

* fix docstring

* add test coverage

* fix lint

* fix comment

* fix comment

* Update typehint (#216)

* update type hint

* update docstring

* update

* remove file

* fix ppl

* Refine get_predefined_partition_cfg

* fix tensorrt version > 8

* move parse_cuda_device_id to device.py

* Fix cascade

* onnx2ncnn docstring

Co-authored-by: Yifan Zhou <singlezombie@163.com>
Co-authored-by: RunningLeon <maningsheng@sensetime.com>
Co-authored-by: VVsssssk <88368822+VVsssssk@users.noreply.github.com>
Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com>
Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
2021-11-25 09:57:05 +08:00
q.yao 7b369e0628
Update log format (#203) 2021-11-22 20:41:17 +08:00
AllentDan a4dceb4bb4
[Enhancement] Enhance ppl for all codebases (#177)
* enhance ppl for all codebases

* fix dump info

* fix md and use not None

* remove redundant codes

* safe convert empty ppl tensor

* add examples and remove useless lines
2021-11-16 19:16:46 +08:00
AllentDan 79890f42c2
[Docs] add ppl install doc, how to test a model doc and mmocr doc (#169)
* add ppl install doc and how to test a model doc

* remove mmdet model list in ppl.md

* resolve comments

* fix typo

* add mmocr doc

* mv configs as the final column

* fix typo and align tables

* fix lint
2021-11-09 11:43:38 +08:00
Semyon Bevzyuk c5a87fb1bc
[Enhancement]: OpenVINO deployment support for some models (#117)
* Fix include and lib paths for onnxruntime.

* Fixes for SSD export test

* Add onnx2openvino and OpenVINODetector. Test models: ssd, retinanet, fcos, fsaf.

* Add support for two-stage models: faster_rcnn, cascade_rcnn

* Add doc

* Add strip_doc_string for openvino.

* Fix openvino preprocess.

* Add OpenVINO to test_wrapper.py.

* Fix

* Add openvino_execute.

* Removed preprocessing.

* Fix onnxruntime cmake.

* Rewrote postprocessing and forward, added docstrings and fixes.

* Added device type change to OpenVINOWrapper.

* Update forward_of_single_roi_extractor_dynamic_openvino and fix doc.

* Update docs.

* Add OpenVINODetector and onn2openvino tests.

* Add input_info to onnx2openvino.

* Add TestOpenVINOExporter and test_single_roi_extractor.

* Moved get_input_shape_from_cfg to openvino_utils.py and added test.

* Added test_cascade_roi_head.

* Add backend.check_env() to tests.

* Add OpenVINO to get_rewrite_outputs and to some tests in test_mmdet_models.

* Moved test_single_roi_extractor to test_mmdet_models.

* Removed TestOpenVINOExporter.
2021-10-21 16:07:35 +08:00
RunningLeon 5b8750b83b
[Enhance]: Logging trace info for debugging in deploy tool (#93)
* print trace info for debugging

* resolve comment
2021-09-24 19:09:39 +08:00
RunningLeon de096d5f00
[Docstring]: Coding style and docstring revision for mmdeploy.apis (#87)
* check style of mmdeploy.apis.ncnn

* finish check style with mmdeploy.apis.onnxruntime

* check mmdeploy.apis.ppl

* check mmdeploy.apis.tensorrt

* update docstring for mmdeploy.apis

* update some docstring

* make style consistent

* update

* resolve comments

* resolve comments
2021-09-24 10:40:39 +08:00
AllentDan ec66d47057
[Feature] Add speed test components (#86)
* add time counter

* add time-count to all backends

* fix lint

* add docstring and unit tests

* use test instead

* remove enable member

* refinement

* replace runtime error with assert and log speed with a single line

* fix unit tests

* resolve comments and add file output

* remove an argument
2021-09-22 19:42:16 +08:00
q.yao 4c0b36b7ff
[Refactor] Refactor config v1 (#80)
* [Refactor] Refactor configs according to new standard (#67)

* modify cfg and cfg_util

* modify tensorrt config

* fix bug

* lint

* Fix

1. Delete print
2. Modify the return value from "False, None" to "None" and related code
3. Rename 2 get functions

* modify apply_marks

* [Feature] Refactor ocr config (#71)

* add text detection config refactor

* add text recognition refactor

* add static exporting for mmocr

* fix lint

* set max space in child config

* use Sequence[int] instead

* add assert input_shape

* fix static bug and add ppl ort and trt static (#77)

* [Feature] Refine setup.py (#61)

* add setup.py and related files

* lint

* Edit requirements

* modify onnx version

* modify according to comments

* [Refactor] Refactor mmseg configs  (#73)

* refactor mmseg config

* change create_input

* fix lint

* fix lint

* fix lint

* fix yapf

* fix yapf

* update export

* remove Segmentation

* remove tast assert

* add onnx_config

* remove hardcode

* Inherit with static

* Remove blank line

* Add segmentation task enum

* add assert task

* mmocr version 0.3.0 (#79)

* add dump_info

* [Feature]: Refactor config in mmdet (#75)

* support onnxruntime

* add two stage

* test two-stage ort and ppl

* update fcos post_params

* fix calib

* test ok with maskrcnn dynamic

* add empty line

* add static into config filename

* add input_shape to create_input in mmdet

* add static to some configs

* remove todo codes

* remove partition config in base

* refactor create_input

* rename task name in mmdet

* return None if input_shape is None

* add size info into mmdet configs filenames

* reorganize mmdet configs

* add object detection task for mmdet

* rename get_mmdet_params

* keep naming style consistent

* update post_params for fcos

* fix typo in ncnn config

* [Refactor] Refactor mmedit static config (#78)

* add static cfg

* update create_input

* [Refactor]: Refactor mmcls configs (#74)

* refactor mmcls2.0

* fix classify_tensorrt_dynamic.py

* fix classify_tensorrt_dynmic.py

* classify_tensorrt_dynamic_int8.py

* fix file name

* fix ncnn ppl

* updata prepare_input.py

* update utils.py

* updata constant.py

* add

* fix prepare_input.py

* fix prepare_input.py

* add static config file

* add blank lines

* fix prepare_input.py(wait test)

* fix input_shape(wait test)

* Update prepare_input.py

* fix classification_tensorrt_dynamic(wait test)

* fix classification_tensorrt_dynamic_int8(wait test)

* fix classification_tensorrt_static_int8(wait test)

* Rename classification_tensorrt_dynamic.py to classification_tensorrt_dynamic-224x224-224x224.py

* Rename classification_tensorrt_dynamic_int8.py to classification_tensorrt_dynamic_int8-224x224-224x224.py

* Rename classification_tensorrt_dynamic_int8-224x224-224x224.py to classification_tensorrt_int8_dynamic_224x224-224x224.py

* Rename classification_tensorrt_dynamic-224x224-224x224.py to classification_tensorrt_dynamic_224x224-224x224.py

* Rename classification_tensorrt_static.py to classification_tensorrt_static_224x224.py

* Rename classification_tensorrt_static_int8.py to classification_tensorrt_int8_static_224x224.py

* Update prepare_input.py

* Rename classification_tensorrt_dynamic_224x224-224x224.py to classification_tensorrt_dynamic-224x224-224x224.py

* Rename classification_tensorrt_int8_dynamic_224x224-224x224.py to classification_tensorrt_int8-dynamic_224x224-224x224.py

* Rename classification_tensorrt_int8-dynamic_224x224-224x224.py to classification_tensorrt_int8_dynamic-224x224-224x224.py

* Rename classification_tensorrt_int8_static_224x224.py to classification_tensorrt_int8_static-224x224.py

* Rename classification_tensorrt_static_224x224.py to classification_tensorrt_static-224x224.py

* Update prepare_input.py

* Update prepare_input.py

* Update prepare_input.py

* Update prepare_input.py

* Update prepare_input.py

* Update prepare_input.py

* Update prepare_input.py

* change logging msg

Co-authored-by: maningsheng <mnsheng@yeah.net>

* fix

* fix else branch

* fix bug for trt in mmseg

* enable dump trt info

* fix trt static for mmdet

* remove two-stage_partition_tensorrt_static-800x1344 config

* fix wrong backend in ppl config

* fix partition calibration

Co-authored-by: Yifan Zhou <singlezombie@163.com>
Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com>
Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
Co-authored-by: RunningLeon <maningsheng@sensetime.com>
Co-authored-by: VVsssssk <88368822+VVsssssk@users.noreply.github.com>
Co-authored-by: maningsheng <mnsheng@yeah.net>
Co-authored-by: AllentDan <AllentDan@yeah.net>
2021-09-16 10:26:09 +08:00
AllentDan 10793f488e
[Feture] Export preprocess and deploy information to SDK (#65)
* add export info

* add dump-info funciton

* add collect info

* fix lint

* add docstring

* docstring

* docstring
2021-09-13 18:50:29 +08:00
q.yao 15b25e2cd8
value=-1 as default (#59) 2021-09-06 10:27:53 +08:00
q.yao 2b98040b26
[Feature] Refactor v1 (#56)
* [Refactor] add enum class and use functions to get configuration (#40)

* add task and codebase enum class

* use funcitons to get config

* Refactor wrappers of mmcls and mmseg (#41)

* move wrappers of cls & det to apis

* remove get_classes_from_config

* rename onnx_helper to onnx_utils

* move import to outside of class

* refactor ortwrappers

* Refactor build dataset and dataloader for mmseg (#44)

* refactor build_dataset and build_dataloader for mmcls and mmseg

* remove repeated classes

* set build_dataloader with shuffle=False

* [Refactor] pplwrapper and mmocr refactor (#46)

* add

* add pplwrapper and refactor mmocr

* fix lint

* remove unused arguments

* apply dict input for pplwrapper and ortwrapper

* add condition before import ppl and ort stuff

* update ppl (#51)

* Refactor return value and extract_model (#54)

* remove ret_value

* refactor extract_model

* fix typo

* resolve comments

* [Refactor] Refactor model inference pipeline (#52)

* move attribute_to_dict to extract_model

* simplify the inference and visualization

* remove unused import

* [Feature] Support SRCNN in mmedit with ONNXRuntime and TensorRT (#45)

* finish mmedit-ort

* edit __init__ files

* add noqa

* add tensorrt support

* 1. Rename "base.py"
2. Move srcnn.py to correct directory

* fix bugs

* remove figures

* align to refactor-v1

* update comment in srcnn

* fix lint

* newfunc -> new_func

* Add visualize.py

split visualize() in each codebase

* fix lint

* fix lint

* remove unnecessary code in ORTRestorer

* remove .api

* edit super(), remove dataset

* [Refactor]: Change name of split to partition (#57)

* refactor mmcls configs

* refactor mmdet configs and split params

* rename rest split to partition from master

* remove base.py

* fix init of inference class

* fix mmocr init, add show_result alias

Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com>
Co-authored-by: RunningLeon <maningsheng@sensetime.com>
Co-authored-by: Yifan Zhou <singlezombie@163.com>
2021-09-01 15:43:49 +08:00
RunningLeon e5dc959276
[Feature]: Support PSPNet with static shape in ORT and TRT (#39)
* support pspnet with static shape

* set default as None to --test-img
2021-08-20 13:39:03 +08:00
q.yao fd40119694
[Feature] TensorRT int8 support (#35)
* fix custom ops support, fix multiple mark bug, add name mapping

* check if the value_info need to be added

* remove unnecessary print

* add nms implement

* two stage split wip

* add two stage split

* add split retinanet visualize

* add two stage split (wip)

* finish two stage split

* fix lint

* move parse string to mmdeploy.utils

* add func mark count dict

* use assert_cfg_valid

* update func count before add Mark

* fix dynamic shape support

* add calib data generator

* create calib dataset

* finish end2end int8

* add split two stage tensorrt visualize
2021-08-19 12:56:00 +08:00
AllentDan 7c465654b9
[Feature] Add dbnet18 and crnn support (#36)
* add mmocr

re-orgnize codes

save codes

save codes

save codes

add dbnet18

* fix lint

* support crnn

* fix lint

* resolve comments

* resolve conflicts

* resolve module registry error

* test

* resolve comments

* fix lint

* use algrithm_type and add dataset evaluation

* suit newest mmocr

* fix lint and remove trt version check
2021-08-19 11:53:00 +08:00
q.yao 4c8c34d354
[Feature] Enable faster rcnn split onnxruntime (#27)
* fix custom ops support, fix multiple mark bug, add name mapping

* check if the value_info need to be added

* remove unnecessary print

* add nms implement

* two stage split wip

* add two stage split

* add split retinanet visualize

* add two stage split (wip)

* finish two stage split

* fix lint

* move parse string to mmdeploy.utils

* add func mark count dict

* use assert_cfg_valid

* update func count before add Mark

* fix dynamic shape support
2021-08-13 10:06:28 +08:00
hanrui1sensetime f8b62ae4d0
[Feature] Support NCNN inference tests (#34)
* add inference test

* fix for review comments

* add inference test results table

* fix grammer errors

* fix typo
2021-08-12 17:38:38 +08:00
hanrui1sensetime e05521c933
[Feature] Merge NCNN deployment to grimoire based on mmcls - revert [#25](https://github.com/grimoire/deploy_prototype/pull/25) (#30)
* add

* change VulkanSDK to 1.2.176.1

* add ncnn cmakelist

* add ncnn source code as third party

* add all ncnn

* ncnn compile passed

* onnx2ncnn correctly

* fix code style

* merge_as_grimoire_design, only backend_ops, manually register.

* remove data and test sh

* remove build example

* remove config ncnn

* remove onnx2ncnn intermediate files

* remove other files auto-generated

* remove vulkan tools

* remove Vulkan, gitignore new rules, __init__ new lines

* rollback __init__ to grimoire

* remove pytorch version pending

* grimoire comments reply 1, 3, 4

* reply comment 5,6,7

* add auto definer, add python register

* fix lint

* add ncnn deploy support

* add model_wrapper, fix a typo bug, and add code comment for onnx2ncnn(WIP)

* add model wrapper ncnn

* fix lint

* fix pep8

* fix pre-commit-config.yaml paths

* fix import

* fix lint

* remove sys.path.append

* remove sys

* isort fix

* fix double quoted

* fix trailing space

* try fix isort

* fix clang-format-9

* fix requests

* fix all comments

* Fix typo

* test code for grimoire

* fix ops register

* new definere

* fix visualization of mmcls

* remove temp

* fix flake8

* fix seed-isort-config

* fix thirdparty

* fix thirdparty

* fix yapf

* fix third_party_sort

* fix third party

* fix clang-format

* try fix clang-format

* try to fix clang format 9 customreshape

* try fix clang-format-9

* try fix clang-format-9

* try fix clang-format-9

* try fix ext

* fix onnx2ncnn

* Fix comments

* Fix Comments

* Fix Comments

* Fix Comments

* Fix conflict

* Fix flake8

* Update .isort.cfg

* Update ncnn_ext.cpp

* Update ncnn_ext.cpp

* fix missing ncnn backend code

* delete out of date comments of gather.cpp

* add DeployBaseClassifier

* add return -100 error

* clear out-of-date to do comments

Co-authored-by: 韩睿 <SENSETIME\hanrui1@cn0614008774l.domain.sensetime.com>
Co-authored-by: grimoire <yaoqian@sensetime.com>
Co-authored-by: grimoire <streetyao@live.com>
2021-08-05 14:06:47 +08:00
AllentDan f607f1965b
[Feature] Align datasets (#29)
* add test tool and re-orgnize apis.utils

* handle topk and refine codes

* add cls export and test support

* fix lint

* move ort into wrapper

* resolve conflicts

* resolve comments

* resolve conflicts

* resolve comments and padding mrcnn

* resolve comments
2021-08-03 17:12:44 +08:00
q.yao ff39377833
[Feature] Retinanet split support (#19)
* prepare for split

* mark multiclass nms

* redesign mark decorator to handle input/output names better (#17)

* redesign mark decorator to handle input/output names better

* fixed a bug in rename_value; robustify extract_model

* fix lint

* fix log in deploy pipeline

* fix onnxruntime config

* fix lint

* update connect init

* rename is_inspecting

* simplify function_mark

Co-authored-by: Li Zhang <lzhang329@gmail.com>
2021-07-23 13:18:32 +08:00
AllentDan 9647ab12db
Add cls visualization (#18)
* add cls visualization tool

* fix lint

* remove reduandant

* align result
2021-07-22 09:58:53 +08:00
RunningLeon 10a2385d01
Support exporting to ONNX for Faster R-CNN (#20)
* update rewriter for rpn head

* new nms implement

* update bbox_head to support fasterrcnn with tensorrt

* rewrite SingleRoIExtractor

* remove unnecessary import

* fix fcos and bbox_nms

* resolve comments

* resolve comments

Co-authored-by: grimoire <yaoqian@sensetime.com>
2021-07-21 19:46:23 +08:00
AllentDan 1718501b4f
[Feature] Support fsaf fcos (#14)
* add fcos and fsaf

* remove is_in_onnx_export

* fix lint

* fix lint

* remove forwards
2021-07-13 20:13:39 +08:00
RunningLeon c4b7dad2ec
add visualization for mmdet (#13)
* add visualization for mmdet

* resolve comments

* update code, enable visualize on nvidia driver>11

Co-authored-by: grimoire <yaoqian@sensetime.com>
2021-07-13 17:21:02 +08:00
RunningLeon 9f0e2d4339
changed codebase structure (#10)
* add delta2bbox rewriter

* rename onnx2trt

* add rewriter: anchor_generator_single_level_grid_priors

* Revert "add rewriter: anchor_generator_single_level_grid_priors"

This reverts commit ac7cf272942c4787bf143c0d67e414b0d2603b75.

* update comments

* remove clamp rewriter

* remove unused func

* reconstruct codes

* remomve mark

* create export package for codebases

* remove grid_sampler symbolic

* reorganize nms parts

* fix conflicts

* update unittest
2021-07-12 16:26:44 +08:00
lzhangzz 66300c0c74
Supports setting input/output names explicitly via mark decorator (#4)
* setting names of inputs and outputs via mark decorator

* fix bug in mark, move extract_model to mmdeploy/apis and add test cases

* remove fsaf rewrite, which is not needed any more after recent changes

* replace print with log and add fixture to clear test tmp file
2021-07-07 14:15:26 +08:00
q.yao 27880afdcd
[Feature] better retinanet support (#5)
* better retinanet support

* prepare split export tensorrt

* optimizer cfg

* free anchor when static shape

* fix docstring
2021-07-01 11:42:07 +08:00
grimoire e08dbf26b3 add CI 2021-06-29 10:10:15 +08:00
lzhangzz ef41f69553
add model splitting support (#1)
* add function marker and model extractor

* add fsaf split & partial mask rcnn split, import extract.py

* 1. add value renaming  2. add apply_marks in config to turn on/off marks

* rewind changes on pytorch2onnx.py

Co-authored-by: q.yao <streetyao@live.com>
2021-06-28 20:35:15 +08:00
q.yao 6c47ee3d2a
add tensorrt support (#2) 2021-06-23 13:14:28 +08:00
maningsheng 2317ee659a support retinanet pytorch2onnx 2021-06-17 17:37:08 +08:00
grimoire b777d27bcf add return value in deploy.py 2021-06-17 17:26:32 +08:00
grimoire 3bf3b9cdda fix lint 2021-06-17 15:29:12 +08:00
grimoire 12792727e7 add configs, add convert pipeline 2021-06-17 15:28:23 +08:00