Commit Graph

163 Commits

Author SHA1 Message Date
xianzhe.xxz
393aa01e2b 支持DAMO-YOLO系列模型的Finetune功能。
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11249980

* add tinynas-detection trainer, evaluater and dataloader.

* add timmer and general torch dist tools.

* replace loguru with modelscope standard logger.

* merge duplicate tinynas-detection model files.

* add compatibility of json config files.
2023-01-12 11:08:17 +08:00
ly261666
66f7134db8 [to #42322933] Add FLRGB Face Liveness RGB Model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11264617
2023-01-12 10:05:56 +08:00
bin.xue
78f812dbb6 [to #42322933] add speech separation finetune
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11379892
2023-01-12 07:02:46 +08:00
huizheng.hz
466200f355 NAFNet Image Deblurring pipeline and finetune support
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11300932

* fix psnr/ssim metrics for NAFNet (image denoise)

* add subset_name when loading dataset (NAFNet image denoising)
2023-01-11 22:18:03 +08:00
shenweichao.swc
1f9d6e51f6 [to #42322933] Add panovit-layout-estimation-pipeline
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11234460
2023-01-11 20:43:09 +08:00
fengyutong.fyt
1e5df96b46 [to #42322933] Add vision middleware to maas lib 2023-01-11 15:16:22 +08:00
shengzhe.sz
9667548d9e add panorama_depth_estimation
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11366392

* add panorama_depth_estimation: pipeline, model, test

* modelhub:https://modelscope.cn/models/damo/cv_unifuse_panorama-depth-estimation/summary
2023-01-11 10:23:24 +08:00
zhangzhicheng.zzc
fd24a243e6 token classfication model output unified
Before this commit, different token classification models return the logits with various format, such as logits with speical token, with out speical token or predicts squeezed ignored of mask label.
After the commit, all of the results return the logits or predicts with respect of mask label.

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11370609
2023-01-10 23:13:29 +08:00
liaojie.laj
fcf6e6431f submit video frame interpolation model
增加视频插帧模型
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11188339
2023-01-10 06:57:19 +08:00
ryan.yy
c77213d919 图像换脸模型上MaaS
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11347556
2023-01-10 05:45:55 +08:00
yuze.zyz
672a4ba107 Refactor tinynas objectdetection & img-classification
Refactor tinynas model & pipeline:
1. Move preprocess method out of model to image.py
2. Pipeline calls the model.__call__ method instead of inference method
3. Remove some obsolete code
4. Add a default preprocessor to preprocessor.py instead of change config in modelhub.
5. Standardize the return value of model

Refactor general image classification pipeline:
1. Change the preprocessor build method of ofa to avoid dependencies between multi-modal and cv.
2. Move preprocess method out of pipeline to image.py
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11185418
2023-01-09 21:33:42 +08:00
zhicheng.sc
2cb89609f0 Add video stabilization model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11204574

* add video stabilization model
2023-01-09 21:23:26 +08:00
pangda
9794fbf1c7 [to #42322933] token_cls default sequence_length: 128 -> 512
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11303820
2023-01-09 20:30:11 +08:00
lanjinpeng.ljp
b2a78b5ad0 支持视频多目标跟踪模型
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11249098
2023-01-09 07:11:15 +08:00
ziyuan.tw
9552a8533e add ConvNeXt model
增加ConvNeXt模型和修复代码bug:模型需要输入BGR格式图像,但读取图片代码默认输出为RGB格式,造成归一化预处理错误,模型精度下降。
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11192762
2023-01-09 06:56:05 +08:00
kangxiaoyang.kxy
2260dd45fa 1230-image-colorization
submit new algorithm for image colorization and corresponding pipeline.
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11179627
2023-01-05 15:02:49 +08:00
bin.xue
0fdf37312f [to #42322933] feat:add speech separation pipeline
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11255740
2023-01-03 13:18:44 +08:00
lee.lcy
ed28b849eb [to #42322933] add domain specific object detection models
添加垂类目标检测模型。
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11265502
2022-12-30 14:19:16 +08:00
ly261666
6583e6f398 [to #42322933] Add FLIR Face Liveness Model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11250177
2022-12-29 14:55:51 +08:00
dadong.gxd
42557b0867 add cv_pointnet2_sceneflow-estimation_general
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11201880
2022-12-29 08:09:57 +08:00
yeqinghao.yqh
f7a7504782 Add HiTeA model for VideoQA and Caption (12.30)
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11201652
2022-12-29 08:06:34 +08:00
qianmu.ywh
59b7f411b8 add video depth estimation pipeline
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11189483
2022-12-28 06:34:02 +08:00
wjq264216
e57424eaf0 [to #42322933] Add ocr-detection-vlpt-pipeline to maas lib
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11213036
2022-12-28 06:26:15 +08:00
huizheng.hz
cb9f1bfb8d 1230-video-super-resolution
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11090960
2022-12-28 06:18:50 +08:00
hannah.yh
b36bb72869 add image skychange
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10947701
2022-12-21 17:40:46 +08:00
hooks.hl
0d205c8322 add support for cv_rdevos_video-object-segmentation
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11066863
2022-12-21 07:37:27 +08:00
shouzhou.bx
95ede6378e [to #42322933] 1230: add hand detection 2022-12-16 13:24:02 +08:00
ly261666
492aa98d9a [to #42322933] Add face mask model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10897202

    * [to #42322933] 新增ArcFace人脸识别模型
2022-12-04 15:25:27 +08:00
jinmao.yk
d84a1df65a add video human matting task code
add video human matting task code
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10839854
2022-12-02 19:44:01 +08:00
yuze.zyz
0e4766f41d Fix bugs in testlevel1 & 2
1. Fix: ws regression failed.
2. Fix: label2id missing in text_classification_pipeline when preprocessor is passed in through args.
3. Fix: remove obsolete imports
4. Fix: incomplete modification
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10936431
2022-12-01 21:16:55 +08:00
rujiao.lrj
9d8eb5b0b3 support license plate detection
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10917315
2022-12-01 19:48:06 +08:00
yuze.zyz
bb5512d1ab [to #42322933] Refactor NLP and fix some user feedbacks
1. Abstract keys of dicts needed by nlp metric classes into the init method
2. Add Preprocessor.save_pretrained to save preprocessor information
3. Abstract the config saving function, which can lead to normally saving in the direct call of from_pretrained, and the modification of cfg one by one when training.
4. Remove SbertTokenizer and VecoTokenizer, use transformers' tokenizers instead
5. Use model/preprocessor's from_pretrained in all nlp pipeline classes.
6. Add model_kwargs and preprocessor_kwargs in all nlp pipeline classes
7. Add base classes for fill-mask and text-classification preprocessor, as a demo for later changes
8. Fix user feedback: Re-train the model in continue training scenario
9. Fix user feedback: Too many checkpoint saved
10. Simplify the nlp-trainer
11. Fix user feedback: Split the default trainer's __init__ method, which makes user easier to override
12. Add safe_get to Config class

----------------------------  Another refactor from version 36 -------------------------

13. Name all nlp transformers' preprocessors from TaskNamePreprocessor to TaskNameTransformersPreprocessor, for example:
      TextClassificationPreprocessor -> TextClassificationTransformersPreprocessor
14. Add a base class per task for all nlp tasks' preprocessors which has at least two sub-preprocessors
15. Add output classes of nlp models
16. Refactor the logic for token-classification
17. Fix bug: checkpoint_hook does not support pytorch_model.pt
18. Fix bug: Pipeline name does not match with task name, so inference will not succeed after training
       NOTE: This is just a stop bleeding solution, the root cause is the uncertainty of the relationship between models and pipelines
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10723513

    * add save_pretrained to preprocessor

* save preprocessor config in hook

* refactor label-id mapping fetching logic

* test ok on sentence-similarity

* run on finetuning

* fix bug

* pre-commit passed

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/preprocessors/nlp/nlp_base.py

* add params to init

* 1. support max ckpt num 2. support ignoring others but bin file in continue training 3. add arguments to some nlp metrics

* Split trainer init impls to overridable methods

* remove some obsolete tokenizers

* unfinished

* support input params in pipeline

* fix bugs

* fix ut bug

* fix bug

* fix ut bug

* fix ut bug

* fix ut bug

* add base class for some preprocessors

* Merge commit '379867739548f394d0fa349ba07afe04adf4c8b6' into feat/refactor_config

* compatible with old code

* fix ut bug

* fix ut bugs

* fix bug

* add some comments

* fix ut bug

* add a requirement

* fix pre-commit

* Merge commit '0451b3d3cb2bebfef92ec2c227b2a3dd8d01dc6a' into feat/refactor_config

* fixbug

* Support function type in registry

* fix ut bug

* fix bug

* Merge commit '5f719e542b963f0d35457e5359df879a5eb80b82' into feat/refactor_config

# Conflicts:
#	modelscope/pipelines/nlp/multilingual_word_segmentation_pipeline.py
#	modelscope/pipelines/nlp/named_entity_recognition_pipeline.py
#	modelscope/pipelines/nlp/word_segmentation_pipeline.py
#	modelscope/utils/hub.py

* remove obsolete file

* rename init args

* rename params

* fix merge bug

* add default preprocessor config for ner-model

* move a method a util file

* remove unused config

* Fix a bug in pbar

* bestckptsaver:change default ckpt numbers to 1

* 1. Add assert to max_epoch 2. split init_dist and get_device 3. change cmp func name

* Fix bug

* fix bug

* fix bug

* unfinished refactoring

* unfinished

* uw

* uw

* uw

* uw

* Merge branch 'feat/refactor_config' into feat/refactor_trainer

# Conflicts:
#	modelscope/preprocessors/nlp/document_segmentation_preprocessor.py
#	modelscope/preprocessors/nlp/faq_question_answering_preprocessor.py
#	modelscope/preprocessors/nlp/relation_extraction_preprocessor.py
#	modelscope/preprocessors/nlp/text_generation_preprocessor.py

* uw

* uw

* unify nlp task outputs

* uw

* uw

* uw

* uw

* change the order of text cls pipeline

* refactor t5

* refactor tg task preprocessor

* fix

* unfinished

* temp

* refactor code

* unfinished

* unfinished

* unfinished

* unfinished

* uw

* Merge branch 'feat/refactor_config' into feat/refactor_trainer

* smoke test pass

* ut testing

* pre-commit passed

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/models/nlp/bert/document_segmentation.py
#	modelscope/pipelines/nlp/__init__.py
#	modelscope/pipelines/nlp/document_segmentation_pipeline.py

* merge master

* unifnished

* Merge branch 'feat/fix_bug_pipeline_name' into feat/refactor_config

* fix bug

* fix ut bug

* support ner batch inference

* fix ut bug

* fix bug

* support batch inference on three nlp tasks

* unfinished

* fix bug

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/models/base/base_model.py
#	modelscope/pipelines/nlp/conversational_text_to_sql_pipeline.py
#	modelscope/pipelines/nlp/dialog_intent_prediction_pipeline.py
#	modelscope/pipelines/nlp/dialog_modeling_pipeline.py
#	modelscope/pipelines/nlp/dialog_state_tracking_pipeline.py
#	modelscope/pipelines/nlp/document_segmentation_pipeline.py
#	modelscope/pipelines/nlp/faq_question_answering_pipeline.py
#	modelscope/pipelines/nlp/feature_extraction_pipeline.py
#	modelscope/pipelines/nlp/fill_mask_pipeline.py
#	modelscope/pipelines/nlp/information_extraction_pipeline.py
#	modelscope/pipelines/nlp/named_entity_recognition_pipeline.py
#	modelscope/pipelines/nlp/sentence_embedding_pipeline.py
#	modelscope/pipelines/nlp/summarization_pipeline.py
#	modelscope/pipelines/nlp/table_question_answering_pipeline.py
#	modelscope/pipelines/nlp/text2text_generation_pipeline.py
#	modelscope/pipelines/nlp/text_classification_pipeline.py
#	modelscope/pipelines/nlp/text_error_correction_pipeline.py
#	modelscope/pipelines/nlp/text_generation_pipeline.py
#	modelscope/pipelines/nlp/text_ranking_pipeline.py
#	modelscope/pipelines/nlp/token_classification_pipeline.py
#	modelscope/pipelines/nlp/word_segmentation_pipeline.py
#	modelscope/pipelines/nlp/zero_shot_classification_pipeline.py
#	modelscope/trainers/nlp_trainer.py

* pre-commit passed

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/preprocessors/__init__.py

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fixbug

* pre-commit passed

* fix bug

* fixbug

* fix bug

* fix bug

* fix bug

* fix bug

* self review done

* fixbug

* fix bug

* fix bug

* fix bugs

* remove sub-token offset mapping

* fix name bug

* add some tests

* 1. support batch inference of text-generation,text2text-generation,token-classification,text-classification 2. add corresponding UTs

* add old logic back

* tmp save

* add tokenize by words logic back

* move outputs file back

* revert veco token-classification back

* fix typo

* Fix description

* Merge commit '4dd99b8f6e4e7aefe047c68a1bedd95d3ec596d6' into feat/refactor_config

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/pipelines/builder.py
2022-11-30 23:52:17 +08:00
qianmu.ywh
fc6d0c64bc add image_depth_estimation: model, pipeline, test
接入图像深度估计模型,新增model、pipeline、test
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10857764
2022-11-28 18:00:48 +08:00
bin.xue
1969c3a1db test: add new demo data
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10872422
2022-11-25 17:31:59 +08:00
shiyi.zxh
7661470350 ofa增加asr任务
ofa增加asr任务infer
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10761019
2022-11-25 12:16:33 +08:00
zhangzhicheng.zzc
7fc49e5fa0 support table recognition task
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10773667
2022-11-24 14:49:58 +08:00
wendi.hwd
ff55bd9436 support camouflaged-detection
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10834768
2022-11-24 10:24:05 +08:00
yuze.zyz
605cd7f44a [to #42322933] NLP 1030 Refactor
Features:
1. Refactor the directory structure of nlp models. All model files are placed into either the model folder or the task_model folder
2. Refactor all the comments to google style
3. Add detail comments to important tasks and nlp models, to list the description of the model, and its preprocessor&trainer
4. Model Exporting now supports a direct all to TorchModelExporter(no need to derive from it)
5. Refactor model save_pretrained method to support direct running(independent from trainer)
6. Remove the judgement of Model in the pipeline base class, to support outer register models running in our pipelines
7. Nlp trainer now has a NLPTrainingArguments class , user can pass arguments into the dataclass, and use it as a normal cfg_modify_fn, to simplify the operation of modify cfg.
8. Merge the BACKBONES and the MODELS, so user can get a backbone with the Model.from_pretrained call
9. Model.from_pretrained now support a task argument, so user can use a backbone and load it with a specific task class.
10. Support Preprocessor.from_pretrained method
11. Add standard return classes to important nlp tasks, so some of the pipelines and the models are independent now, the return values of the models will always be tensors, and the pipelines will take care of the conversion to numpy and the following stuffs.
12. Split the file of the nlp preprocessors, to make the dir structure more clear.

Bugs Fixing:
1. Fix a bug that lr_scheduler can be called earlier than the optimizer's step
2. Fix a bug that the direct call of Pipelines (not from pipeline(xxx)) throws error
3. Fix a bug that the trainer will not call the correct TaskDataset class
4. Fix a bug that the internal loading of dataset will throws error in the trainer class
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10490585
2022-10-25 12:26:25 +08:00
liugao.lg
baff7c5b64 [to #42322933]add ofa-ocr-recogniiton pipeline
新增ofa关于日常场景文字识别的任务,主要包括:
1、新增pipeline及task名称定义;
2、新增pipeline、task、model及prepreocess核心类方法的代码逻辑;
3、其它同步修正的小细节逻辑;
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10471089
2022-10-21 09:11:15 +08:00
yuze.zyz
acba1786b0 [to #42322933] Fix bug in UT daily
1. Fix bugs in daily test
2. Fix a bug that the updating of lr is before the first time of updating of optimizer
    TODO this will still cause warnings when GA is above 1
3. Remove the judgement of mode in text-classification's preprocessor to fit the base trainer(Bug)
     Update some regression bins to fit the preprocessor
4. Update the regression tool to let outer code modify atol and rtol
5. Add the default metric for text-classification task
6. Remove the useless ckpt conversion method in bert to avoid the requirement of tf when loading modeling_bert
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10430764
2022-10-20 15:29:34 +08:00
shichen.fsc
1483c64638 [to #42322933] Fix ASR error when resample failed, and add all asr models UT, add apply-cmvn for pytorch models
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10465241
2022-10-20 12:54:37 +08:00
shuying.shu
cb570d586c add referring video object segmentation pipeline
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10400324
2022-10-18 16:10:10 +08:00
zhangzhicheng.zzc
e3eb01f4ce [to #42322933]update word-segmentation regression results
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10432186
2022-10-17 23:31:44 +08:00
leyuan.hjy
172522d196 [to #42322933]video-object-detection init
新增video-object-detection 算法
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10247489
2022-10-17 20:58:23 +08:00
bin.xue
3863efc14d [to #42322933] add far field KWS trainer
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10275823
2022-10-13 10:15:33 +08:00
yuxiang.tyx
2989492bc0 [to #42322933]更新face_detection_scrfd模型并支持finetune, 新增card_detection模型
1. 调整face_detection的文件层级(scrfd与其余新增face_detection方法平级);
2. 增加极大脸/旋转脸的检测方法,更新了新模型;
3. 支持读入数据集并finetune和eval;
4. 新增card_detection模型,支持读入datasethub数据集并finetune
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10244540
2022-10-12 19:58:50 +08:00
shouzhou.bx
4cb5f8a2cd [to #42322933] add human whole body model and image object detection auto model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10319306
2022-10-12 19:53:14 +08:00
ashui.cbh
69da8f91ac [to #42322933]suport image inpainting
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10111615
2022-10-11 20:49:13 +08:00
ryan.yy
ff69439c4f [to #42322933]add image_body_reshaping code
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10217723

    * add image_body_reshaping code
2022-10-10 17:42:41 +08:00
tingwei.gtw
a079ab922f [to #42322933] add product-segmentation pipeline
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10252583
2022-10-01 21:46:40 +08:00