GitHub
4 年前
当前提交
12e2f513
共有 60 个文件被更改,包括 919 次插入 和 222 次删除
-
30.yamato/environments.yml
-
35.yamato/upm-ci-full.yml
-
8.yamato/upm-ci-testprojects.yml
-
8com.unity.perception/CHANGELOG.md
-
5com.unity.perception/Documentation~/Randomization/Scenarios.md
-
29com.unity.perception/Editor/AssetPreparation/AssetPreparationTools.cs
-
14com.unity.perception/Editor/Randomization/Editors.meta
-
17com.unity.perception/Editor/Randomization/Editors/ScenarioBaseEditor.cs.meta
-
14com.unity.perception/Editor/Randomization/PropertyDrawers.meta
-
17com.unity.perception/Editor/Randomization/PropertyDrawers/ColorHsvaDrawer.cs.meta
-
17com.unity.perception/Editor/Randomization/PropertyDrawers/ParameterDrawer.cs.meta
-
12com.unity.perception/Editor/Randomization/StaticData.cs.meta
-
9com.unity.perception/Editor/Randomization/Uss.meta
-
9com.unity.perception/Editor/Randomization/Uxml.meta
-
16com.unity.perception/Editor/Randomization/Uxml/Parameter/ParameterDrawer.uxml.meta
-
14com.unity.perception/Editor/Randomization/VisualElements.meta
-
9com.unity.perception/Editor/Randomization/VisualElements/Parameter.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Parameter/CategoricalOptionElement.cs.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Parameter/ColorHsvaField.cs.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Parameter/DrawerParameterElement.cs.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Parameter/ParameterElement.cs.meta
-
9com.unity.perception/Editor/Randomization/VisualElements/Randomizer.meta
-
12com.unity.perception/Editor/Randomization/VisualElements/Randomizer/AddRandomizerMenu.cs.meta
-
12com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerElement.cs.meta
-
11com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerList.cs
-
12com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerList.cs.meta
-
13com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerReorderingIndicator.cs.meta
-
9com.unity.perception/Editor/Randomization/VisualElements/Sampler.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Sampler/FloatRangeElement.cs.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Sampler/RandomSeedField.cs.meta
-
17com.unity.perception/Editor/Randomization/VisualElements/Sampler/SamplerElement.cs.meta
-
1com.unity.perception/Runtime/AssemblyInfo.cs
-
4com.unity.perception/Runtime/GroundTruth/InstanceIdToColorMapping.cs
-
82com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBox3DLabeler.cs
-
21com.unity.perception/Runtime/GroundTruth/SimulationState.cs
-
14com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters.meta
-
14com.unity.perception/Runtime/Randomization/Randomizers.meta
-
12com.unity.perception/Tests/Runtime/GroundTruthTests/DatasetCaptureTests.cs
-
14com.unity.perception/Tests/Runtime/Randomization/RandomizerTests.meta
-
4com.unity.perception/package.json
-
83.yamato/upm-ci-performance.yml
-
8TestProjects/PerceptionURP/Assets/StreamingAssets.meta
-
8com.unity.perception/Tests/Performance.meta
-
25com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs
-
3com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs.meta
-
24com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs
-
3com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs.meta
-
24com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs
-
3com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs.meta
-
22com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs
-
3com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs.meta
-
22com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs
-
3com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs.meta
-
139com.unity.perception/Tests/Performance/PerformanceTester.cs
-
11com.unity.perception/Tests/Performance/PerformanceTester.cs.meta
-
101com.unity.perception/Tests/Performance/TestHelper.cs
-
3com.unity.perception/Tests/Performance/TestHelper.cs.meta
-
23com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef
-
7com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef.meta
|
|||
using System.IO; |
|||
using System.IO; |
|||
class AssetPreparationTools |
|||
static class AssetPreparationMenuItems |
|||
class AssetPreparationMenuFunctions : MonoBehaviour |
|||
/// <summary>
|
|||
/// Function for creating prefabs from multiple models with one click. Created prefabs will be placed in the same folder as their corresponding model.
|
|||
/// </summary>
|
|||
[MenuItem("Assets/Perception/Create Prefabs from Selected Models")] |
|||
static void CreatePrefabsFromSelectedModels() |
|||
/// <summary>
|
|||
/// Function for creating prefabs from multiple models with one click. Created prefabs will be placed in the same folder as their corresponding model.
|
|||
/// </summary>
|
|||
[MenuItem("Assets/Perception/Create Prefabs from Selected Models")] |
|||
static void CreatePrefabsFromSelectedModels() |
|||
foreach (var selection in Selection.gameObjects) |
|||
foreach (var selection in Selection.gameObjects) |
|||
{ |
|||
var path = AssetDatabase.GetAssetPath(selection); |
|||
var tmpGameObject = Instantiate(selection); |
|||
var destinationPath = Path.GetDirectoryName(path) + "/" + selection.name + ".prefab"; |
|||
PrefabUtility.SaveAsPrefabAsset(tmpGameObject, destinationPath); |
|||
DestroyImmediate(tmpGameObject); |
|||
} |
|||
var path = AssetDatabase.GetAssetPath(selection); |
|||
var tmpGameObject = Object.Instantiate(selection); |
|||
var destinationPath = Path.GetDirectoryName(path) + "/" + selection.name + ".prefab"; |
|||
PrefabUtility.SaveAsPrefabAsset(tmpGameObject, destinationPath); |
|||
Object.DestroyImmediate(tmpGameObject); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: 0b17046409af4c22bf74eec2a5965984 |
|||
timeCreated: 1598135707 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754583 |
|||
======= |
|||
guid: face5e97e23d402cbf6fafadb39fa0c3 |
|||
timeCreated: 1596213301 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: d3107e026b2943c1868c9b3f8c6480d3 |
|||
timeCreated: 1598135730 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: 5e8094c28dd142a09fbbd38ca560164b |
|||
timeCreated: 1598250942 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: d389620d3aa3471ca1877eb59cdfb465 |
|||
timeCreated: 1598135745 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1595278931 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1590479034 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1590479019 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: 6a4bb3efae29429292ccdfa63e661872 |
|||
timeCreated: 1598240583 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: 7f8f95a1bb144a96b9310164f5560387 |
|||
timeCreated: 1598135666 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1601669088 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: 3066f77d411047baafb6cc454adc6e37 |
|||
timeCreated: 1595535184 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: 103b163a2467415ab86b0df8175b12a6 |
|||
timeCreated: 1598254290 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: e2eb905ca8c14b5cbe43e48418948be0 |
|||
timeCreated: 1598255728 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: ea72d77c64d1447aa195e2068f02cf74 |
|||
timeCreated: 1595279847 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1601054944 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600836688 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600290125 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600366159 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1601669132 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: e37f169c618d471d8ed9614a41096437 |
|||
timeCreated: 1595281335 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: b4fa54f5ed5d4d67a278fa8b42dc55cb |
|||
timeCreated: 1596171029 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754567 |
|||
======= |
|||
guid: b367f8f2cb8e465ca2d60ccbd5414a14 |
|||
timeCreated: 1595277943 |
|||
>>>>>>> 86d25d2... implemented parameter behaviours |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: ce91e289cdaa4ccc849a0c287aefd34d |
|||
timeCreated: 1598326361 |
|||
>>>>>>> 50f2c39... Added xml documentation |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: ae6aad06c0e14f67aa7a9ad9004a1828 |
|||
timeCreated: 1600274594 |
|||
>>>>>>> c653d18... Implemented randomizer class. Ran into SerializeReference issue 1193322. |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
<<<<<<< HEAD |
|||
fileFormatVersion: 2 |
|||
timeCreated: 1600754588 |
|||
======= |
|||
guid: f9e02c502b7845229d26d377a0d871f1 |
|||
timeCreated: 1600744200 |
|||
>>>>>>> cb407fb... added randomizer tests |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
{% metadata_file .yamato/environments.yml %} |
|||
|
|||
--- |
|||
|
|||
{% for editor in complete_editors %} |
|||
{% for suite in performance_suites %} |
|||
{% for project in projects %} |
|||
{{project.name}}_linux_{{suite.name}}_{{editor.version}}: |
|||
name : {{project.name}} {{ suite.display_name }} performance tests ({{ editor.version }}, Linux) |
|||
agent: |
|||
type: Unity::VM::GPU |
|||
model: rtx2080 |
|||
image: cds-ops/ubuntu-18.04-base:latest |
|||
flavor: b1.large |
|||
variables: |
|||
PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin |
|||
commands: |
|||
- git submodule update --init --recursive |
|||
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade --user |
|||
- git clone git@github.cds.internal.unity3d.com:unity/utr.git utr |
|||
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published |
|||
{% if suite.name == "standalone" %} |
|||
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}}StandaloneLinux64 --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1 |
|||
{% else %} |
|||
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}} --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1 |
|||
{% endif %} |
|||
artifacts: |
|||
logs: |
|||
paths: |
|||
- "test-results/**/*" |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
|
|||
{% for editor in complete_editors %} |
|||
{% for suite in performance_suites %} |
|||
{% for project in projects %} |
|||
{{project.name}}_windows_{{suite.name}}_{{editor.version}}: |
|||
name : {{project.name}} {{ suite.display_name }} performance tests ({{ editor.version }}, Windows) |
|||
agent: |
|||
type: Unity::VM::GPU |
|||
model: rtx2080 |
|||
image: package-ci/win10:stable |
|||
flavor: b1.large |
|||
commands: |
|||
- git submodule update --init --recursive |
|||
- git clone git@github.cds.internal.unity3d.com:unity/utr.git utr |
|||
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade |
|||
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published |
|||
{% if suite.name == "standalone" %} |
|||
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64 --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1 |
|||
{% else %} |
|||
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}} --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1 |
|||
{% endif %} |
|||
artifacts: |
|||
logs: |
|||
paths: |
|||
- "test-results/**/*" |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
|
|||
# Not including OSX because the only OSX platform on Bokken with a GPU is a Mac Mini, of which there are only a few and setting up Yamato jobs is very complicated. |
|||
|
|||
# {% for variant in package_variants %} |
|||
# {% for editor in complete_editors %} |
|||
# code_coverage_win_{{editor.version}}: |
|||
# name: Code Coverage Report - Windows |
|||
# agent: |
|||
# type: Unity::VM |
|||
# image: package-ci/win10:stable |
|||
# flavor: b1.large |
|||
# commands: |
|||
# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm |
|||
# - upm-ci package test --unity-version {{editor.version}} --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateHtmlReport' |
|||
# artifacts: |
|||
# logs: |
|||
# paths: |
|||
# - "upm-ci~/test-results/**/*" |
|||
# dependencies: |
|||
# - .yamato/upm-ci-full.yml#pack_{{ variant.name }} |
|||
# {% endfor %} |
|||
# {% endfor %} |
|
|||
fileFormatVersion: 2 |
|||
guid: 01c33d1bbfad749909de900dc92115a0 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: e8af2c3f2ebad4dd69b451a052801fb3 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using NUnit.Framework; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
[TestFixture(640, 480, false, false)] |
|||
[TestFixture(640, 480, true, false)] |
|||
[TestFixture(640, 480, true, true)] |
|||
[TestFixture(1024, 768, false, false)] |
|||
[TestFixture(1024, 768, true, false)] |
|||
[TestFixture(1024, 768, true, true)] |
|||
[TestFixture(1920, 1080, false, false)] |
|||
[TestFixture(1920, 1080, true, false)] |
|||
[TestFixture(1920, 1080, true, true)] |
|||
[Category("Performance")] |
|||
public class PerformanceTestAllLabelers : PerformanceTester |
|||
{ |
|||
public PerformanceTestAllLabelers(int resx, int resy, bool capData, bool vizOn) |
|||
: base(resx, resy, capData, vizOn, |
|||
PerformanceTestBoundingBoxLabeler.Label, |
|||
PerformanceTestObjectCountLabeler.Label, |
|||
PerformanceTestPixelCountLabeler.Label, |
|||
PerformanceTestSemanticSegmentationLabeler.Label |
|||
) { } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 24f31177933144a3ba6bfecddb8c7cad |
|||
timeCreated: 1601485739 |
|
|||
using NUnit.Framework; |
|||
using NUnit.Framework.Constraints; |
|||
using UnityEngine.UIElements; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
[TestFixture(640, 480, false, false)] |
|||
[TestFixture(640, 480, true, false)] |
|||
[TestFixture(640, 480, true, true)] |
|||
[TestFixture(1024, 768, false, false)] |
|||
[TestFixture(1024, 768, true, false)] |
|||
[TestFixture(1024, 768, true, true)] |
|||
[TestFixture(1920, 1080, false, false)] |
|||
[TestFixture(1920, 1080, true, false)] |
|||
[TestFixture(1920, 1080, true, true)] |
|||
[Category("Performance")] |
|||
public class PerformanceTestBoundingBoxLabeler : PerformanceTester |
|||
{ |
|||
public const string Label = "BoundingBoxLabeler"; |
|||
|
|||
public PerformanceTestBoundingBoxLabeler(int resx, int resy, bool capData, bool vizOn) |
|||
: base(resx, resy, capData, vizOn, Label) { } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b559db416e1d40a79648f59a285c7632 |
|||
timeCreated: 1601485668 |
|
|||
using NUnit.Framework; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
[TestFixture(640, 480, false, false)] |
|||
[TestFixture(640, 480, true, false)] |
|||
[TestFixture(640, 480, true, true)] |
|||
[TestFixture(1024, 768, false, false)] |
|||
[TestFixture(1024, 768, true, false)] |
|||
[TestFixture(1024, 768, true, true)] |
|||
[TestFixture(1920, 1080, false, false)] |
|||
[TestFixture(1920, 1080, true, false)] |
|||
[TestFixture(1920, 1080, true, true)] |
|||
[Category("Performance")] |
|||
public class PerformanceTestObjectCountLabeler : PerformanceTester |
|||
{ |
|||
public const string Label = "ObjectCountLabeler"; |
|||
|
|||
public PerformanceTestObjectCountLabeler(int resx, int resy, bool capData, bool vizOn) |
|||
: base(resx, resy, capData, vizOn, Label) |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f15f1494b25a4bf387453aff1ffc54fe |
|||
timeCreated: 1601479869 |
|
|||
using NUnit.Framework; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
[TestFixture(640, 480, false, false)] |
|||
[TestFixture(640, 480, true, false)] |
|||
[TestFixture(640, 480, true, true)] |
|||
[TestFixture(1024, 768, false, false)] |
|||
[TestFixture(1024, 768, true, false)] |
|||
[TestFixture(1024, 768, true, true)] |
|||
[TestFixture(1920, 1080, false, false)] |
|||
[TestFixture(1920, 1080, true, false)] |
|||
[TestFixture(1920, 1080, true, true)] |
|||
[Category("Performance")] |
|||
public class PerformanceTestPixelCountLabeler : PerformanceTester |
|||
{ |
|||
public const string Label = "PixelCountLabeler"; |
|||
|
|||
public PerformanceTestPixelCountLabeler(int resx, int resy, bool capData, bool vizOn) |
|||
: base(resx, resy, capData, vizOn, Label) { } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f535325a3cb34cbea2057b59b6a0b003 |
|||
timeCreated: 1601485694 |
|
|||
using NUnit.Framework; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
[TestFixture(640, 480, false, false)] |
|||
[TestFixture(640, 480, true, false)] |
|||
[TestFixture(640, 480, true, true)] |
|||
[TestFixture(1024, 768, false, false)] |
|||
[TestFixture(1024, 768, true, false)] |
|||
[TestFixture(1024, 768, true, true)] |
|||
[TestFixture(1920, 1080, false, false)] |
|||
[TestFixture(1920, 1080, true, false)] |
|||
[TestFixture(1920, 1080, true, true)] |
|||
[Category("Performance")] |
|||
public class PerformanceTestSemanticSegmentationLabeler : PerformanceTester |
|||
{ |
|||
public const string Label = "SemanticSegmentationLabeler"; |
|||
|
|||
public PerformanceTestSemanticSegmentationLabeler(int resx, int resy, bool capData, bool vizOn) |
|||
: base(resx, resy, capData, vizOn, Label) { } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: c1f3e7fedce043bd860c715bc7550158 |
|||
timeCreated: 1601485725 |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using NUnit.Framework; |
|||
using Unity.PerformanceTesting; |
|||
using UnityEngine; |
|||
using UnityEngine.Perception.GroundTruth; |
|||
using UnityEngine.TestTools; |
|||
using UnityEngine.UIElements; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
public abstract class PerformanceTester |
|||
{ |
|||
(int, int) m_Resolution; |
|||
bool m_CaptureData; |
|||
bool m_VisualizersOn; |
|||
PerceptionCamera m_Camera; |
|||
GameObject m_SceneRoot; |
|||
IdLabelConfig m_IdConfig = null; |
|||
SemanticSegmentationLabelConfig m_SsConfig = null; |
|||
string[] m_Labelers = null; |
|||
List<CameraLabeler> m_ActiveLabelers = null; |
|||
|
|||
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1) |
|||
{ |
|||
this.m_Resolution = (resx, resy); |
|||
this.m_CaptureData = capData; |
|||
this.m_VisualizersOn = vizOn; |
|||
this.m_Labelers = new string[]{ labeler1 }; |
|||
} |
|||
|
|||
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2) |
|||
{ |
|||
this.m_Resolution = (resx, resy); |
|||
this.m_CaptureData = capData; |
|||
this.m_VisualizersOn = vizOn; |
|||
this.m_Labelers = new string[]{ labeler1, labeler2 }; |
|||
} |
|||
|
|||
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2, string labeler3) |
|||
{ |
|||
this.m_Resolution = (resx, resy); |
|||
this.m_CaptureData = capData; |
|||
this.m_VisualizersOn = vizOn; |
|||
this.m_Labelers = new string[]{ labeler1, labeler2, labeler3 }; |
|||
} |
|||
|
|||
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2, string labeler3, string labeler4) |
|||
{ |
|||
this.m_Resolution = (resx, resy); |
|||
this.m_CaptureData = capData; |
|||
this.m_VisualizersOn = vizOn; |
|||
this.m_Labelers = new string[]{ labeler1, labeler2, labeler3, labeler4 }; |
|||
} |
|||
|
|||
private static CameraLabeler CreateLabeler(string label, IdLabelConfig idConfig, SemanticSegmentationLabelConfig ssConfig) |
|||
{ |
|||
switch (label) { |
|||
case PerformanceTestObjectCountLabeler.Label: |
|||
return new ObjectCountLabeler(idConfig); |
|||
case PerformanceTestBoundingBoxLabeler.Label: |
|||
return new BoundingBox2DLabeler(idConfig); |
|||
case PerformanceTestPixelCountLabeler.Label: |
|||
return new RenderedObjectInfoLabeler(idConfig); |
|||
case PerformanceTestSemanticSegmentationLabeler.Label: |
|||
return new SemanticSegmentationLabeler(ssConfig); |
|||
|
|||
default: |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
private static List<CameraLabeler> CreateLabelers(IEnumerable<string> labelers, IdLabelConfig idConfig, SemanticSegmentationLabelConfig ssConfig) |
|||
{ |
|||
return labelers.Select(l => CreateLabeler(l, idConfig, ssConfig)).Where(labeler => labeler != null).ToList(); |
|||
} |
|||
|
|||
[SetUp] |
|||
public void SetUpTest() |
|||
{ |
|||
DatasetCapture.ResetSimulation(); |
|||
Time.timeScale = 1; |
|||
|
|||
if (Directory.Exists(DatasetCapture.OutputDirectory)) |
|||
Directory.Delete(DatasetCapture.OutputDirectory, true); |
|||
|
|||
Screen.SetResolution(m_Resolution.Item1, m_Resolution.Item2, true); |
|||
(m_Camera, m_IdConfig, m_SsConfig, m_SceneRoot) = TestHelper.CreateThreeBlockScene(); |
|||
|
|||
m_Camera.enabled = true; |
|||
m_Camera.showVisualizations = false; |
|||
|
|||
m_ActiveLabelers = CreateLabelers(m_Labelers, m_IdConfig, m_SsConfig); |
|||
|
|||
foreach (var l in m_ActiveLabelers) |
|||
{ |
|||
m_Camera.AddLabeler(l); |
|||
} |
|||
|
|||
if (!m_CaptureData) m_Camera.enabled = false; |
|||
if (m_CaptureData && !m_VisualizersOn) m_Camera.showVisualizations = false; |
|||
m_Camera.gameObject.SetActive(true); |
|||
} |
|||
|
|||
[TearDown] |
|||
public void TearDown() |
|||
{ |
|||
Object.DestroyImmediate(m_Camera.gameObject); |
|||
Object.DestroyImmediate(m_SceneRoot.gameObject); |
|||
|
|||
var simState = DatasetCapture.SimulationState; |
|||
simState.End(); |
|||
|
|||
DatasetCapture.ResetSimulation(); |
|||
Time.timeScale = 1; |
|||
if (Directory.Exists(DatasetCapture.OutputDirectory)) |
|||
Directory.Delete(DatasetCapture.OutputDirectory, true); |
|||
|
|||
m_ActiveLabelers = null; |
|||
m_IdConfig = null; |
|||
m_SsConfig = null; |
|||
} |
|||
|
|||
[UnityTest, Performance] |
|||
public IEnumerator ExecuteTest() |
|||
{ |
|||
yield return Measure.Frames() |
|||
.WarmupCount(10) |
|||
.MeasurementCount(30) |
|||
.Run(); |
|||
|
|||
// Allow all file writes to complete
|
|||
yield return new WaitForSeconds(5); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 73cdca6d48c834fb3ae5322e62b7c9c0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using UnityEngine; |
|||
using UnityEngine.Perception.GroundTruth; |
|||
|
|||
namespace PerformanceTests |
|||
{ |
|||
static class TestHelper |
|||
{ |
|||
public static (PerceptionCamera, IdLabelConfig, SemanticSegmentationLabelConfig, GameObject) CreateThreeBlockScene() |
|||
{ |
|||
var labels = new List<string> { "Crate", "Cube", "Box" }; |
|||
var idConfig = CreateDefaultLabelConfig(); |
|||
var ssConfig = CreateDefaultSemanticSegmentationLabelConfig(); |
|||
var camPos = new Vector3(198.0188f, 126.5455f, -267.4195f); |
|||
var camRot = Quaternion.Euler(20.834f, -36.337f, 0); |
|||
var camScale = new Vector3(36.24997f, 36.24997f, 36.24997f); |
|||
var cam = CreatePerceptionCamera(position: camPos, rotation: camRot, scale: camScale); |
|||
|
|||
const float scale = 36.24997f; |
|||
const float y = 82.92603f; |
|||
|
|||
var crate = CreateLabeledCube(labels[0], new Vector3(155.9981f, y, -149.9762f), scale: scale); |
|||
var cube = CreateLabeledCube(labels[1], new Vector3(92.92311f, y, -136.2012f), scale: scale); |
|||
var box = CreateLabeledCube(labels[2], new Vector3(96.1856f, y, -193.8386f), scale: scale); |
|||
|
|||
var root = new GameObject(); |
|||
crate.transform.parent = root.transform; |
|||
cube.transform.parent = root.transform; |
|||
box.transform.parent = root.transform; |
|||
|
|||
return (cam, idConfig, ssConfig, root); |
|||
} |
|||
|
|||
static IdLabelConfig CreateDefaultLabelConfig(List<string> labels = null) |
|||
{ |
|||
var entries = new List<IdLabelEntry>(); |
|||
|
|||
if (labels == null) |
|||
{ |
|||
entries.Add(new IdLabelEntry { id = 1, label = "label" }); |
|||
} |
|||
else |
|||
{ |
|||
var id = 1; |
|||
entries.AddRange(labels.Select(l => new IdLabelEntry { id = id++, label = l })); |
|||
} |
|||
|
|||
var config = ScriptableObject.CreateInstance<IdLabelConfig>(); |
|||
config.Init(entries); |
|||
|
|||
return config; |
|||
} |
|||
|
|||
static SemanticSegmentationLabelConfig CreateDefaultSemanticSegmentationLabelConfig() |
|||
{ |
|||
var labelConfig = ScriptableObject.CreateInstance<SemanticSegmentationLabelConfig>(); |
|||
labelConfig.Init(new List<SemanticSegmentationLabelEntry>() |
|||
{ |
|||
new SemanticSegmentationLabelEntry() |
|||
{ |
|||
label = "label", |
|||
color = new Color32(0, 0, 255, 255) |
|||
} |
|||
}); |
|||
|
|||
return labelConfig; |
|||
} |
|||
|
|||
//public static GameObject CreateLabeledCube(float scale = 10, string label = "label", float x = 0, float y = 0, float z = 0, float roll = 0, float pitch = 0, float yaw = 0)
|
|||
public static GameObject CreateLabeledCube(string label = "label", Vector3? position = null, Quaternion? rotation = null, float scale = 10) |
|||
{ |
|||
var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); |
|||
cube.transform.SetPositionAndRotation(position ?? Vector3.zero, rotation ?? Quaternion.identity); |
|||
cube.transform.localScale = new Vector3(scale, scale, scale); |
|||
var labeling = cube.AddComponent<Labeling>(); |
|||
labeling.labels.Add(label); |
|||
return cube; |
|||
} |
|||
|
|||
public static PerceptionCamera CreatePerceptionCamera(Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null) |
|||
{ |
|||
var cameraObject = new GameObject(); |
|||
cameraObject.SetActive(false); |
|||
|
|||
cameraObject.transform.localPosition = position ?? Vector3.zero; |
|||
cameraObject.transform.localRotation = rotation ?? Quaternion.identity; |
|||
cameraObject.transform.localScale = scale ?? Vector3.one; |
|||
|
|||
var camera = cameraObject.AddComponent<Camera>(); |
|||
camera.orthographic = true; |
|||
camera.orthographicSize = 1; |
|||
|
|||
var perceptionCamera = cameraObject.AddComponent<PerceptionCamera>(); |
|||
perceptionCamera.captureRgbImages = false; |
|||
|
|||
return perceptionCamera; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0a0806dd5ccf43b58adde994734ebfd6 |
|||
timeCreated: 1600780689 |
|
|||
{ |
|||
"name": "Unity.Perception.Performance.Tests", |
|||
"references": [ |
|||
"Unity.PerformanceTesting", |
|||
"UnityEngine.TestRunner", |
|||
"UnityEditor.TestRunner", |
|||
"Unity.Perception.Runtime", |
|||
"Unity.Simulation.Core" |
|||
], |
|||
"includePlatforms": [], |
|||
"excludePlatforms": [], |
|||
"allowUnsafeCode": false, |
|||
"overrideReferences": true, |
|||
"precompiledReferences": [ |
|||
"nunit.framework.dll" |
|||
], |
|||
"autoReferenced": false, |
|||
"defineConstraints": [ |
|||
"UNITY_INCLUDE_TESTS" |
|||
], |
|||
"versionDefines": [], |
|||
"noEngineReferences": false |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7b61d417f5df545b6b4cfc327638a440 |
|||
AssemblyDefinitionImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue