English|中文
Introduction
Welcome to use Ascend Samples!
Contribution Requirements
The submitted project files shall contain at least the source code, readme file, and build and run scripts.
Sign the contribution license agreement (CLA) before your submission. Link
I. Source Code
For online build and run, please use C++ or Python and comply with part 4 of programming specifications. (Currently, only C++ samples are available.)
For C++ PR sample specifications, see sample.
Organization of the project directory:
Description:
- Each entry script corresponds to two device forms, and the current project is required to adapt to these two device forms: Atlas200dk, A300-3010.
- Each device form corresponds to one or more versions, and the current project is required to adapt to at least one version.
- The current test environment: 1. Atlas200dk and A300-3010 of CANN 5.0.3.alpha005. 2. Atlas200dk and A300-3010 of CANN 5.0.4.alpha002.
- Note: The content in blacklist_version.conf is the blacklist version, that is, the testcase will not be run on this version. Such as testcase_YOLOV3_coco_detection_picture: 5.0.3.alpha005
For code migrated from other open-source software, add the license declaration.
II. License Rules
You need to declare according to the type of CLA you have signed:
CLA signing website: https://clasign.osinfra.cn/sign/Z2l0ZWUlMkZhc2NlbmQ=
CLA includes three types: enterprise signature, employee signature, and individual signature. Non-Huawei employees sign the individual and declare the corresponding copyright according to the type signed by themselves.
All newly created source files (cpp, py, h, etc.) need to support the Apache 2.0 License, and add the following statement to the head of the source file, replace [yyyy] with the 4-digit year of the code creation, and replace [ name of the copyright owner] is replaced with the name of the organization (all individuals signing the CLA shall declare Huawei Technologies Co., Ltd), please remove the square brackets:
# Copyright [yyyy] [name of copyright owner]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
All the code modified from other source code, do not change the LICENSE type in the source code. If the source code has the copyright of other company, the original copyright statement remains unchanged, add a line of Copyright above, and change [yyyy] Replace with the 4-digit year of the modified code, replace [name of the copyright owner] with the name of your organization (all individuals signing the CLA shall declare Huawei Technologies Co., Ltd), and remove the square brackets.
E.g:
# Copyright [yyyy] [name of copyright owner]
# Copyright 2018 HiSillion Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
III. Readme
The readme file provides guidance for you to understand and deploy your sample. It must contain the following content:
Overview
Describes the function, operation methods, and model source of the project.
Key requirements:
(1) Project function, including the input and output of the sample.
(2) Environment variables, third-party software dependencies, and libraries, and installation methods.
(3) Project file download methods, by using a compressed package or the git clone command.
(4) Model download method from ModelZoo.
(5) Input requirements for offline model conversion.
(6) Test data (bin files, images, and videos) download method (OBS or web disk links).
(7) Command for converting an original model to a Da Vinci model.
(8) Project build and run procedure.
(9) Post-inference validation method (by using a shell script or Python script).
IV. Regulations on PR Submission
For details about how to submit a PR, see How Do I Fork a Repository and Submit a PR?.
A submitted PR sample must contain the required items, project test cases, and a readme file.
Overview
Required items:
After the PR is submitted, the access control pipeline will be automatically triggered, and the background will be compiled according to the use case entry shell (the testcase*.sh in the programming language folder under the st directory). Note the following points:
The testcase*.sh in the corresponding programming language folder under the st directory should contain the function of reasoning and verifying the result of the reasoning. The specific definition is as follows:
The inference phase shall include the following actions:
Verify the result of the inference (provide different methods of verifying the inference result according to different projects, the verification method can be written in the script):
The necessary components and Python 3.6.9 environment have been pre-installed in the operating environment. Python 3.6.9 can be installed using the python3.6 command. The third-party library dependencies can be installed using either pip3 install package --user or python3.6 -m pip install package --user.
The model has been uploaded to the ModelZoo according to the Contribution guide repository. Provide OBS or web disk links for downloading the validation files (binaries, images, and videos). Alternatively, contact the administrator to store the files to a fixed OBS address. Do not store the files in the samples repository.
For environment and other problems, please submit an issue.
For details about how to submit test cases, see the PR Submission Sample.
V. Programming Specifications
Specifications and Standards
C++ programming complies with the Google C++ Coding Guidelines. Unit testing (UT) complies with the Googletest Primer.
Python programming complies with the Python PEP 8 Coding Style. Unit testing (UT) complies with the pytest framework.
Remarks
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。