Commit Graph

39 Commits (872e54497e4038f165a1fd4a37d3d4a18c61978e)

Author SHA1 Message Date
FreyWang 872e54497e
[Feature] Support eval concate dataset and add tool to show dataset (#833)
* [Feature] Add tool to show origin or augmented train data

* [Feature] Support eval concate dataset

* Add docstring and modify evaluate of concate dataset

Signed-off-by: FreyWang <wangwxyz@qq.com>

* format concat dataset in subfolder of imgfile_prefix

Signed-off-by: FreyWang <wangwxyz@qq.com>

* add unittest of concate dataset

Signed-off-by: FreyWang <wangwxyz@qq.com>

* update unittest for eval dataset with CLASSES is None

Signed-off-by: FreyWang <wangwxyz@qq.com>

* [FIX] bug of generator,  which lead metric to nan when pre_eval=False

Signed-off-by: FreyWang <wangwxyz@qq.com>

* format code

Signed-off-by: FreyWang <wangwxyz@qq.com>

* add more unittest

* add more unittest

* optim concat dataset builder
2021-09-09 13:00:23 +08:00
sennnnn d35fbbdb47
[Enhancement] Add Dev tools to boost develop (#798)
* Modify default work dir when training.

* Refactor gather_models.py.

* Add train and test matching list.

* Regression benchmark list.

* lower readme name to upper readme name.

* Add url check tool and model inference test tool.

* Modify tool name.

* Support duplicate mode of log json url check.

* Add regression benchmark evaluation automatic tool.

* Add train script generator.

* Only Support script running.

* Add evaluation results gather.

* Add exec Authority.

* Automatically make checkpoint root folder.

* Modify gather results save path.

* Coarse-grained train results gather tool.

* Complete benchmark train script.

* Make some little modifications.

* Fix checkpoint urls.

* Fix unet checkpoint urls.

* Fix fast scnn & fcn checkpoint url.

* Fix fast scnn checkpoint urls.

* Fix fast scnn url.

* Add differential results calculation.

* Add differential results of regression benchmark train results.

* Add an extra argument to select model.

* Update nonlocal_net & hrnet checkpoint url.

* Fix checkpoint url of hrnet and Fix some tta evaluation results and modify gather models tool.

* Modify fast scnn checkpoint url.

* Resolve new comments.

* Fix url check status code bug.

* Resolve some comments.

* Modify train scripts generator.

* Modify work_dir of regression benchmark results.

* model gather tool modification.
2021-09-02 09:44:51 -07:00
谢昕辰 c11da07e18
[Enhancement] Delete convert function and add instruction to ViT/Swin README.md (#791)
* delete convert function and add instruction to README.md

* unified model convert and README

* remove url

* fix import error

* fix unittest

* rename pretrain

* rename vit and deit pretrain

* Update upernet_deit-b16_512x512_160k_ade20k.py

* Update upernet_deit-b16_512x512_80k_ade20k.py

* Update upernet_deit-b16_ln_mln_512x512_160k_ade20k.py

* Update upernet_deit-b16_mln_512x512_160k_ade20k.py

* Update upernet_deit-s16_512x512_160k_ade20k.py

* Update upernet_deit-s16_512x512_80k_ade20k.py

* Update upernet_deit-s16_ln_mln_512x512_160k_ade20k.py

* Update upernet_deit-s16_mln_512x512_160k_ade20k.py

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
2021-08-25 15:00:41 -07:00
sennnnn e235c1a824
[Refactor] Support progressive test with fewer memory cost (#709)
* Support progressive test with fewer memory cost.

* Temp code

* Using processor to refactor evaluation workflow.

* refactor eval hook.

* Fix process bar.

* Fix middle save argument.

* Modify some variable name of dataset evaluate api.

* Modify some viriable name of eval hook.

* Fix some priority bugs of eval hook.

* Depreciated efficient_test.

* Fix training progress blocked by eval hook.

* Depreciated old test api.

* Fix test api error.

* Modify outer api.

* Build a sampler test api.

* TODO: Refactor format_results.

* Modify variable names.

* Fix num_classes bug.

* Fix sampler index bug.

* Fix grammaly bug.

* Support batch sampler.

* More readable test api.

* Remove some command arg and fix eval hook bug.

* Support format-only arg.

* Modify format_results of datasets.

* Modify tool which use test apis.

* support cityscapes eval

* fixed cityscapes

* 1. Add comments for batch_sampler;

2. Keep eval hook api same and add deprecated warning;

3. Add doc string for dataset.pre_eval;

* Add efficient_test doc string.

* Modify test tool to compat old version.

* Modify eval hook to compat with old version.

* Modify test api to compat old version api.

* Sampler explanation.

* update warning

* Modify deploy_test.py

* compatible with old output, add efficient test back

* clear logic of exclusive

* Warning about efficient_test.

* Modify format_results save folder.

* Fix bugs of format_results.

* Modify deploy_test.py.

* Update doc

* Fix deploy test bugs.

* Fix custom dataset unit tests.

* Fix dataset unit tests.

* Fix eval hook unit tests.

* Fix some imcompatible.

* Add pre_eval argument for eval hooks.

* Update eval hook doc string.

* Make pre_eval false in default.

* Add unit tests for dataset format_results.

* Fix some comments and bc-breaking bug.

* Fix pre_eval set cfg field.

* Remove redundant codes.

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
2021-08-19 20:44:58 -07:00
谢昕辰 f72727c563
[Tools] Add vit/swin/mit convert weight scripts (#783)
* init scripts

* update markdown

* update markdown

* add docs

* delete mit converter and use torch load function

* rename segformer readme

* update doc

* modify doc

* 更新中文文档

* Update useful_tools.md

* Update useful_tools.md

* modify doc

* update segformer.yml
2021-08-17 18:42:42 -07:00
Junjun2016 441be4e435
[Dcos] Add header for files (#796)
* Add header for files

* Delete header in config files
2021-08-16 23:16:55 -07:00
sennnnn bcafcdd2aa
[Feature] Add segformer decode head and related train config (#599)
* [Feature]Segformer re-implementation

* Using act_cfg and norm_cfg to control activation and normalization

* Split this PR into several little PRs

* Fix lint error

* Remove SegFormerHead

* [Feature] Add segformer decode head and related train config

* Add ade20K trainval support for segformer

1. Add related train and val configs;

2. Add AlignedResize;

* Set arg: find_unused_parameters = True

* parameters init refactor

* 1. Refactor segformer backbone parameters init;

2. Remove rebundant functions and unit tests;

* Remove rebundant codes

* Replace Linear Layer to 1X1 Conv

* Use nn.ModuleList to refactor segformer head.

* Remove local to_xtuple

* 1. Remove rebundant codes;

2. Modify module name;

* Refactor the backbone of segformer using mmcv.cnn.bricks.transformer.py

* Fix some code logic bugs.

* Add mit_convert.py to match pretrain keys of segformer.

* Resolve some comments.

* 1. Add some assert to ensure right params;

2. Support flexible peconv position;

* Add pe_index assert and fix unit test.

* 1. Add doc string for MixVisionTransformer;

2. Add some unit tests for MixVisionTransformer;

* Use hw_shape to pass shape of feature map.

* 1. Fix doc string of MixVisionTransformer;

2. Simplify MixFFN;

3. Modify H, W to hw_shape;

* Add more unit tests.

* Add doc string for shape convertion functions.

* Add some unit tests to improve code coverage.

* Fix Segformer backbone pretrain weights match bug.

* Modify configs of segformer.

* resolve the shape convertion functions doc string.

* Add pad_to_patch_size arg.

* Support progressive test with fewer memory cost.

* Modify default value of pad_to_patch_size arg.

* Temp code

* Using processor to refactor evaluation workflow.

* refactor eval hook.

* Fix process bar.

* Fix middle save argument.

* Modify some variable name of dataset evaluate api.

* Modify some viriable name of eval hook.

* Fix some priority bugs of eval hook.

* Fix some bugs about model loading and eval hook.

* Add ade20k 640x640 dataset.

* Fix related segformer configs.

* Depreciated efficient_test.

* Fix training progress blocked by eval hook.

* Depreciated old test api.

* Modify error patch size.

* Fix pretrain of mit_b0

* Fix the test api error.

* Modify dataset base config.

* Fix test api error.

* Modify outer api.

* Build a sampler test api.

* TODO: Refactor format_results.

* Modify variable names.

* Fix num_classes bug.

* Fix sampler index bug.

* Fix grammaly bug.

* Add part of benchmark results.

* Support batch sampler.

* More readable test api.

* Remove some command arg and fix eval hook bug.

* Support format-only arg.

* Modify format_results of datasets.

* Modify tool which use test apis.

* Update readme.

* Update readme of segformer.

* Updata readme of segformer.

* Update segformer readme and fix segformer mit_b4.

* Update readme of segformer.

* Clean AlignedResize related config.

* Clean code from pr #709

* Clean code from pr #709

* Add 512x512 segformer_mit-b5.

* Fix lint.

* Fix some segformer head bugs.

* Add segformer unit tests.

* Replace AlignedResize to ResizeToMultiple.

* Modify readme of segformer.

* Fix bug of ResizeToMultiple.

* Add ResizeToMultiple unit tests.

* Resolve conflict.

* Simplify the implementation of ResizeToMultiple.

* Update test results.

* Fix multi-scale test error when resize_ratio=1.75 and input size=640x640.

* Update segformer results.

* Update Segformer results.

* Fix some url bugs and pipelines bug.

* Move ckpt convertion to tools.

* Add segformer official pretrain weights usage.

* Clean redundant codes.

* Remove redundant codes.

* Unfied format.

* Add description for segformer converter.

* Update workers.
2021-08-13 13:31:19 +08:00
q.yao 58f5dbce7d
support cpu deploy_test (#769) 2021-08-10 20:47:08 +08:00
Miguel Méndez f80066910c
[Fix] Replace interpolate with resize (#731)
* Replace interpolate with resize

* Replace nn.Upsample with ops.Upsample

* Fix test
2021-07-28 16:56:22 +08:00
谢昕辰 58c9ac0cae
skip wrong iter number (#716) 2021-07-27 19:07:36 +08:00
David de la Iglesia Castro 420783d007
Add mmseg2torchserve tool (#552)
* Add docker/serve

* Add handler

* Add mmseg2torchserve

* Fix mmv minimum version

* Update docs with model serving section

* Update useful_tools.md

* pre-commit

* Update useful_tools.md

* Add 3dogs to resources

* Move mask to resources
2021-07-05 21:11:47 +08:00
Jerry Jiarui XU 0c5b026db1
[Refactor]: Unified parameter initialization (#567)
* [Refactor]: Unified parameter initialization

* fixed pretrained
2021-06-16 21:41:29 -07:00
Yinhao Li 9dd3e15f83
[feature]: Able to use save_best option (#575)
* Add  save_best option in eval_hook.

* Update meta to fix best model can not test bug

* refactor with _do_evaluate

* remove redundent

* add meta

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
2021-06-02 16:25:26 -07:00
q.yao dc5d53b7f3
[Feature] Update deploy test tools (#553)
* add trt test tool

* create deploy_test, update document

* fix with isort

* move import inside __init__

* remove comment, fix doc

* update document
2021-05-24 20:37:46 -07:00
q.yao 8558163753
fix verify bugs (#547)
* fix verify bugs

* rename args
2021-05-12 21:14:41 -07:00
q.yao 805eda81ea
add onnx to tensorrt tools (#542) 2021-05-11 20:02:27 -07:00
q.yao bdf5adf2ce
[Feature] add onnxruntime test tool (#498)
* add onnxruntime test tool, update pytorch2onnx to support slice export

* onnx convert with custom output shape, update test code

* update pytorch2onnx, add rescale_shape support, add document

* update doc for lint error fixing

* remove cpu flag in ort_test.py

* change class name, fix cuda error

* remote comment

* fix bug of torch2onnx

* mIOU to mIoU
2021-04-28 20:38:01 -07:00
Jerry Jiarui XU 89f8a6a410
[Bug fix] fixed fp16 inference (#497)
* fixed fp16

* update fps
2021-04-24 09:57:33 -07:00
sshuair 8f37e558c9
add tool pytorch2torchscript (#469)
* add tool pytorch2torchscript

* fix the assert message for pytorch version.
2021-04-19 08:51:49 -07:00
q.yao 789d1a142b
add dynamic export and visualize to pytorch2onnx (#463)
* add dynamic export and visualize to pytorch2onnx

* update document

* fix lint

* fix dynamic error and add visualization

* fix lint

* update docstring

* update doc

* Update help info for --show

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* fix lint

Co-authored-by: maningsheng <maningsheng@sensetime.com>
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2021-04-12 11:54:59 -07:00
sshuair 9524f37fe6
add print model graph args for tools/print_config.py (#451)
* add print model graph for print_config tool

* add print model graph for print_config tool

* fix double quoted

* fix iosort
2021-04-06 15:14:54 -07:00
David de la Iglesia Castro 6acd77e345
Add opacity option to show_result (#425) 2021-03-22 20:34:38 -07:00
谢昕辰 b81894636b
add plot_logs tool (#426)
* Support plot logs

* add plot log docs
2021-03-21 22:05:32 -07:00
Jerry Jiarui XU faaf29e668
[Improvement] Move train_cfg/test_cfg inside model (#341)
* [Improvement] Move train_cfg/test_cfg inside model

* fixed config dict

* fixed config dict
2021-01-19 17:06:23 -08:00
yamengxi ce46d70d20
memory efficient test (#330)
* memory efficient test

* implement efficient test

* merge

* Add document and docstring

* fix unit test

* add memory usage report
2021-01-09 23:47:31 -08:00
Jerry Jiarui XU feefc6a9de
Doc refactor (#311)
* refactor docs

* add docs

* add modelzoo

* refactor getting started
2020-12-22 18:36:49 -08:00
yamengxi 8a174a3511
fix dataset jpg bug (#213)
* fix dataset jpg bug

* fix syntax error
2020-10-28 11:58:44 -07:00
yamengxi 3bdc276888
Define blood vessel dataset and fix filename bug (#203)
* fix filename bug

* define blood vessel dataset

* redo debug

* fix small bug

* rename dataset

Co-authored-by: yamengxi <yamengxi@sensetime.com>
2020-10-22 17:27:40 -07:00
yamengxi cb2e0d3cb1
Add blood vessel dataset processing script (#184)
* Add blood vessel dataset processing script

* Fix syntax error

* Fix syntax error

* Fix syntax error

* Fix bugs

* Fix bugs

* Fix bugs

* Use safe functions and expand more apis

* Use safe functions and expand more apis

* Fix hard code and verify dataset integrity
2020-10-18 01:22:42 -07:00
Lei Yang f70507168f
Remove redundancies in pytorch2onnx (#160)
* rm redundancies

* re-add some packages
2020-09-30 10:11:34 +08:00
yamengxi a2738fd9be
Add Pascal Context to mmsegmentation (#133)
* Add Pascal Context to mmsegmentation

* Add benchmark result to Pascal Context

* fix mmcv version

* fix code syntax

* fix code syntax again

* Update mmseg/models/segmentors/encoder_decoder.py

update hint

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* update comment

* fix pascal context model path

* fix model path mistake again

* fix model path mistake again

* fix model path mistakes again

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2020-09-22 14:56:13 +08:00
robin Han 0c04f52c42
Onnx upsample (#100)
* add customized Upsample which can convert to ONNX

* support multiply decode head for hrnet

* support size for Upsample
2020-09-03 19:59:13 +08:00
Jerry Jiarui XU bafc0e5db6
Fixed slide inference (#90) 2020-08-25 20:01:01 +08:00
robin Han 9ba22456d9
add pytorch2onnx part (#12)
* add pytorch2onnx part

* Update according to the latest mmcv

* add docstring

* update docs

* update docs

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
2020-08-14 03:28:21 +08:00
Jerry Jiarui XU 4e29452dbe
Auto get version info and git hash (#55)
* Auto get version info and git hash

* bump 0.5.1 and update doc

* fixed docs

* Add change log
2020-08-11 19:23:35 +08:00
Evgeny Nizhibitsky 00f56eb00f
Add load-from flag (#33)
* Add load-from flag

* minor update

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
2020-08-06 21:17:49 +08:00
Jerry Jiarui XU 1af2ad6a9f
Fixed voc aug convert (#19)
* Fixed voc aug convert

* update getting_started.md

* add class balanced doc
2020-07-17 09:55:28 +08:00
Jerry Jiarui XU b975d3b72a
Add test tutorial (#9)
* add test tutorial

* remote torch/torchvision from requirements

* update getting started

* rename drop_out_ratio -> dropout_ratio
2020-07-12 23:53:56 +08:00
Jiarui XU b2724da80b init commit 2020-07-10 02:39:01 +08:00