{"id":13444054,"url":"https://github.com/MegEngine/Models","last_synced_at":"2025-03-20T18:30:33.269Z","repository":{"id":42455666,"uuid":"248175266","full_name":"MegEngine/Models","owner":"MegEngine","description":"采用MegEngine实现的各种主流深度学习模型","archived":false,"fork":false,"pushed_at":"2022-12-07T12:52:40.000Z","size":10681,"stargazers_count":303,"open_issues_count":13,"forks_count":101,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-08-01T03:45:51.304Z","etag":null,"topics":["megengine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MegEngine.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}},"created_at":"2020-03-18T08:22:46.000Z","updated_at":"2024-07-30T09:59:09.000Z","dependencies_parsed_at":"2022-09-08T06:02:48.390Z","dependency_job_id":null,"html_url":"https://github.com/MegEngine/Models","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FModels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FModels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FModels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2FModels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MegEngine","download_url":"https://codeload.github.com/MegEngine/Models/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221786137,"owners_count":16879966,"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":["megengine"],"created_at":"2024-07-31T03:02:17.767Z","updated_at":"2024-10-28T05:31:57.484Z","avatar_url":"https://github.com/MegEngine.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# MegEngine Models\n\n![](https://github.com/MegEngine/Models/workflows/CI/badge.svg)\n\n本仓库包含了采用[MegEngine](https://github.com/megengine/megengine)实现的各种主流深度学习模型。\n\n[official](./official)目录下提供了各种经典的图像分类、目标检测、图像分割以及自然语言模型的官方实现。每个模型同时提供了模型定义、推理以及训练的代码。\n\n官方会一直维护[official](./official)下的代码，保持适配MegEngine的最新API，提供最优的模型实现。同时，提供高质量的学习文档，帮助新手学习如何在MegEngine下训练自己的模型。\n\n## 综述\n\n对于每个模型，我们提供了至少四个脚本文件：模型定义(`model.py`)、模型推理(`inference.py`)、模型训练(`train.py`)、模型测试(`test.py`)。\n\n每个模型目录下都对应有一个`README`，介绍了模型的详细信息，并详细描述了训练和测试的流程。例如 [ResNet README](./official/vision/classification/resnet/README.md)。\n\n另外，`official`下定义的模型可以通过`megengine.hub`来直接加载，例如：\n\n```bash\nimport megengine.hub\n\n# 只加载网络结构\nresnet18 = megengine.hub.load(\"megengine/models\", \"resnet18\")\n# 加载网络结构和预训练权重\nresnet18 = megengine.hub.load(\"megengine/models\", \"resnet18\", pretrained=True)\n```\n\n更多可以通过`megengine.hub`接口加载的模型见[hubconf.py](./hubconf.py)。\n\n## 安装和环境配置\n\n在开始运行本仓库下的代码之前，用户需要通过以下步骤来配置本地环境：\n\n1. 克隆仓库\n\n```bash\ngit clone https://github.com/MegEngine/Models.git\n```\n\n2. 安装依赖包\n\n```bash\npip3 install --user -r requirements.txt\n```\n\n3. 添加目录到python环境变量中\n\n```bash\nexport PYTHONPATH=/path/to/models:$PYTHONPATH\n```\n\n\n## 官方模型介绍\n\n### 图像分类\n\n图像分类是计算机视觉的基础任务。许多计算机视觉的其它任务（例如物体检测）都使用了基于图像分类的预训练模型。因此，我们提供了各种在ImageNet上预训练好的分类模型，\n具体实现模型参考[这里](./official/vision/classification).\n\n### 目标检测\n\n目标检测同样是计算机视觉中的常见任务，我们提供了多个经典的目标检测模型，具体模型的实现可以参考[这里](./official/vision/detection).\n\n### 图像分割\n\n语意分割也是计算机视觉中的一项基础任务，为此我们也提供了经典的语义分割模型，具体可以参考[这里](./official/vision/segmentation/).\n\n### 人体关节点检测\n\n我们提供了人体关节点检测的经典模型和高精度模型，具体的实现可以参考[这里](./official/vision/keypoints).\n\n### 自然语言处理\n\n我们同样支持一些常见的自然语言处理模型，模型的权重来自Google的pre-trained models, 用户可以直接使用`megengine.hub`轻松的调用预训练的bert模型。\n\n另外，我们在[bert](./official/nlp/bert)中还提供了更加方便的脚本, 可以通过任务名直接获取到对应字典, 配置, 与预训练模型。\n\n### 多模态\n\n多模态学习拥有令人着迷的魅力，其有着丰富有趣的现实应用。我们支持了一些经典的多模态模型，模型的权重来源于官方预训练模型，用户可以参考仓库下的教程轻松体验多模态的奇妙。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMegEngine%2FModels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMegEngine%2FModels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMegEngine%2FModels/lists"}