diff --git a/_README.ipynb b/_README.ipynb
index c5e6812..3e4eec5 100644
--- a/_README.ipynb
+++ b/_README.ipynb
@@ -17,6 +17,28 @@
" - ```_README.md```*-----说明文档*\n",
" - ```app_spec.yml```*-----定义项目的输入输出,为部署服务*\n",
" - ```coding_here.ipynb```*-----输入并运行代码*"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def handle(conf):\n",
+ " \"\"\"\n",
+ " 该方法是部署之后,其他人调用你的服务时候的处理方法。\n",
+ " 请按规范填写参数结构,这样我们就能替你自动生成配置文件,方便其他人的调用。\n",
+ " 范例:\n",
+ " params['key'] = value # value_type: str # description: some description\n",
+ " value_type 可以选择:img, video, audio, str, int, float, [int], [str], [float]\n",
+ " 参数请放到params字典中,我们会自动解析该变量。\n",
+ " \"\"\"\n",
+ "\n",
+ " param1 = conf['param1'] # value_type: str # description: some description\n",
+ " # add your code\n",
+ " return {'ret1': 'cat'}\n",
+ " "
]
},
{
@@ -42,6 +64,22 @@
"左侧和右侧工具栏都可根据使用需要进行收合。\n",
"
"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "ls /home/jovyan/work/datasets/sumansid-facemask-dataset-momodel"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
},
{
"cell_type": "markdown",
@@ -138,10 +176,10 @@
"pycharm": {
"stem_cell": {
"cell_type": "raw",
- "source": [],
"metadata": {
"collapsed": false
- }
+ },
+ "source": []
}
}
},
diff --git a/app_spec.yml b/app_spec.yml
new file mode 100644
index 0000000..31af293
--- /dev/null
+++ b/app_spec.yml
@@ -0,0 +1,10 @@
+input:
+ param1:
+ name: param1
+ value_type: str
+ description: ''
+output:
+ ret1:
+ name: ret1
+ value_type: str
+ description: ''
diff --git a/coding_here.ipynb b/coding_here.ipynb
index 90d9432..19923a1 100644
--- a/coding_here.ipynb
+++ b/coding_here.ipynb
@@ -1,36 +1,366 @@
-
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "print('Hello Mo!')"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
-
\ No newline at end of file
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Hello Mo!\n"
+ ]
+ }
+ ],
+ "source": [
+ "print('Hello Mo!')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "3\n"
+ ]
+ }
+ ],
+ "source": [
+ "b=2\n",
+ "a = b +1\n",
+ "print(a)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import torch"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tensor([0., 0., 0.])\n"
+ ]
+ }
+ ],
+ "source": [
+ "a = torch.zeros(3)\n",
+ "print(a)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "ImportError",
+ "evalue": "No module named 'mindspore'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mmindspore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;31mImportError\u001b[0m: No module named 'mindspore'"
+ ]
+ }
+ ],
+ "source": [
+ "import mindspore.nn as nn"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Looking in indexes: https://mirrors.aliyun.com/pypi/simple\n",
+ "Collecting mindspore\n",
+ "\u001b[31m ERROR: Could not find a version that satisfies the requirement mindspore (from versions: none)\u001b[0m\n",
+ "\u001b[31mERROR: No matching distribution found for mindspore\u001b[0m\n",
+ "\u001b[33mWARNING: You are using pip version 19.1.1, however version 20.2.3 is available.\n",
+ "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n",
+ "Note: you may need to restart the kernel to use updated packages.\n"
+ ]
+ }
+ ],
+ "source": [
+ "pip install mindspore"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Looking in indexes: https://mirrors.aliyun.com/pypi/simple\n",
+ "Collecting mindspore\n",
+ "\u001b[31m ERROR: Could not find a version that satisfies the requirement mindspore (from versions: none)\u001b[0m\n",
+ "\u001b[31mERROR: No matching distribution found for mindspore\u001b[0m\n",
+ "\u001b[33mWARNING: You are using pip version 19.1.1, however version 20.2.3 is available.\n",
+ "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n",
+ "Note: you may need to restart the kernel to use updated packages.\n"
+ ]
+ }
+ ],
+ "source": [
+ "pip install mindspore"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Package Version \n",
+ "-------------------- ------------\n",
+ "absl-py 0.7.1 \n",
+ "alembic 1.4.2 \n",
+ "appdirs 1.4.4 \n",
+ "astor 0.7.1 \n",
+ "async-generator 1.10 \n",
+ "attrs 19.3.0 \n",
+ "Augmentor 0.2.8 \n",
+ "backcall 0.2.0 \n",
+ "baytune 0.3.10 \n",
+ "bleach 3.1.5 \n",
+ "boto3 1.14.34 \n",
+ "botocore 1.17.34 \n",
+ "certifi 2020.6.20 \n",
+ "certipy 0.1.3 \n",
+ "cffi 1.14.1 \n",
+ "chardet 3.0.4 \n",
+ "click 7.1.2 \n",
+ "configparser 4.0.2 \n",
+ "cryptography 3.0 \n",
+ "cycler 0.10.0 \n",
+ "Cython 0.29.20 \n",
+ "decorator 4.4.2 \n",
+ "defusedxml 0.6.0 \n",
+ "distlib 0.3.1 \n",
+ "docutils 0.15.2 \n",
+ "entrypoints 0.3 \n",
+ "et-xmlfile 1.0.1 \n",
+ "filelock 3.0.12 \n",
+ "func-timeout 4.3.5 \n",
+ "future 0.18.2 \n",
+ "gast 0.2.2 \n",
+ "graphviz 0.14 \n",
+ "grpcio 1.20.1 \n",
+ "h5py 2.9.0 \n",
+ "idna 2.10 \n",
+ "imageio 2.8.0 \n",
+ "imgaug 0.4.0 \n",
+ "importlib-metadata 0.23 \n",
+ "importlib-resources 3.0.0 \n",
+ "ipdb 0.13.2 \n",
+ "ipykernel 5.3.4 \n",
+ "ipython 7.9.0 \n",
+ "ipython-genutils 0.2.0 \n",
+ "ipywidgets 7.4.0 \n",
+ "jdcal 1.4.1 \n",
+ "jedi 0.17.2 \n",
+ "jieba 0.42.1 \n",
+ "Jinja2 2.11.2 \n",
+ "jmespath 0.10.0 \n",
+ "joblib 0.14.1 \n",
+ "jsonschema 3.2.0 \n",
+ "jupyter-client 6.1.6 \n",
+ "jupyter-core 4.6.3 \n",
+ "jupyterhub 1.0.0 \n",
+ "jupyterlab 1.0.0a1 \n",
+ "jupyterlab-server 0.2.0 \n",
+ "Keras 2.3.1 \n",
+ "Keras-Applications 1.0.7 \n",
+ "Keras-Preprocessing 1.0.9 \n",
+ "kiwisolver 1.1.0 \n",
+ "Mako 1.1.3 \n",
+ "Markdown 3.1 \n",
+ "MarkupSafe 1.1.1 \n",
+ "matplotlib 3.0.3 \n",
+ "minepy 1.2.4 \n",
+ "minio 5.0.10 \n",
+ "mistune 0.8.4 \n",
+ "mock 2.0.0 \n",
+ "more-itertools 7.2.0 \n",
+ "nbconvert 5.6.1 \n",
+ "nbformat 5.0.7 \n",
+ "networkx 2.4 \n",
+ "nltk 3.5 \n",
+ "notebook 6.0.3 \n",
+ "numpy 1.16.0 \n",
+ "oauthlib 3.1.0 \n",
+ "opencv-python 4.2.0.34 \n",
+ "openpyxl 2.6.4 \n",
+ "packaging 20.4 \n",
+ "pamela 1.0.0 \n",
+ "pandas 0.24.2 \n",
+ "pandocfilters 1.4.2 \n",
+ "parso 0.7.1 \n",
+ "pbr 5.2.0 \n",
+ "pexpect 4.8.0 \n",
+ "pickleshare 0.7.5 \n",
+ "Pillow 7.2.0 \n",
+ "pip 19.1.1 \n",
+ "plotly 4.8.1 \n",
+ "prometheus-client 0.8.0 \n",
+ "prompt-toolkit 2.0.10 \n",
+ "protobuf 3.12.4 \n",
+ "ptyprocess 0.6.0 \n",
+ "pycparser 2.20 \n",
+ "pydot 1.4.1 \n",
+ "pyenchant 3.1.1 \n",
+ "Pygments 2.6.1 \n",
+ "pyOpenSSL 19.1.0 \n",
+ "pyparsing 2.4.7 \n",
+ "pyrsistent 0.16.0 \n",
+ "python-dateutil 2.8.0 \n",
+ "python-editor 1.0.4 \n",
+ "pytz 2020.1 \n",
+ "PyWavelets 1.1.1 \n",
+ "PyYAML 5.3.1 \n",
+ "pyzmq 19.0.2 \n",
+ "regex 2020.7.14 \n",
+ "requests 2.24.0 \n",
+ "retrying 1.3.3 \n",
+ "s3transfer 0.3.3 \n",
+ "sacremoses 0.0.43 \n",
+ "scikit-image 0.15.0 \n",
+ "scikit-learn 0.22.2.post1\n",
+ "scipy 1.4.1 \n",
+ "seaborn 0.9.1 \n",
+ "Send2Trash 1.5.0 \n",
+ "sentencepiece 0.1.91 \n",
+ "setuptools 49.2.0 \n",
+ "Shapely 1.7.0 \n",
+ "six 1.12.0 \n",
+ "SQLAlchemy 1.3.18 \n",
+ "stevedore 1.32.0 \n",
+ "tensorboard 1.13.1 \n",
+ "tensorboardX 2.0 \n",
+ "tensorflow 1.13.1 \n",
+ "tensorflow-estimator 1.13.0 \n",
+ "termcolor 1.1.0 \n",
+ "terminado 0.8.3 \n",
+ "testpath 0.4.4 \n",
+ "tokenizers 0.5.2 \n",
+ "torch 1.4.0+cpu \n",
+ "torchtext 0.6.0 \n",
+ "torchvision 0.5.0+cpu \n",
+ "tornado 6.0.4 \n",
+ "tqdm 4.46.1 \n",
+ "traitlets 4.3.3 \n",
+ "transformers 2.5.1 \n",
+ "urllib3 1.25.10 \n",
+ "virtualenv 20.0.29 \n",
+ "virtualenv-clone 0.5.4 \n",
+ "virtualenvwrapper 4.8.4 \n",
+ "wcwidth 0.2.5 \n",
+ "webencodings 0.5.1 \n",
+ "Werkzeug 0.15.2 \n",
+ "wheel 0.34.2 \n",
+ "widgetsnbextension 3.4.2 \n",
+ "word2vec 0.10.6 \n",
+ "xlrd 1.2.0 \n",
+ "yellowbrick 1.1 \n",
+ "zipp 0.6.0 \n",
+ "\u001b[33mWARNING: You are using pip version 19.1.1, however version 20.2.3 is available.\n",
+ "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
+ ]
+ }
+ ],
+ "source": [
+ "!pip list --format=columns"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "/bin/sh: 1: 7zx: not found\n"
+ ]
+ }
+ ],
+ "source": [
+ "!7zx ./datasets/sumansid-facemask-dataset-momodel/facemask-dataset.zip -d"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "/bin/sh: 1: 7zx: not found\n"
+ ]
+ }
+ ],
+ "source": [
+ "!7zx ./datasets/sumansid-facemask-dataset-momodel/facemask-dataset.zip"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/handler.py b/handler.py
new file mode 100644
index 0000000..6ad6f19
--- /dev/null
+++ b/handler.py
@@ -0,0 +1,14 @@
+def handle(conf):
+ """
+ 该方法是部署之后,其他人调用你的服务时候的处理方法。
+ 请按规范填写参数结构,这样我们就能替你自动生成配置文件,方便其他人的调用。
+ 范例:
+ params['key'] = value # value_type: str # description: some description
+ value_type 可以选择:img, video, audio, str, int, float, [int], [str], [float]
+ 参数请放到params字典中,我们会自动解析该变量。
+ """
+
+ param1 = conf['param1'] # value_type: str # description: some description
+ # add your code
+ return {'ret1': 'cat'}
+
\ No newline at end of file
diff --git a/project_requirements.txt b/project_requirements.txt
new file mode 100644
index 0000000..e73f67c
--- /dev/null
+++ b/project_requirements.txt
@@ -0,0 +1,147 @@
+absl-py==0.7.1
+alembic==1.4.2
+appdirs==1.4.4
+astor==0.7.1
+async-generator==1.10
+attrs==19.3.0
+Augmentor==0.2.8
+backcall==0.2.0
+baytune==0.3.10
+bleach==3.1.5
+boto3==1.14.34
+botocore==1.17.34
+certifi==2020.6.20
+certipy==0.1.3
+cffi==1.14.1
+chardet==3.0.4
+click==7.1.2
+configparser==4.0.2
+cryptography==3.0
+cycler==0.10.0
+Cython==0.29.20
+decorator==4.4.2
+defusedxml==0.6.0
+distlib==0.3.1
+docutils==0.15.2
+entrypoints==0.3
+et-xmlfile==1.0.1
+filelock==3.0.12
+func-timeout==4.3.5
+future==0.18.2
+gast==0.2.2
+graphviz==0.14
+grpcio==1.20.1
+h5py==2.9.0
+idna==2.10
+imageio==2.8.0
+imgaug==0.4.0
+importlib-metadata==0.23
+importlib-resources==3.0.0
+ipdb==0.13.2
+ipykernel==5.3.4
+ipython==7.9.0
+ipython-genutils==0.2.0
+ipywidgets==7.4.0
+jdcal==1.4.1
+jedi==0.17.2
+jieba==0.42.1
+Jinja2==2.11.2
+jmespath==0.10.0
+joblib==0.14.1
+jsonschema==3.2.0
+jupyter-client==6.1.6
+jupyter-core==4.6.3
+jupyterhub==1.0.0
+jupyterlab==1.0.0a1
+jupyterlab-server==0.2.0
+Keras==2.3.1
+Keras-Applications==1.0.7
+Keras-Preprocessing==1.0.9
+kiwisolver==1.1.0
+Mako==1.1.3
+Markdown==3.1
+MarkupSafe==1.1.1
+matplotlib==3.0.3
+minepy==1.2.4
+minio==5.0.10
+mistune==0.8.4
+mock==2.0.0
+more-itertools==7.2.0
+nbconvert==5.6.1
+nbformat==5.0.7
+networkx==2.4
+nltk==3.5
+notebook==6.0.3
+numpy==1.16.0
+oauthlib==3.1.0
+opencv-python==4.2.0.34
+openpyxl==2.6.4
+packaging==20.4
+pamela==1.0.0
+pandas==0.24.2
+pandocfilters==1.4.2
+parso==0.7.1
+pbr==5.2.0
+pexpect==4.8.0
+pickleshare==0.7.5
+Pillow==7.2.0
+plotly==4.8.1
+prometheus-client==0.8.0
+prompt-toolkit==2.0.10
+protobuf==3.12.4
+ptyprocess==0.6.0
+pycparser==2.20
+pydot==1.4.1
+pyenchant==3.1.1
+Pygments==2.6.1
+pyOpenSSL==19.1.0
+pyparsing==2.4.7
+pyrsistent==0.16.0
+python-dateutil==2.8.0
+python-editor==1.0.4
+pytz==2020.1
+PyWavelets==1.1.1
+PyYAML==5.3.1
+pyzmq==19.0.2
+regex==2020.7.14
+requests==2.24.0
+retrying==1.3.3
+s3transfer==0.3.3
+sacremoses==0.0.43
+scikit-image==0.15.0
+scikit-learn==0.22.2.post1
+scipy==1.4.1
+seaborn==0.9.1
+Send2Trash==1.5.0
+sentencepiece==0.1.91
+Shapely==1.7.0
+six==1.12.0
+SQLAlchemy==1.3.18
+stevedore==1.32.0
+tensorboard==1.13.1
+tensorboardX==2.0
+tensorflow==1.13.1
+tensorflow-estimator==1.13.0
+termcolor==1.1.0
+terminado==0.8.3
+testpath==0.4.4
+tokenizers==0.5.2
+torch==1.4.0+cpu
+torchtext==0.6.0
+torchvision==0.5.0+cpu
+tornado==6.0.4
+tqdm==4.46.1
+traitlets==4.3.3
+transformers==2.5.1
+urllib3==1.25.10
+virtualenv==20.0.29
+virtualenv-clone==0.5.4
+virtualenvwrapper==4.8.4
+wcwidth==0.2.5
+webencodings==0.5.1
+Werkzeug==0.15.2
+widgetsnbextension==3.4.2
+word2vec==0.10.6
+xlrd==1.2.0
+yellowbrick==1.1
+zipp==0.6.0
diff --git a/results/.ipynb_checkpoints/README-checkpoint.md b/results/.ipynb_checkpoints/README-checkpoint.md
new file mode 100644
index 0000000..81902f1
--- /dev/null
+++ b/results/.ipynb_checkpoints/README-checkpoint.md
@@ -0,0 +1,2 @@
+Please store your training checkpoints or results here
+请在此处存储 checkpoints 和结果文件
\ No newline at end of file