-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f21985
commit 5ee9ce5
Showing
34 changed files
with
351 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Write A New Model | ||
comming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
hide: | ||
- navigation | ||
- toc | ||
--- | ||
|
||
|
||
{% include-markdown "../../README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
hide: | ||
- navigation | ||
- toc | ||
--- | ||
|
||
# Model Zoo | ||
|
||
{% include-markdown "../../MODEL_ZOO.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Change Log | ||
|
||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Code of Conduct | ||
|
||
Coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include-markdown "../../../CONTRIBUTING.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# FAQ | ||
|
||
Coming soon. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Data | ||
|
||
|
||
## comming soon | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Loss | ||
|
||
|
||
## Loss Factory | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# Configuration | ||
|
||
{% include-markdown "../../../tutorials/configuration_CN.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# Deployment | ||
|
||
{% include-markdown "../../../deploy/README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# Finetune | ||
|
||
{% include-markdown "../../../examples/finetune_SHWD/README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
# Modelarts | ||
|
||
{% include-markdown "../../../tutorials/modelarts.md" %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
# Quick Start | ||
|
||
|
||
{% include-markdown "../../../GETTING_STARTED.md" %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
"""Generate the code reference pages of models.""" | ||
import os | ||
import sys | ||
|
||
sys.path.append(".") | ||
|
||
import importlib | ||
import logging | ||
from pathlib import Path | ||
|
||
_logger = logging.getLogger('mkdocs') | ||
_langs = ["en", "zh"] | ||
|
||
|
||
def _gen_page(lang): | ||
full_doc_path = Path(f"docs/{lang}/reference/models.md") | ||
_logger.info(f"Generating reference page: {full_doc_path}") | ||
with open(full_doc_path, "w") as fd: | ||
print("# Models", file=fd) | ||
print("\n\n## Create Model", file=fd) | ||
print("\n### ::: mindyolo.models.model_factory.create_model", file=fd) | ||
|
||
for path in sorted(Path("mindyolo/models").rglob("*.py")): | ||
module_path = path.with_suffix("") # eg: mindyolo/models/resnet | ||
parts = list(module_path.parts) # eg: ["mindyolo", "models", "resnet"] | ||
if parts[-1].startswith("__") or parts[-2] == "layers": | ||
continue | ||
# fileter out utility modules | ||
if parts[-1] in ["model_factory", "registry", "utils", "helpers"]: | ||
continue | ||
# filter out the net module which is replaced by the net function with the same name | ||
# TODO: we need to change mechanism of model importing | ||
if parts[-1] in ["googlenet", "inception_v3", "inception_v4", "xception", "pnasnet"]: | ||
continue | ||
|
||
try: | ||
print(f"\n\n## {parts[-1]}", file=fd) | ||
identifier = ".".join(parts) # eg: mindyolo.models.resnet | ||
mod = importlib.import_module(identifier) | ||
for mem in sorted(set(mod.__all__)): | ||
print(f"\n### ::: {identifier}.{mem}", file=fd) | ||
except Exception as err: | ||
_logger.warning(f"Cannot generate reference of {identifier}, error: {err}.") | ||
|
||
|
||
def _del_page(lang): | ||
full_doc_path = Path(f"docs/{lang}/reference/models.md") | ||
_logger.info(f"Cleaning generated reference page: {full_doc_path}") | ||
os.remove(full_doc_path) | ||
|
||
|
||
def on_startup(command, dirty): | ||
for lang in _langs: | ||
_gen_page(lang) | ||
|
||
|
||
def on_shutdown(): | ||
for lang in _langs: | ||
_del_page(lang) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# 模型编写指南 | ||
即将到来 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
hide: | ||
- navigation | ||
- toc | ||
--- | ||
|
||
|
||
{% include-markdown "../../README_CN.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
hide: | ||
- navigation | ||
- toc | ||
--- | ||
|
||
# 模型仓库 | ||
|
||
{% include-markdown "../../MODEL_ZOO.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 更新日志 | ||
|
||
即将到来 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 行为准则 | ||
|
||
即将到来 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include-markdown "../../../CONTRIBUTING.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 常见问题 | ||
|
||
即将到来 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Data | ||
|
||
|
||
## comming soon | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Loss | ||
|
||
|
||
## Loss Factory | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# 配置 | ||
|
||
{% include-markdown "../../../tutorials/configuration_CN.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# 部署 | ||
|
||
{% include-markdown "../../../deploy/README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
# 微调 | ||
|
||
{% include-markdown "../../../examples/finetune_SHWD/README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
# 云上启动 | ||
|
||
|
||
{% include-markdown "../../../tutorials/modelarts_CN.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
# 快速开始 | ||
|
||
|
||
{% include-markdown "../../../GETTING_STARTED_CN.md" %} | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
site_name: MindYolo Docs | ||
site_url: https://mindspore-lab.github.io/mindyolo | ||
repo_url: https://github.com/mindspore-lab/mindyolo | ||
repo_name: mindspore-lab/mindyolo | ||
copyright: Copyright © 2022 - 2023 MindSpore Lab | ||
|
||
nav: | ||
- Home: index.md | ||
- Benchmark: modelzoo.md | ||
- Tutorials: # Learning Oriented | ||
- Quick Start: tutorials/quick_start.md | ||
- Configuration: tutorials/configuration.md | ||
- Finetune: tutorials/finetune.md | ||
- CloudBrain: tutorials/modelarts.md | ||
- Deployment: tutorials/deployment.md | ||
- How-To Guides: # Problem Oriented | ||
- Write A New Model: how_to_guides/write_a_new_model.md | ||
- Reference: | ||
- data: reference/data.md | ||
# - loss: reference/loss.md | ||
# - models.layers: reference/models.layers.md | ||
- models: reference/models.md | ||
# - optim: reference/optim.md | ||
# - scheduler: reference/scheduler.md | ||
# - utils: reference/utils.md | ||
- Notes: | ||
- Change Log: notes/changelog.md | ||
- Contributing: notes/contributing.md | ||
- Code of Conduct: notes/code_of_conduct.md | ||
- FAQ: notes/faq.md | ||
|
||
theme: | ||
name: material | ||
palette: | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
primary: black | ||
toggle: | ||
icon: material/weather-sunny | ||
name: Switch to dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
primary: black | ||
toggle: | ||
icon: material/weather-night | ||
name: Switch to light mode | ||
features: | ||
# - navigation.instant # see https://github.com/ultrabug/mkdocs-static-i18n/issues/62 | ||
- navigation.tracking | ||
- navigation.tabs | ||
- navigation.sections | ||
- navigation.indexes | ||
- navigation.top | ||
- navigation.footer | ||
- toc.follow | ||
- search.highlight | ||
- search.share | ||
- search.suggest | ||
- content.action.view | ||
- content.action.edit | ||
- content.tabs.link | ||
- content.code.copy | ||
- content.code.select | ||
- content.code.annotations | ||
|
||
markdown_extensions: | ||
# Officially Supported Extensions | ||
- abbr | ||
- admonition | ||
- attr_list | ||
- def_list | ||
- footnotes | ||
- md_in_html | ||
- meta | ||
- sane_lists | ||
- tables | ||
- toc: | ||
permalink: true | ||
- wikilinks | ||
# Third Party Extensions(Bundles, PyMdown Extensions) | ||
- pymdownx.arithmatex: | ||
generic: true | ||
- pymdownx.betterem: | ||
smart_enable: all | ||
- pymdownx.caret | ||
- pymdownx.details | ||
- pymdownx.highlight | ||
- pymdownx.inlinehilite | ||
- pymdownx.keys | ||
- pymdownx.mark | ||
- pymdownx.smartsymbols | ||
- pymdownx.snippets | ||
- pymdownx.superfences | ||
- pymdownx.tabbed: | ||
alternate_style: true | ||
- pymdownx.tasklist: | ||
custom_checkbox: true | ||
- pymdownx.tilde | ||
|
||
hooks: | ||
- docs/gen_ref_pages.py | ||
|
||
plugins: | ||
- search | ||
- include-markdown | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
options: | ||
# Headings | ||
show_root_heading: true | ||
show_root_toc_entry: true | ||
show_object_full_path: true | ||
# Members | ||
show_submodules: true | ||
# Docstrings | ||
docstring_section_style: spacy | ||
- i18n: | ||
default_language: en | ||
docs_structure: folder | ||
languages: | ||
en: | ||
name: English | ||
zh: | ||
name: 中文 | ||
nav_translations: | ||
zh: | ||
Home: 主页 | ||
Installation: 安装 | ||
Model Zoo: 模型仓库 | ||
Tutorials: 教程 | ||
Quick Start: 快速开始 | ||
Configuration: 配置 | ||
Finetune: 微调 | ||
CloudBrain: 云上启动 | ||
Deployment: 部署 | ||
Notes: 说明 | ||
Change Log: 更新日志 | ||
Code of Conduct: 行为准则 | ||
FAQ: 常见问题 | ||
How-To Guides: 指导 | ||
Reference: 引用 | ||
|
||
|
||
|
||
extra: | ||
generator: false | ||
social: | ||
- icon: fontawesome/solid/paper-plane | ||
link: mailto:mindspore-lab@huawei.com | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/mindspore-lab/mindyolo | ||
- icon: fontawesome/brands/zhihu | ||
link: https://www.zhihu.com/people/mindsporelab |