{"id":13460226,"url":"https://github.com/modelscope/modelscope","last_synced_at":"2026-04-01T18:29:59.590Z","repository":{"id":62682221,"uuid":"517552648","full_name":"modelscope/modelscope","owner":"modelscope","description":"ModelScope: bring the notion of Model-as-a-Service to life.","archived":false,"fork":false,"pushed_at":"2025-04-30T06:57:59.000Z","size":56382,"stargazers_count":7811,"open_issues_count":12,"forks_count":804,"subscribers_count":81,"default_branch":"master","last_synced_at":"2025-05-01T13:49:17.944Z","etag":null,"topics":["cv","deep-learning","machine-learning","multi-modal","nlp","python","science","speech"],"latest_commit_sha":null,"homepage":"https://www.modelscope.cn/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modelscope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-25T06:56:02.000Z","updated_at":"2025-05-01T13:35:55.000Z","dependencies_parsed_at":"2022-11-04T11:17:52.140Z","dependency_job_id":"54e95227-e077-4b4b-9c58-31d75ee30544","html_url":"https://github.com/modelscope/modelscope","commit_stats":{"total_commits":2144,"total_committers":239,"mean_commits":8.97071129707113,"dds":0.8964552238805971,"last_synced_commit":"3f7ce9731994511896b1255851943312739ad935"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Fmodelscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelscope","download_url":"https://codeload.github.com/modelscope/modelscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252130400,"owners_count":21699083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cv","deep-learning","machine-learning","multi-modal","nlp","python","science","speech"],"created_at":"2024-07-31T10:00:37.666Z","updated_at":"2026-03-14T05:17:49.389Z","avatar_url":"https://github.com/modelscope.png","language":"Python","readme":"\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"https://modelscope.oss-cn-beijing.aliyuncs.com/modelscope.gif\" width=\"400\"/\u003e\n    \u003cbr\u003e\n\u003cp\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/modelscope)](https://pypi.org/project/modelscope/)\n\u003c!-- [![Documentation Status](https://readthedocs.org/projects/easy-cv/badge/?version=latest)](https://easy-cv.readthedocs.io/en/latest/) --\u003e\n[![license](https://img.shields.io/github/license/modelscope/modelscope.svg)](https://github.com/modelscope/modelscope/blob/master/LICENSE)\n[![open issues](https://isitmaintained.com/badge/open/modelscope/modelscope.svg)](https://github.com/modelscope/modelscope/issues)\n[![GitHub pull-requests](https://img.shields.io/github/issues-pr/modelscope/modelscope.svg)](https://GitHub.com/modelscope/modelscope/pull/)\n[![GitHub latest commit](https://badgen.net/github/last-commit/modelscope/modelscope)](https://GitHub.com/modelscope/modelscope/commit/)\n[![Leaderboard](https://img.shields.io/badge/ModelScope-Check%20Your%20Contribution-orange)](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=modelscope)\n\n\u003c!-- [![GitHub contributors](https://img.shields.io/github/contributors/modelscope/modelscope.svg)](https://GitHub.com/modelscope/modelscope/graphs/contributors/) --\u003e\n\u003c!-- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) --\u003e\n[Discord](https://discord.gg/FMupRv4jUR)\n\n\u003ch4 align=\"center\"\u003e\n\u003ca href=\"https://trendshift.io/repositories/4784\" target=\"_blank\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/repositories/4784\" alt=\"modelscope%2Fmodelscope | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n\u003c/h4\u003e\n\n\u003ch4 align=\"center\"\u003e\n    \u003cp\u003e\n        \u003cb\u003eEnglish\u003c/b\u003e |\n        \u003ca href=\"https://github.com/modelscope/modelscope/blob/master/README_zh.md\"\u003e中文\u003c/a\u003e |\n        \u003ca href=\"https://github.com/modelscope/modelscope/blob/master/README_ja.md\"\u003e日本語\u003c/a\u003e\n    \u003cp\u003e\n\u003c/h4\u003e\n\n\n\u003c/div\u003e\n\n# Introduction\n\n[ModelScope]( https://www.modelscope.cn) 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.\n\n\nIn 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.\n\nApart 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.\n\n# Models and Online Accessibility\n\nHundreds of models are made publicly available on [ModelScope]( https://www.modelscope.cn)  (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](http://www.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](https://www.modelscope.cn).\n\n\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"data/resource/inference.gif\" width=\"1024\"/\u003e\n    \u003cbr\u003e\n\u003cp\u003e\n\nSome representative examples include:\n\nLLM:\n\n* [Yi-1.5-34B-Chat](https://modelscope.cn/models/01ai/Yi-1.5-34B-Chat/summary)\n\n* [Qwen1.5-110B-Chat](https://modelscope.cn/models/qwen/Qwen1.5-110B-Chat/summary)\n\n* [DeepSeek-V2-Chat](https://modelscope.cn/models/deepseek-ai/DeepSeek-V2-Chat/summary)\n\n* [Ziya2-13B-Chat](https://modelscope.cn/models/Fengshenbang/Ziya2-13B-Chat/summary)\n\n* [Meta-Llama-3-8B-Instruct](https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B-Instruct/summary)\n\n* [Phi-3-mini-128k-instruct](https://modelscope.cn/models/LLM-Research/Phi-3-mini-128k-instruct/summary)\n\n\nMulti-Modal:\n\n* [Qwen-VL-Chat](https://modelscope.cn/models/qwen/Qwen-VL-Chat/summary)\n\n* [Yi-VL-6B](https://modelscope.cn/models/01ai/Yi-VL-6B/summary)\n\n* [InternVL-Chat-V1-5](https://modelscope.cn/models/AI-ModelScope/InternVL-Chat-V1-5/summary)\n\n* [deepseek-vl-7b-chat](https://modelscope.cn/models/deepseek-ai/deepseek-vl-7b-chat/summary)\n\n* [OpenSoraPlan](https://modelscope.cn/models/AI-ModelScope/Open-Sora-Plan-v1.0.0/summary)\n\n* [OpenSora](https://modelscope.cn/models/luchentech/OpenSora-STDiT-v1-HQ-16x512x512/summary)\n\n* [I2VGen-XL](https://modelscope.cn/models/iic/i2vgen-xl/summary)\n\nCV:\n\n* [DamoFD Face Detection Key Point Model - 0.5G](https://modelscope.cn/models/damo/cv_ddsar_face-detection_iclr23-damofd/summary)\n\n* [BSHM Portrait Matting](https://modelscope.cn/models/damo/cv_unet_image-matting/summary)\n\n* [DCT-Net Portrait Cartoonization - 3D](https://modelscope.cn/models/damo/cv_unet_person-image-cartoon-3d_compound-models/summary)\n\n* [DCT-Net Portrait Cartoonization Model - 3D](https://modelscope.cn/models/damo/face_chain_control_model/summary)\n\n* [DuGuang - Text Recognition - Line Recognition Model - Chinese and English - General Domain](https://modelscope.cn/models/damo/cv_convnextTiny_ocr-recognition-general_damo/summary)\n\n* [DuGuang - Text Recognition - Line Recognition Model - Chinese and English - General Domain](https://modelscope.cn/models/damo/cv_resnet18_ocr-detection-line-level_damo/summary)\n\n* [LaMa Image Inpainting](https://modelscope.cn/models/damo/cv_fft_inpainting_lama/summary)\n\n\nAudio:\n\n* [Paraformer Speech Recognition - Chinese - General - 16k - Offline - Large - Long Audio Version](https://modelscope.cn/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/summary)\n\n* [FSMN Voice Endpoint Detection - Chinese - General - 16k - onnx](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx/summary)\n\n* [Monotonic-Aligner Speech Timestamp Prediction - 16k - Offline](https://modelscope.cn/models/damo/speech_timestamp_prediction-v1-16k-offline/summary)\n\n* [CT-Transformer Punctuation - Chinese - General - onnx](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx/summary)\n\n* [Speech Synthesis - Chinese - Multiple Emotions Domain - 16k - Multiple Speakers](https://modelscope.cn/models/damo/speech_sambert-hifigan_tts_zh-cn_16k/summary)\n\n* [CAM++ Speaker Verification - Chinese - General - 200k-Spkrs](https://modelscope.cn/models/damo/speech_campplus_sv_zh-cn_16k-common/summary)\n\n\n\nAI for Science:\n\n* [uni-fold-monomer](https://modelscope.cn/models/DPTech/uni-fold-monomer/summary)\n\n* [uni-fold-multimer](https://modelscope.cn/models/DPTech/uni-fold-multimer/summary)\n\n**Note:** Most models on ModelScope are public and can be downloaded directly from the [website](https://modelscope.cn/), please refer to instructions for [model download](https://modelscope.cn/docs/%E6%A8%A1%E5%9E%8B%E7%9A%84%E4%B8%8B%E8%BD%BD), for downloading models with api provided by modelscope library or git.\n\n# QuickTour\n\nWe provide unified interface for inference using `pipeline`, fine-tuning and evaluation using `Trainer` for different tasks.\n\nFor 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:\n\n```python\n\u003e\u003e\u003e from modelscope.pipelines import pipeline\n\u003e\u003e\u003e word_segmentation = pipeline('word-segmentation',model='damo/nlp_structbert_word-segmentation_chinese-base')\n\u003e\u003e\u003e word_segmentation('今天天气不错，适合出去游玩')\n{'output': '今天 天气 不错 ， 适合 出去 游玩'}\n```\n\nGiven an image, portrait matting (aka. background-removal) can be accomplished with the following code snippet:\n\n![image](data/resource/portrait_input.png)\n\n```python\n\u003e\u003e\u003e import cv2\n\u003e\u003e\u003e from modelscope.pipelines import pipeline\n\n\u003e\u003e\u003e portrait_matting = pipeline('portrait-matting')\n\u003e\u003e\u003e result = portrait_matting('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/image_matting.png')\n\u003e\u003e\u003e cv2.imwrite('result.png', result['output_img'])\n```\n\nThe output image with the background removed is:\n![image](data/resource/portrait_output.png)\n\n\nFine-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  `trainer.train()` and\n`trainer.evaluate()`  interfaces.\n\nFor 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.\n\n```python\n\u003e\u003e\u003e from modelscope.metainfo import Trainers\n\u003e\u003e\u003e from modelscope.msdatasets import MsDataset\n\u003e\u003e\u003e from modelscope.trainers import build_trainer\n\n\u003e\u003e\u003e train_dataset = MsDataset.load('chinese-poetry-collection', split='train'). remap_columns({'text1': 'src_txt'})\n\u003e\u003e\u003e eval_dataset = MsDataset.load('chinese-poetry-collection', split='test').remap_columns({'text1': 'src_txt'})\n\u003e\u003e\u003e max_epochs = 10\n\u003e\u003e\u003e tmp_dir = './gpt3_poetry'\n\n\u003e\u003e\u003e kwargs = dict(\n     model='damo/nlp_gpt3_text-generation_1.3B',\n     train_dataset=train_dataset,\n     eval_dataset=eval_dataset,\n     max_epochs=max_epochs,\n     work_dir=tmp_dir)\n\n\u003e\u003e\u003e trainer = build_trainer(name=Trainers.gpt3_trainer, default_args=kwargs)\n\u003e\u003e\u003e trainer.train()\n```\n\n# Why should I use ModelScope library\n\n1. 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.\n\n2. 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.\n\n3. 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.\n\n4. For distributed model training, especially for large models, it provides rich training strategy support, including data parallel, model parallel, hybrid parallel and so on.\n\n# Installation\n\n## Docker\n\nModelScope 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+.\n\nTo 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:\n\nCPU docker image\n```shell\n# py37\nregistry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.6.1\n\n# py38\nregistry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py38-torch2.0.1-tf2.13.0-1.9.5\n```\n\nGPU docker image\n```shell\n# py37\nregistry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.6.1\n\n# py38\nregistry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.8.0-py38-torch2.0.1-tf2.13.0-1.9.5\n```\n\n## Setup Local Python Environment\n\nOne can also set up local ModelScope environment using pip and conda.  ModelScope supports python3.7 and above.\nWe suggest [anaconda](https://docs.anaconda.com/anaconda/install/) for creating local python environment:\n\n```shell\nconda create -n modelscope python=3.8\nconda activate modelscope\n```\n\nPyTorch or TensorFlow can be installed separately according to each model's requirements.\n* Install pytorch [doc](https://pytorch.org/get-started/locally/)\n* Install tensorflow [doc](https://www.tensorflow.org/install/pip)\n\nAfter installing the necessary machine-learning framework, you can install modelscope library as follows:\n\nIf you only want to play around with the modelscope framework, of trying out model/dataset download, you can install the core modelscope components:\n```shell\npip install modelscope\n```\n\nIf you want to use multi-modal models:\n```shell\npip install modelscope[multi-modal]\n```\n\nIf you want to use nlp models:\n```shell\npip install modelscope[nlp] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n```\n\nIf you want to use cv models:\n```shell\npip install modelscope[cv] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n```\n\nIf you want to use audio models:\n```shell\npip install modelscope[audio] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n```\n\nIf you want to use science models:\n```shell\npip install modelscope[science] -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html\n```\n\n`Notes`:\n1. 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).\n\n2. 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](https://github.com/bastibe/python-soundfile#installation)). On Windows and MacOS, it will be installed automatically without user operation. For example, on Ubuntu, you can use following commands:\n    ```shell\n    sudo apt-get update\n    sudo apt-get install libsndfile1\n    ```\n\n3. Some models in computer vision need mmcv-full, you can refer to mmcv [installation guide](https://github.com/open-mmlab/mmcv#installation), a minimal installation is as follows:\n\n    ```shell\n    pip uninstall mmcv # if you have installed mmcv, uninstall it\n    pip install -U openmim\n    mim install mmcv-full\n    ```\n\n\n\n# Learn More\n\nWe  provide additional documentations including:\n* [More detailed Installation Guide](https://modelscope.cn/docs/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85)\n* [Introduction to tasks](https://modelscope.cn/docs/%E4%BB%BB%E5%8A%A1%E7%9A%84%E4%BB%8B%E7%BB%8D)\n* [Use pipeline for model inference](https://modelscope.cn/docs/%E6%A8%A1%E5%9E%8B%E7%9A%84%E6%8E%A8%E7%90%86Pipeline)\n* [Finetuning example](https://modelscope.cn/docs/%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AE%AD%E7%BB%83Train)\n* [Preprocessing of data](https://modelscope.cn/docs/%E6%95%B0%E6%8D%AE%E7%9A%84%E9%A2%84%E5%A4%84%E7%90%86)\n* [Evaluation](https://modelscope.cn/docs/%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0)\n* [Contribute your own model to ModelScope](https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88)\n\n# License\n\nThis project is licensed under the [Apache License (Version 2.0)](https://github.com/modelscope/modelscope/blob/master/LICENSE).\n\n# Citation\n```\n@Misc{modelscope,\n  title = {ModelScope: bring the notion of Model-as-a-Service to life.},\n  author = {The ModelScope Team},\n  howpublished = {\\url{https://github.com/modelscope/modelscope}},\n  year = {2023}\n}\n```\n","funding_links":[],"categories":["Video Generation","Python","其他_机器学习与深度学习","deep-learning","语言资源库","python","Summary","Open Source Projects"],"sub_categories":["python","World Models \u0026 Simulation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelscope%2Fmodelscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Fmodelscope/lists"}