浏览代码

Re-adding index.md and adding script for creating it based on README.md

/replace_index_md
Jon Hogins 4 年前
当前提交
eb9ccf8f
共有 4 个文件被更改,包括 136 次插入0 次删除
  1. 13
      .yamato/upm-ci-full.yml
  2. 8
      README.md
  3. 78
      com.unity.perception/Documentation~/Index.md
  4. 37
      com.unity.perception/Documentation~/UpdateIndexMd.py

13
.yamato/upm-ci-full.yml


- .yamato/upm-ci-testprojects.yml#{{project.name}}_linux_editmode_{{editor.version}}
{% endfor %}
{% endfor %}
- .yamato/upm-ci-full.yml#check_index_md
all_tests:
name: Complete Tests

- .yamato/upm-ci-performance.yml#{{project.name}}_linux_standalone_{{editor.version}}
{% endfor %}
{% endfor %}
- .yamato/upm-ci-full.yml#check_index_md
all_tests_nightly_perf:
name: Nightly Performance Tests

- .yamato/upm-ci-performance.yml#{{project.name}}_linux_standalone_{{editor.version}}
{% endfor %}
{% endfor %}
check_index_md:
name: Check Index.md
agent:
type: Unity::VM
image: cds-ops/ubuntu-18.04-agent:stable
flavor: b1.medium
interpreter: python
commands:
- cd com.unity.perception/Documentation~
- python UpdateIndexMd.py -check

8
README.md


<img src="com.unity.perception/Documentation~/images/banner2.PNG" align="middle"/>
[//]: # (Exclude from Index.md)
[//]: # (End Exclude)
[![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE.md)

The [Unity Simulation Smart Camera Example](https://github.com/Unity-Technologies/Unity-Simulation-Smart-Camera-Outdoor) illustrates how the Perception package could be used in a smart city or autonomous vehicle simulation. You can generate datasets locally or at scale in [Unity Simulation](https://unity.com/products/unity-simulation).
[//]: # (Exclude from Index.md)
## Local development
The repository includes two projects for local development in `TestProjects` folder, one set up for HDRP and the other for URP.

[//]: # (End Exclude)
## Known issues

78
com.unity.perception/Documentation~/Index.md


<img src="images/unity-wide.png" align="middle" width="3000"/>
<img src="images/banner2.PNG" align="middle"/>
[![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE.md)
> com.unity.perception is in active development. Its features and API are subject to significant change as development progresses.
BAD CONTENT
# Perception Package ([Unity Computer Vision](https://unity.com/computer-vision))
The Perception package provides a toolkit for generating large-scale datasets for computer vision training and validation. It is focused on a handful of camera-based use cases for now and will ultimately expand to other forms of sensors and machine learning tasks.
Visit the [Unity Computer Vision](https://unity.com/computer-vision) page for more information on our tools and offerings!
## Getting Started
**[Quick Installation Instructions](SetupSteps.md)**
Get your local Perception workspace up and running quickly. Recommended for users with prior Unity experience.
**[Perception Tutorial](Tutorial/TUTORIAL.md)**
Detailed instructions covering all the important steps from installing Unity Editor, to creating your first computer vision data generation project, building a randomized Scene, and generating large-scale synthetic datasets by leveraging the power of Unity Simulation. No prior Unity experience required.
**[Human Pose Labeling and Randomization Tutorial](HPTutorial/TUTORIAL.md)**
Step by step instructions for using the keypoint, pose, and animation randomization tools included in the Perception package. It is recommended that you finish Phase 1 of the Perception Tutorial above before starting this tutorial.
## Documentation
In-depth documentation on individual components of the package.
|Feature|Description|
|---|---|
|[Labeling](GroundTruthLabeling.md)|A component that marks a GameObject and its descendants with a set of labels|
|[Label Config](GroundTruthLabeling.md#label-config)|An asset that defines a taxonomy of labels for ground truth generation|
|[Perception Camera](PerceptionCamera.md)|Captures RGB images and ground truth from a [Camera](https://docs.unity3d.com/Manual/class-Camera.html).|
|[Dataset Capture](DatasetCapture.md)|Ensures sensors are triggered at proper rates and accepts data for the JSON dataset.|
|[Randomization](Randomization/Index.md)|The Randomization tool set lets you integrate domain randomization principles into your simulation.|
## Example Projects
### SynthDet
<img src="images/synthdet.png"/>
[SynthDet](https://github.com/Unity-Technologies/SynthDet) is an end-to-end solution for training a 2D object detection model using synthetic data.
### Unity Simulation Smart Camera example
<img src="images/smartcamera.png"/>
The [Unity Simulation Smart Camera Example](https://github.com/Unity-Technologies/Unity-Simulation-Smart-Camera-Outdoor) illustrates how the Perception package could be used in a smart city or autonomous vehicle simulation. You can generate datasets locally or at scale in [Unity Simulation](https://unity.com/products/unity-simulation).
## Known issues
* The Linux Editor 2019.4.7f1 and 2019.4.8f1 might hang when importing HDRP-based Perception projects. For Linux Editor support, use 2019.4.6f1 or 2020.1
## License
* [License](com.unity.perception/LICENSE.md)
## Support
For general questions or concerns please contact the Computer Vision team at computer-vision@unity3d.com.
For feedback, bugs, or other issues please file a GitHub issue and the Computer Vision team will investigate the issue as soon as possible.
## Citation
If you find this package useful, consider citing it using:
```
@misc{com.unity.perception2021,
title={Unity {P}erception Package},
author={{Unity Technologies}},
howpublished={\url{https://github.com/Unity-Technologies/com.unity.perception}},
year={2020}
}
```

37
com.unity.perception/Documentation~/UpdateIndexMd.py


# This script has two functions:
# Without the -check parameter it updates com.unity.perception/Documentation~/Index.md with the content in README.md
# With the -check parameter it checks com.unity.perception/Documentation~/Index.md to make sure it is up to date with README.md
import argparse
import re
parser = argparse.ArgumentParser()
parser.add_argument("-check", help="Check that Index.md is up to date with README.md", action='store_true')
args = parser.parse_args()
with open("../../README.md", "r") as f:
content = f.read()
content_updated = content.replace("com.unity.perception/Documentation~/", "")
def excluderepl(matchobj):
if matchobj.group(0).count(r'[//]: # (End Exclude)') > 1:
return matchobj.group(0)
else:
return ''
content_updated = re.sub('\[\/\/\]\: \# \(Exclude from Index\.md\).*?\[\/\/\]\: \# \(End Exclude\)', excluderepl, content_updated, flags=re.DOTALL)
if args.check:
with open("Index.md", "r") as indexFile:
indexContent = indexFile.read()
if indexContent == content_updated:
exit(0)
else:
print("com.unity.perception/Documentation~/Index.md is not up to date. Run com.unity.perception/Documentation~/UpdateIndexMd.py to update it.")
exit(1)
else:
with open("Index.md", "w") as indexFile:
indexFile.write(content_updated)
正在加载...
取消
保存