modelscope1.21.0
Published
ModelScope: bring the notion of Model-as-a-Service to life.
pip install modelscope
Package Downloads
Authors
Project URLs
Requires Python
Dependencies
- requests
>=2.25
- tqdm
>=4.64.0
- urllib3
>=1.26
- accelerate
; extra == "all"
- albumentations
>=1.0.3; extra == "all"
- av
>=9.2.0; extra == "all"
- bmt-clipit
>=1.0; extra == "all"
- chumpy
; extra == "all"
- clip
>=1.0; extra == "all"
- control-ldm
; extra == "all"
- ddpm-guided-diffusion
; extra == "all"
- diffusers
; extra == "all"
- easydict
; extra == "all"
- easyrobust
; extra == "all"
- edit-distance
; extra == "all"
- face-alignment
>=1.3.5; extra == "all"
- fairscale
>=0.4.1; extra == "all"
- fastai
>=1.0.51; extra == "all"
- ffmpeg
>=1.4; extra == "all"
- ffmpeg-python
>=0.2.0; extra == "all"
- ftfy
; extra == "all"
- fvcore
; extra == "all"
- imageio
>=2.9.0; extra == "all"
- imageio-ffmpeg
>=0.4.2; extra == "all"
- imgaug
>=0.4.0; extra == "all"
- kornia
>=0.5.0; extra == "all"
- lmdb
; extra == "all"
- lpips
; extra == "all"
- matplotlib
>=3.8.0; extra == "all"
- ml-collections
; extra == "all"
- mmcls
>=0.21.0; extra == "all"
- mmdet
<=2.28.2,>=2.25.0; extra == "all"
- mmdet3d
==1.0.0a1; extra == "all"
- mmsegmentation
<=0.30.0; extra == "all"
- moviepy
==1.0.3; extra == "all"
- nerfacc
==0.2.2; extra == "all"
- networkx
; extra == "all"
- numba
; extra == "all"
- omegaconf
; extra == "all"
- onnx
; extra == "all"
- onnxruntime
>=1.10; extra == "all"
- onnxsim
; extra == "all"
- open-clip-torch
>=2.7.0; extra == "all"
- opencv-python
; extra == "all"
- paint-ldm
; extra == "all"
- pandas
; extra == "all"
- panopticapi
; extra == "all"
- Pillow
>=6.2.0; extra == "all"
- plyfile
>=0.7.4; extra == "all"
- psutil
; extra == "all"
- pyclipper
; extra == "all"
- PyMCubes
<=0.1.4; extra == "all"
- pytorch-lightning
; extra == "all"
- regex
; extra == "all"
- scikit-image
; extra == "all"
- scikit-learn
; extra == "all"
- shapely
; extra == "all"
- shotdetect-scenedetect-lgss
>=0.0.4; extra == "all"
- smplx
; extra == "all"
- tensorflow-estimator
>=1.15.1; extra == "all"
- tf-slim
; extra == "all"
- thop
; extra == "all"
- timm
>=0.4.9; extra == "all"
- torch-scatter
; extra == "all"
- torchmetrics
>=0.6.2; extra == "all"
- torchsummary
>=1.5.1; extra == "all"
- torchvision
; extra == "all"
- tqdm
; extra == "all"
- transformers
>=4.26.0; extra == "all"
- trimesh
; extra == "all"
- ujson
; extra == "all"
- utils
; extra == "all"
- videofeatures-clipit
>=1.0; extra == "all"
- yacs
; extra == "all"
- addict
; extra == "all"
- attrs
; extra == "all"
- datasets
<=3.0.1,>=3.0.0; extra == "all"
- einops
; extra == "all"
- oss2
; extra == "all"
- Pillow
; extra == "all"
- python-dateutil
>=2.1; extra == "all"
- scipy
; extra == "all"
- setuptools
==69.5.1; extra == "all"
- simplejson
>=3.3.0; extra == "all"
- sortedcontainers
>=1.5.9; extra == "all"
- urllib3
>=1.26; extra == "all"
- transformers
; extra == "all"
- requests
>=2.25; extra == "all"
- tqdm
>=4.64.0; extra == "all"
- cloudpickle
; extra == "all"
- decord
>=0.6.0; extra == "all"
- diffusers
>=0.25.0; extra == "all"
- fairseq
==0.12.2; extra == "all"
- ftfy
>=6.0.3; extra == "all"
- librosa
==0.10.1; extra == "all"
- pycocoevalcap
>=1.2; extra == "all"
- pycocotools
>=2.0.4; extra == "all"
- pydot
; extra == "all"
- pytorch-lightning
<=1.7.7; extra == "all"
- rapidfuzz
; extra == "all"
- rouge-score
<=0.0.4; extra == "all"
- sacrebleu
; extra == "all"
- safetensors
; extra == "all"
- soundfile
; extra == "all"
- taming-transformers-rom1504
; extra == "all"
- timm
; extra == "all"
- tokenizers
; extra == "all"
- transformers
>=4.27.1; extra == "all"
- unicodedata2
; extra == "all"
- zhconv
; extra == "all"
- boto3
; extra == "all"
- embeddings
; extra == "all"
- filelock
; extra == "all"
- jieba
>=0.42.1; extra == "all"
- matplotlib
; extra == "all"
- megatron-util
; extra == "all"
- nltk
; extra == "all"
- protobuf
<3.21.0,>=3.19.0; extra == "all"
- pythainlp
; extra == "all"
- pyvi
; extra == "all"
- rouge
; extra == "all"
- sacremoses
>=0.0.41; extra == "all"
- sentencepiece
; extra == "all"
- seqeval
; extra == "all"
- spacy
<=3.7.0,>=2.3.5; extra == "all"
- stanza
; extra == "all"
- subword-nmt
>=0.3.8; extra == "all"
- termcolor
; extra == "all"
- transformers
>=4.12.0; extra == "all"
- biopython
; extra == "all"
- iopath
; extra == "all"
- ipdb
; extra == "all"
- tensorboardX
; extra == "all"
- fastapi
; extra == "all"
- sse-starlette
; extra == "all"
- uvicorn
; extra == "all"
- addict
; extra == "audio"
- attrs
; extra == "audio"
- datasets
<=3.0.1,>=3.0.0; extra == "audio"
- einops
; extra == "audio"
- oss2
; extra == "audio"
- Pillow
; extra == "audio"
- python-dateutil
>=2.1; extra == "audio"
- scipy
; extra == "audio"
- setuptools
==69.5.1; extra == "audio"
- simplejson
>=3.3.0; extra == "audio"
- sortedcontainers
>=1.5.9; extra == "audio"
- transformers
; extra == "audio"
- urllib3
>=1.26; extra == "audio"
- funasr
>=1.0.0; extra == "audio"
- kaldiio
; extra == "audio"
- kwsbp
>=0.0.6; extra == "audio"
- matplotlib
; extra == "audio"
- py-sound-connect
>=0.1; extra == "audio"
- SoundFile
>0.10; extra == "audio"
- tensorboardX
; extra == "audio"
- hdbscan
; extra == "audio"
- hyperpyyaml
; extra == "audio"
- librosa
==0.10.1; extra == "audio"
- MinDAEC
; extra == "audio"
- mir-eval
>=0.7; extra == "audio"
- rotary-embedding-torch
>=0.1.5; extra == "audio"
- speechbrain
>=0.5.12; extra == "audio"
- torchaudio
; extra == "audio"
- tqdm
; extra == "audio"
- umap-learn
; extra == "audio"
- bitstring
; extra == "audio"
- greenlet
>=1.1.2; extra == "audio"
- inflect
; extra == "audio"
- jedi
>=0.18.1; extra == "audio"
- kantts
; extra == "audio"
- lxml
; extra == "audio"
- msgpack
>=1.0.4; extra == "audio"
- parso
>=0.8.3; extra == "audio"
- pexpect
>=4.8.0; extra == "audio"
- pickleshare
>=0.7.5; extra == "audio"
- prompt-toolkit
>=3.0.30; extra == "audio"
- protobuf
; extra == "audio"
- ptflops
; extra == "audio"
- ptyprocess
>=0.7.0; extra == "audio"
- pygments
>=2.12.0; extra == "audio"
- pysptk
<0.1.19,>=0.1.15; extra == "audio"
- pytorch-wavelets
; extra == "audio"
- PyWavelets
>=1.0.0; extra == "audio"
- scikit-learn
; extra == "audio"
- sox
; extra == "audio"
- traitlets
>=5.3.0; extra == "audio"
- ttsfrd
>=0.1.2; extra == "audio"
- unidecode
; extra == "audio"
- wcwidth
>=0.2.5; extra == "audio"
- funcodec
>=0.2.0; extra == "audio"
- addict
; extra == "audio-asr"
- attrs
; extra == "audio-asr"
- datasets
<=3.0.1,>=3.0.0; extra == "audio-asr"
- einops
; extra == "audio-asr"
- oss2
; extra == "audio-asr"
- Pillow
; extra == "audio-asr"
- python-dateutil
>=2.1; extra == "audio-asr"
- scipy
; extra == "audio-asr"
- setuptools
==69.5.1; extra == "audio-asr"
- simplejson
>=3.3.0; extra == "audio-asr"
- sortedcontainers
>=1.5.9; extra == "audio-asr"
- transformers
; extra == "audio-asr"
- urllib3
>=1.26; extra == "audio-asr"
- funasr
>=1.0.0; extra == "audio-asr"
- addict
; extra == "audio-kws"
- attrs
; extra == "audio-kws"
- datasets
<=3.0.1,>=3.0.0; extra == "audio-kws"
- einops
; extra == "audio-kws"
- oss2
; extra == "audio-kws"
- Pillow
; extra == "audio-kws"
- python-dateutil
>=2.1; extra == "audio-kws"
- scipy
; extra == "audio-kws"
- setuptools
==69.5.1; extra == "audio-kws"
- simplejson
>=3.3.0; extra == "audio-kws"
- sortedcontainers
>=1.5.9; extra == "audio-kws"
- transformers
; extra == "audio-kws"
- urllib3
>=1.26; extra == "audio-kws"
- kaldiio
; extra == "audio-kws"
- kwsbp
>=0.0.6; extra == "audio-kws"
- matplotlib
; extra == "audio-kws"
- py-sound-connect
>=0.1; extra == "audio-kws"
- SoundFile
>0.10; extra == "audio-kws"
- tensorboardX
; extra == "audio-kws"
- addict
; extra == "audio-signal"
- attrs
; extra == "audio-signal"
- datasets
<=3.0.1,>=3.0.0; extra == "audio-signal"
- einops
; extra == "audio-signal"
- oss2
; extra == "audio-signal"
- Pillow
; extra == "audio-signal"
- python-dateutil
>=2.1; extra == "audio-signal"
- scipy
; extra == "audio-signal"
- setuptools
==69.5.1; extra == "audio-signal"
- simplejson
>=3.3.0; extra == "audio-signal"
- sortedcontainers
>=1.5.9; extra == "audio-signal"
- transformers
; extra == "audio-signal"
- urllib3
>=1.26; extra == "audio-signal"
- hdbscan
; extra == "audio-signal"
- hyperpyyaml
; extra == "audio-signal"
- librosa
==0.10.1; extra == "audio-signal"
- MinDAEC
; extra == "audio-signal"
- mir-eval
>=0.7; extra == "audio-signal"
- rotary-embedding-torch
>=0.1.5; extra == "audio-signal"
- SoundFile
>0.10; extra == "audio-signal"
- speechbrain
>=0.5.12; extra == "audio-signal"
- torchaudio
; extra == "audio-signal"
- tqdm
; extra == "audio-signal"
- umap-learn
; extra == "audio-signal"
- addict
; extra == "audio-tts"
- attrs
; extra == "audio-tts"
- datasets
<=3.0.1,>=3.0.0; extra == "audio-tts"
- einops
; extra == "audio-tts"
- oss2
; extra == "audio-tts"
- Pillow
; extra == "audio-tts"
- python-dateutil
>=2.1; extra == "audio-tts"
- scipy
; extra == "audio-tts"
- setuptools
==69.5.1; extra == "audio-tts"
- simplejson
>=3.3.0; extra == "audio-tts"
- sortedcontainers
>=1.5.9; extra == "audio-tts"
- transformers
; extra == "audio-tts"
- urllib3
>=1.26; extra == "audio-tts"
- bitstring
; extra == "audio-tts"
- greenlet
>=1.1.2; extra == "audio-tts"
- inflect
; extra == "audio-tts"
- jedi
>=0.18.1; extra == "audio-tts"
- kantts
; extra == "audio-tts"
- librosa
==0.10.1; extra == "audio-tts"
- lxml
; extra == "audio-tts"
- matplotlib
; extra == "audio-tts"
- msgpack
>=1.0.4; extra == "audio-tts"
- parso
>=0.8.3; extra == "audio-tts"
- pexpect
>=4.8.0; extra == "audio-tts"
- pickleshare
>=0.7.5; extra == "audio-tts"
- prompt-toolkit
>=3.0.30; extra == "audio-tts"
- protobuf
; extra == "audio-tts"
- ptflops
; extra == "audio-tts"
- ptyprocess
>=0.7.0; extra == "audio-tts"
- pygments
>=2.12.0; extra == "audio-tts"
- pysptk
<0.1.19,>=0.1.15; extra == "audio-tts"
- pytorch-wavelets
; extra == "audio-tts"
- PyWavelets
>=1.0.0; extra == "audio-tts"
- scikit-learn
; extra == "audio-tts"
- sox
; extra == "audio-tts"
- tensorboardx
; extra == "audio-tts"
- tqdm
; extra == "audio-tts"
- traitlets
>=5.3.0; extra == "audio-tts"
- ttsfrd
>=0.1.2; extra == "audio-tts"
- unidecode
; extra == "audio-tts"
- wcwidth
>=0.2.5; extra == "audio-tts"
- addict
; extra == "cv"
- attrs
; extra == "cv"
- datasets
<=3.0.1,>=3.0.0; extra == "cv"
- einops
; extra == "cv"
- oss2
; extra == "cv"
- Pillow
; extra == "cv"
- python-dateutil
>=2.1; extra == "cv"
- scipy
; extra == "cv"
- setuptools
==69.5.1; extra == "cv"
- simplejson
>=3.3.0; extra == "cv"
- sortedcontainers
>=1.5.9; extra == "cv"
- transformers
; extra == "cv"
- urllib3
>=1.26; extra == "cv"
- accelerate
; extra == "cv"
- albumentations
>=1.0.3; extra == "cv"
- av
>=9.2.0; extra == "cv"
- bmt-clipit
>=1.0; extra == "cv"
- chumpy
; extra == "cv"
- clip
>=1.0; extra == "cv"
- control-ldm
; extra == "cv"
- ddpm-guided-diffusion
; extra == "cv"
- diffusers
; extra == "cv"
- easydict
; extra == "cv"
- easyrobust
; extra == "cv"
- edit-distance
; extra == "cv"
- face-alignment
>=1.3.5; extra == "cv"
- fairscale
>=0.4.1; extra == "cv"
- fastai
>=1.0.51; extra == "cv"
- ffmpeg
>=1.4; extra == "cv"
- ffmpeg-python
>=0.2.0; extra == "cv"
- ftfy
; extra == "cv"
- fvcore
; extra == "cv"
- imageio
>=2.9.0; extra == "cv"
- imageio-ffmpeg
>=0.4.2; extra == "cv"
- imgaug
>=0.4.0; extra == "cv"
- kornia
>=0.5.0; extra == "cv"
- lmdb
; extra == "cv"
- lpips
; extra == "cv"
- matplotlib
>=3.8.0; extra == "cv"
- ml-collections
; extra == "cv"
- mmcls
>=0.21.0; extra == "cv"
- mmdet
<=2.28.2,>=2.25.0; extra == "cv"
- mmdet3d
==1.0.0a1; extra == "cv"
- mmsegmentation
<=0.30.0; extra == "cv"
- moviepy
==1.0.3; extra == "cv"
- nerfacc
==0.2.2; extra == "cv"
- networkx
; extra == "cv"
- numba
; extra == "cv"
- omegaconf
; extra == "cv"
- onnx
; extra == "cv"
- onnxruntime
>=1.10; extra == "cv"
- onnxsim
; extra == "cv"
- open-clip-torch
>=2.7.0; extra == "cv"
- opencv-python
; extra == "cv"
- paint-ldm
; extra == "cv"
- pandas
; extra == "cv"
- panopticapi
; extra == "cv"
- Pillow
>=6.2.0; extra == "cv"
- plyfile
>=0.7.4; extra == "cv"
- psutil
; extra == "cv"
- pyclipper
; extra == "cv"
- PyMCubes
<=0.1.4; extra == "cv"
- pytorch-lightning
; extra == "cv"
- regex
; extra == "cv"
- scikit-image
; extra == "cv"
- scikit-learn
; extra == "cv"
- shapely
; extra == "cv"
- shotdetect-scenedetect-lgss
>=0.0.4; extra == "cv"
- smplx
; extra == "cv"
- tensorflow-estimator
>=1.15.1; extra == "cv"
- tf-slim
; extra == "cv"
- thop
; extra == "cv"
- timm
>=0.4.9; extra == "cv"
- torch-scatter
; extra == "cv"
- torchmetrics
>=0.6.2; extra == "cv"
- torchsummary
>=1.5.1; extra == "cv"
- torchvision
; extra == "cv"
- tqdm
; extra == "cv"
- transformers
>=4.26.0; extra == "cv"
- trimesh
; extra == "cv"
- ujson
; extra == "cv"
- utils
; extra == "cv"
- videofeatures-clipit
>=1.0; extra == "cv"
- yacs
; extra == "cv"
- addict
; extra == "datasets"
- attrs
; extra == "datasets"
- datasets
<=3.0.1,>=3.0.0; extra == "datasets"
- einops
; extra == "datasets"
- oss2
; extra == "datasets"
- Pillow
; extra == "datasets"
- python-dateutil
>=2.1; extra == "datasets"
- scipy
; extra == "datasets"
- setuptools
==69.5.1; extra == "datasets"
- simplejson
>=3.3.0; extra == "datasets"
- sortedcontainers
>=1.5.9; extra == "datasets"
- urllib3
>=1.26; extra == "datasets"
- addict
; extra == "framework"
- attrs
; extra == "framework"
- datasets
<=3.0.1,>=3.0.0; extra == "framework"
- einops
; extra == "framework"
- oss2
; extra == "framework"
- Pillow
; extra == "framework"
- python-dateutil
>=2.1; extra == "framework"
- scipy
; extra == "framework"
- setuptools
==69.5.1; extra == "framework"
- simplejson
>=3.3.0; extra == "framework"
- sortedcontainers
>=1.5.9; extra == "framework"
- transformers
; extra == "framework"
- urllib3
>=1.26; extra == "framework"
- requests
>=2.25; extra == "hub"
- tqdm
>=4.64.0; extra == "hub"
- urllib3
>=1.26; extra == "hub"
- addict
; extra == "multi-modal"
- attrs
; extra == "multi-modal"
- datasets
<=3.0.1,>=3.0.0; extra == "multi-modal"
- einops
; extra == "multi-modal"
- oss2
; extra == "multi-modal"
- Pillow
; extra == "multi-modal"
- python-dateutil
>=2.1; extra == "multi-modal"
- scipy
; extra == "multi-modal"
- setuptools
==69.5.1; extra == "multi-modal"
- simplejson
>=3.3.0; extra == "multi-modal"
- sortedcontainers
>=1.5.9; extra == "multi-modal"
- transformers
; extra == "multi-modal"
- urllib3
>=1.26; extra == "multi-modal"
- accelerate
; extra == "multi-modal"
- cloudpickle
; extra == "multi-modal"
- decord
>=0.6.0; extra == "multi-modal"
- diffusers
>=0.25.0; extra == "multi-modal"
- fairseq
==0.12.2; extra == "multi-modal"
- ftfy
>=6.0.3; extra == "multi-modal"
- librosa
==0.10.1; extra == "multi-modal"
- opencv-python
; extra == "multi-modal"
- pycocoevalcap
>=1.2; extra == "multi-modal"
- pycocotools
>=2.0.4; extra == "multi-modal"
- pydot
; extra == "multi-modal"
- pytorch-lightning
<=1.7.7; extra == "multi-modal"
- rapidfuzz
; extra == "multi-modal"
- rouge-score
<=0.0.4; extra == "multi-modal"
- sacrebleu
; extra == "multi-modal"
- safetensors
; extra == "multi-modal"
- soundfile
; extra == "multi-modal"
- taming-transformers-rom1504
; extra == "multi-modal"
- timm
; extra == "multi-modal"
- tokenizers
; extra == "multi-modal"
- torchvision
; extra == "multi-modal"
- transformers
>=4.27.1; extra == "multi-modal"
- unicodedata2
; extra == "multi-modal"
- zhconv
; extra == "multi-modal"
- addict
; extra == "nlp"
- attrs
; extra == "nlp"
- datasets
<=3.0.1,>=3.0.0; extra == "nlp"
- einops
; extra == "nlp"
- oss2
; extra == "nlp"
- Pillow
; extra == "nlp"
- python-dateutil
>=2.1; extra == "nlp"
- scipy
; extra == "nlp"
- setuptools
==69.5.1; extra == "nlp"
- simplejson
>=3.3.0; extra == "nlp"
- sortedcontainers
>=1.5.9; extra == "nlp"
- transformers
; extra == "nlp"
- urllib3
>=1.26; extra == "nlp"
- boto3
; extra == "nlp"
- embeddings
; extra == "nlp"
- filelock
; extra == "nlp"
- ftfy
; extra == "nlp"
- jieba
>=0.42.1; extra == "nlp"
- matplotlib
; extra == "nlp"
- megatron-util
; extra == "nlp"
- nltk
; extra == "nlp"
- pandas
; extra == "nlp"
- protobuf
<3.21.0,>=3.19.0; extra == "nlp"
- pythainlp
; extra == "nlp"
- pyvi
; extra == "nlp"
- regex
; extra == "nlp"
- rouge
; extra == "nlp"
- sacremoses
>=0.0.41; extra == "nlp"
- scikit-learn
; extra == "nlp"
- sentencepiece
; extra == "nlp"
- seqeval
; extra == "nlp"
- spacy
<=3.7.0,>=2.3.5; extra == "nlp"
- stanza
; extra == "nlp"
- subword-nmt
>=0.3.8; extra == "nlp"
- termcolor
; extra == "nlp"
- tokenizers
; extra == "nlp"
- transformers
>=4.12.0; extra == "nlp"
- zhconv
; extra == "nlp"
- addict
; extra == "science"
- attrs
; extra == "science"
- datasets
<=3.0.1,>=3.0.0; extra == "science"
- einops
; extra == "science"
- oss2
; extra == "science"
- Pillow
; extra == "science"
- python-dateutil
>=2.1; extra == "science"
- scipy
; extra == "science"
- setuptools
==69.5.1; extra == "science"
- simplejson
>=3.3.0; extra == "science"
- sortedcontainers
>=1.5.9; extra == "science"
- transformers
; extra == "science"
- urllib3
>=1.26; extra == "science"
- biopython
; extra == "science"
- iopath
; extra == "science"
- ipdb
; extra == "science"
- lmdb
; extra == "science"
- ml-collections
; extra == "science"
- tensorboardX
; extra == "science"
- tokenizers
; extra == "science"
- fastapi
; extra == "server"
- sse-starlette
; extra == "server"
- uvicorn
; extra == "server"
Introduction
ModelScope is built upon the notion of “Model-as-a-Service” (MaaS). It seeks to bring together most advanced machine learning models from the AI community, and streamlines the process of leveraging AI models in real-world applications. The core ModelScope library open-sourced in this repository provides the interfaces and implementations that allow developers to perform model inference, training and evaluation.
In particular, with rich layers of API-abstraction, the ModelScope library offers unified experience to explore state-of-the-art models spanning across domains such as CV, NLP, Speech, Multi-Modality, and Scientific-computation. Model contributors of different areas can integrate models into the ModelScope ecosystem through the layered-APIs, allowing easy and unified access to their models. Once integrated, model inference, fine-tuning, and evaluations can be done with only a few lines of codes. In the meantime, flexibilities are also provided so that different components in the model applications can be customized wherever necessary.
Apart from harboring implementations of a wide range of different models, ModelScope library also enables the necessary interactions with ModelScope backend services, particularly with the Model-Hub and Dataset-Hub. Such interactions facilitate management of various entities (models and datasets) to be performed seamlessly under-the-hood, including entity lookup, version control, cache management, and many others.
Models and Online Accessibility
Hundreds of models are made publicly available on ModelScope (700+ and counting), covering the latest development in areas such as NLP, CV, Audio, Multi-modality, and AI for Science, etc. Many of these models represent the SOTA in their specific fields, and made their open-sourced debut on ModelScope. Users can visit ModelScope(modelscope.cn) and experience first-hand how these models perform via online experience, with just a few clicks. Immediate developer-experience is also possible through the ModelScope Notebook, which is backed by ready-to-use CPU/GPU development environment in the cloud - only one click away on ModelScope.
Some representative examples include:
LLM:
Multi-Modal:
CV:
-
DuGuang - Text Recognition - Line Recognition Model - Chinese and English - General Domain
-
DuGuang - Text Recognition - Line Recognition Model - Chinese and English - General Domain
Audio:
-
Paraformer Speech Recognition - Chinese - General - 16k - Offline - Large - Long Audio Version
-
FSMN Voice Endpoint Detection - Chinese - General - 16k - onnx
-
Monotonic-Aligner Speech Timestamp Prediction - 16k - Offline
-
Speech Synthesis - Chinese - Multiple Emotions Domain - 16k - Multiple Speakers
AI for Science:
Note: Most models on ModelScope are public and can be downloaded without account registration on modelscope website(www.modelscope.cn), please refer to instructions for model download, for dowloading models with api provided by modelscope library or git.
QuickTour
We provide unified interface for inference using pipeline
, fine-tuning and evaluation using Trainer
for different tasks.
For any given task with any type of input (image, text, audio, video...), inference pipeline can be implemented with only a few lines of code, which will automatically load the underlying model to get inference result, as is exemplified below:
>>> from modelscope.pipelines import pipeline
>>> word_segmentation = pipeline('word-segmentation',model='damo/nlp_structbert_word-segmentation_chinese-base')
>>> word_segmentation('今天天气不错,适合出去游玩')
{'output': '今天 天气 不错 , 适合 出去 游玩'}
Given an image, portrait matting (aka. background-removal) can be accomplished with the following code snippet:
>>> import cv2
>>> from modelscope.pipelines import pipeline
>>> portrait_matting = pipeline('portrait-matting')
>>> result = portrait_matting('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/image_matting.png')
>>> cv2.imwrite('result.png', result['output_img'])
The output image with the background removed is:
Fine-tuning and evaluation can also be done with a few more lines of code to set up training dataset and trainer, with the heavy-lifting work of training and evaluation a model encapsulated in the implementation of traner.train()
and
trainer.evaluate()
interfaces.
For example, the gpt3 base model (1.3B) can be fine-tuned with the chinese-poetry dataset, resulting in a model that can be used for chinese-poetry generation.
>>> from modelscope.metainfo import Trainers
>>> from modelscope.msdatasets import MsDataset
>>> from modelscope.trainers import build_trainer
>>> train_dataset = MsDataset.load('chinese-poetry-collection', split='train'). remap_columns({'text1': 'src_txt'})
>>> eval_dataset = MsDataset.load('chinese-poetry-collection', split='test').remap_columns({'text1': 'src_txt'})
>>> max_epochs = 10
>>> tmp_dir = './gpt3_poetry'
>>> kwargs = dict(
model='damo/nlp_gpt3_text-generation_1.3B',
train_dataset=train_dataset,
eval_dataset=eval_dataset,
max_epochs=max_epochs,
work_dir=tmp_dir)
>>> trainer = build_trainer(name=Trainers.gpt3_trainer, default_args=kwargs)
>>> trainer.train()
Why should I use ModelScope library
-
A unified and concise user interface is abstracted for different tasks and different models. Model inferences and training can be implemented by as few as 3 and 10 lines of code, respectively. It is convenient for users to explore models in different fields in the ModelScope community. All models integrated into ModelScope are ready to use, which makes it easy to get started with AI, in both educational and industrial settings.
-
ModelScope offers a model-centric development and application experience. It streamlines the support for model training, inference, export and deployment, and facilitates users to build their own MLOps based on the ModelScope ecosystem.
-
For the model inference and training process, a modular design is put in place, and a wealth of functional module implementations are provided, which is convenient for users to customize their own model inference, training and other processes.
-
For distributed model training, especially for large models, it provides rich training strategy support, including data parallel, model parallel, hybrid parallel and so on.
Installation
Docker
ModelScope Library currently supports popular deep learning framework for model training and inference, including PyTorch, TensorFlow and ONNX. All releases are tested and run on Python 3.7+, Pytorch 1.8+, Tensorflow1.15 or Tensorflow2.0+.
To allow out-of-box usage for all the models on ModelScope, official docker images are provided for all releases. Based on the docker image, developers can skip all environment installation and configuration and use it directly. Currently, the latest version of the CPU image and GPU image can be obtained from:
CPU docker image
# py37
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.6.1
# py38
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py38-torch2.0.1-tf2.13.0-1.9.5
GPU docker image
# py37
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.6.1
# py38
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.8.0-py38-torch2.0.1-tf2.13.0-1.9.5
Setup Local Python Environment
One can also set up local ModelScope environment using pip and conda. ModelScope supports python3.7 and above. We suggest anaconda for creating local python environment:
conda create -n modelscope python=3.8
conda activate modelscope
PyTorch or TensorFlow can be installed separately according to each model's requirements.
After installing the necessary machine-learning framework, you can install modelscope library as follows:
If you only want to play around with the modelscope framework, of trying out model/dataset download, you can install the core modelscope components:
pip install modelscope
If you want to use multi-modal models:
pip install modelscope[multi-modal]
If you want to use nlp models:
pip install modelscope[nlp] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
If you want to use cv models:
pip install modelscope[cv] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
If you want to use audio models:
pip install modelscope[audio] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
If you want to use science models:
pip install modelscope[science] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
Notes
:
-
Currently, some audio-task models only support python3.7, tensorflow1.15.4 Linux environments. Most other models can be installed and used on Windows and Mac (x86).
-
Some models in the audio field use the third-party library SoundFile for wav file processing. On the Linux system, users need to manually install libsndfile of SoundFile(doc link). On Windows and MacOS, it will be installed automatically without user operation. For example, on Ubuntu, you can use following commands:
sudo apt-get update sudo apt-get install libsndfile1
-
Some models in computer vision need mmcv-full, you can refer to mmcv installation guide, a minimal installation is as follows:
pip uninstall mmcv # if you have installed mmcv, uninstall it pip install -U openmim mim install mmcv-full
Learn More
We provide additional documentations including:
- More detailed Installation Guide
- Introduction to tasks
- Use pipeline for model inference
- Finetuning example
- Preprocessing of data
- Evaluation
- Contribute your own model to ModelScope
License
This project is licensed under the Apache License (Version 2.0).
Citation
@Misc{modelscope,
title = {ModelScope: bring the notion of Model-as-a-Service to life.},
author = {The ModelScope Team},
howpublished = {\url{https://github.com/modelscope/modelscope}},
year = {2023}
}