浏览代码
Merge branch 'master' into fod_generator_randomization_changes
/fod_generator_randomization_changes
Merge branch 'master' into fod_generator_randomization_changes
/fod_generator_randomization_changes
Steven Borkman
4 年前
当前提交
b45e3ea8
共有 248 个文件被更改,包括 4786 次插入 和 4500 次删除
-
1.gitignore
-
5.yamato/upm-ci-full.yml
-
7README.md
-
2TestProjects/PerceptionHDRP/Assets/IdLabelConfig.asset
-
64TestProjects/PerceptionHDRP/Assets/Scenes/SampleScene.unity
-
64TestProjects/PerceptionHDRP/Assets/Scenes/SampleSceneLensDistortion.unity
-
4TestProjects/PerceptionHDRP/Packages/manifest.json
-
20TestProjects/PerceptionHDRP/Packages/packages-lock.json
-
3TestProjects/PerceptionHDRP/ProjectSettings/ProjectSettings.asset
-
4TestProjects/PerceptionHDRP/ProjectSettings/ProjectVersion.txt
-
2TestProjects/PerceptionURP/Assets/IdLabelConfig.asset
-
18TestProjects/PerceptionURP/Packages/packages-lock.json
-
1TestProjects/PerceptionURP/ProjectSettings/ProjectSettings.asset
-
4TestProjects/PerceptionURP/ProjectSettings/ProjectVersion.txt
-
2TestProjects/PerceptionURP/ProjectSettings/QualitySettings.asset
-
88com.unity.perception/CHANGELOG.md
-
108com.unity.perception/Documentation~/Randomization/Scenarios.md
-
17com.unity.perception/Documentation~/Schema/Synthetic_Dataset_Schema.md
-
999com.unity.perception/Documentation~/Tutorial/Images/all_back_rands.png
-
501com.unity.perception/Documentation~/Tutorial/Images/background_randomizer.png
-
590com.unity.perception/Documentation~/Tutorial/Images/fixedscenarioempty.png
-
244com.unity.perception/Documentation~/Tutorial/Images/light_rand_1.png
-
807com.unity.perception/Documentation~/Tutorial/Images/light_rand_2.png
-
999com.unity.perception/Documentation~/Tutorial/Images/pc_labelers_added.png
-
999com.unity.perception/Documentation~/Tutorial/Images/pclabelconfigsadded.png
-
429com.unity.perception/Documentation~/Tutorial/Images/perc_comp.png
-
999com.unity.perception/Documentation~/Tutorial/Images/randomizers_all.png
-
41com.unity.perception/Documentation~/Tutorial/Phase1.md
-
32com.unity.perception/Documentation~/Tutorial/Phase2.md
-
21com.unity.perception/Documentation~/Tutorial/Phase3.md
-
5com.unity.perception/Editor/GroundTruth/CameraLabelerDrawer.cs
-
1com.unity.perception/Editor/Randomization/Editors/PerceptionEditorAnalytics.cs
-
25com.unity.perception/Editor/Randomization/Editors/RandomizerTagEditor.cs
-
280com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs
-
57com.unity.perception/Editor/Randomization/Editors/ScenarioBaseEditor.cs
-
8com.unity.perception/Editor/Randomization/Uss/Styles.uss
-
26com.unity.perception/Editor/Randomization/Utilities/StaticData.cs
-
27com.unity.perception/Editor/Randomization/Utilities/UIElementsEditorUtilities.cs
-
48com.unity.perception/Editor/Randomization/Uxml/RunInUnitySimulationWindow.uxml
-
7com.unity.perception/Editor/Randomization/Uxml/ScenarioBaseElement.uxml
-
6com.unity.perception/Editor/Randomization/VisualElements/Parameter/CategoricalOptionElement.cs
-
49com.unity.perception/Editor/Randomization/VisualElements/Parameter/ParameterElement.cs
-
5com.unity.perception/Editor/Randomization/VisualElements/Randomizer/AddRandomizerMenu.cs
-
8com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerElement.cs
-
21com.unity.perception/Editor/Randomization/VisualElements/Randomizer/RandomizerList.cs
-
1com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBox3DLabeler.cs
-
5com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs
-
2com.unity.perception/Runtime/GroundTruth/Labelers/CocoKeypointTemplate.asset
-
9com.unity.perception/Runtime/GroundTruth/Labelers/InstanceSegmentationLabeler.cs
-
7com.unity.perception/Runtime/GroundTruth/Labelers/JointLabel.cs
-
1com.unity.perception/Runtime/GroundTruth/Labeling/Labeling.cs
-
76com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs
-
9com.unity.perception/Runtime/GroundTruth/PerceptionCamera_InstanceSegmentation.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/CategoricalParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/CategoricalParameterBase.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/NumericParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/Parameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/CategorialParameters/AnimationClipParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/CategorialParameters/GameObjectParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/CategorialParameters/MaterialParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/CategorialParameters/StringParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/CategorialParameters/Texture2DParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/BooleanParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters/ColorHsva.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters/ColorHsvaCategoricalParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters/ColorHsvaParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters/ColorRgbCategoricalParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/ColorParameters/ColorRgbParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/FloatParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/IntegerParameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/Vector2Parameter.cs
-
3com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/Vector3Parameter.cs
-
2com.unity.perception/Runtime/Randomization/Parameters/ParameterTypes/NumericParameters/Vector4Parameter.cs
-
2com.unity.perception/Runtime/Randomization/Randomizers/AddRandomizerMenuAttribute.cs
-
109com.unity.perception/Runtime/Randomization/Randomizers/Randomizer.cs
-
2com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/BackgroundObjectPlacementRandomizer.cs
-
2com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/ForegroundObjectPlacementRandomizer.cs
-
66com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Utilities/GameObjectOneWayCache.cs
-
1com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Utilities/PoissonDiskSampling.cs
-
28com.unity.perception/Runtime/Randomization/Randomizers/RandomizerTag.cs
-
8com.unity.perception/Runtime/Randomization/Randomizers/RandomizerTagManager.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/FloatRange.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/ISampler.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/AnimationCurveSampler.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/ConstantSampler.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/NormalSampler.cs
-
2com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/UniformSampler.cs
-
6com.unity.perception/Runtime/Randomization/Scenarios/FixedLengthScenario.cs
-
206com.unity.perception/Runtime/Randomization/Scenarios/Scenario.cs
-
506com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs
-
2com.unity.perception/Runtime/Randomization/Scenarios/ScenarioConstants.cs
-
45com.unity.perception/Runtime/Randomization/Scenarios/UnitySimulationScenario.cs
-
2com.unity.perception/Runtime/Randomization/Scenarios/UnitySimulationScenarioConstants.cs
-
30com.unity.perception/Tests/Editor/PerceptionCameraEditorTests.cs
-
4com.unity.perception/Tests/Editor/RandomizerEditorTests.cs
-
9com.unity.perception/Tests/Runtime/GroundTruthTests/GroundTruthTestBase.cs
-
29com.unity.perception/Tests/Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs
-
7com.unity.perception/Tests/Runtime/GroundTruthTests/VisualizationTests.cs
-
409com.unity.perception/Tests/Runtime/GroundTruthTests/KeypointGroundTruthTests.cs
-
2com.unity.perception/Tests/Runtime/Randomization/RandomizerTests/ExampleTransformRandomizer.cs
|
|||
m_EditorVersion: 2019.4.16f1 |
|||
m_EditorVersionWithRevision: 2019.4.16f1 (e05b6e02d63e) |
|||
m_EditorVersion: 2019.4.19f1 |
|||
m_EditorVersionWithRevision: 2019.4.19f1 (ca5b14067cec) |
|
|||
m_EditorVersion: 2019.4.16f1 |
|||
m_EditorVersionWithRevision: 2019.4.16f1 (e05b6e02d63e) |
|||
m_EditorVersion: 2019.4.19f1 |
|||
m_EditorVersionWithRevision: 2019.4.19f1 (ca5b14067cec) |
999
com.unity.perception/Documentation~/Tutorial/Images/all_back_rands.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
com.unity.perception/Documentation~/Tutorial/Images/pc_labelers_added.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
com.unity.perception/Documentation~/Tutorial/Images/pclabelconfigsadded.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
999
com.unity.perception/Documentation~/Tutorial/Images/randomizers_all.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
<UXML xmlns="UnityEngine.UIElements" xmlns:editor="UnityEditor.UIElements"> |
|||
<TextField name="run-name" label="Run Name"/> |
|||
<editor:IntegerField name="total-iterations" label="Total Iterations"/> |
|||
<editor:IntegerField name="instance-count" label="Instance Count" max-value="10000"/> |
|||
<editor:ObjectField name="main-scene" label="Main Scene" allow-scene-objects="false"/> |
|||
<editor:ObjectField name="scenario" label="Scenario"/> |
|||
<VisualElement class="unity-base-field"> |
|||
<Label text="Sys-Param" class="unity-base-field__label"/> |
|||
<editor:ToolbarMenu name="sys-param" class="unity-base-field__input" style="border-width: 1px;"/> |
|||
</VisualElement> |
|||
<VisualElement style="align-items: center;"> |
|||
<Button name="run-button" text="Build and Run" style="margin: 10px; padding: 2 20; font-size: 13px;"/> |
|||
<VisualElement style="margin: 2 4 2 4;"> |
|||
<Style src="../Uss/RunInUnitySimulationWindowStyles.uss"/> |
|||
<VisualElement class="sim-window__container-outer"> |
|||
<Label text="Simulation Parameters" class="sim-window__header-1"/> |
|||
<TextField name="run-name" label="Run Name"/> |
|||
<editor:IntegerField name="total-iterations" label="Total Iterations" |
|||
tooltip="The number of scenario iterations to execute"/> |
|||
<editor:IntegerField name="instance-count" label="Instance Count" max-value="10000" |
|||
tooltip="The number of instances to distribute the work load across"/> |
|||
<VisualElement class="unity-base-field" |
|||
tooltip="The compute resources configuration to execute the simulation with"> |
|||
<Label text="Sys-Param" class="unity-base-field__label"/> |
|||
<editor:ToolbarMenu name="sys-param" class="unity-base-field__input" style="border-width: 1px;"/> |
|||
</VisualElement> |
|||
|
|||
<Label text="Optional Configuration" class="sim-window__header-1" style="margin-top: 18px;"/> |
|||
<editor:ObjectField name="scenario-config" label="Scenario JSON Config" allow-scene-object="false" |
|||
tooltip="Selects a scenario JSON configuration to load during the run. |
|||
You can leave this option blank to use the scenario settings currently configured in the editor."/> |
|||
|
|||
<VisualElement style="align-items: center; margin-top: 8px;"> |
|||
<Button name="run-button" text="Build and Run" style="margin: 10px; padding: 2 20; font-size: 13px;"/> |
|||
</VisualElement> |
|||
</VisualElement> |
|||
|
|||
<VisualElement class="sim-window__container-outer"> |
|||
<Label text="Previous Run Information" class="sim-window__header-1"/> |
|||
|
|||
<Label name="prev-run-name" text="Run Name: " class="sim-window__label-prev-result"/> |
|||
<Label name="project-id" text="Project ID: " class="sim-window__label-prev-result"/> |
|||
<Label name="execution-id" text="Execution ID: " class="sim-window__label-prev-result"/> |
|||
|
|||
<VisualElement style="flex-direction: row; margin-top: 2px;"> |
|||
<Button name="copy-execution-id" text="Copy Execution ID" style="flex-grow: 1; flex-shrink: 0;"/> |
|||
<Button name="copy-project-id" text="Copy Project ID" style="flex-grow: 1; flex-shrink: 0;"/> |
|||
</VisualElement> |
|||
</VisualElement> |
|||
</VisualElement> |
|||
</UXML> |
|
|||
using System; |
|||
using Unity.Simulation; |
|||
using UnityEngine.Scripting.APIUpdating; |
|||
/// Defines a scenario that is compatible with the Run in Unity Simulation window
|
|||
/// A scenario must derive from this class to be compatible with the Run in
|
|||
/// Unity Simulation window. The iterations of this scenario will be executed in parallel across a user specified
|
|||
/// number of worker instances when run in Unity Simulation.
|
|||
/// <typeparam name="T">The type of constants to serialize</typeparam>
|
|||
[MovedFrom("UnityEngine.Experimental.Perception.Randomization.Scenarios")] |
|||
public abstract class UnitySimulationScenario<T> : Scenario<T> where T : UnitySimulationScenarioConstants, new() |
|||
/// <typeparam name="T">The type of scenario constants to serialize</typeparam>
|
|||
public abstract class UnitySimulationScenario<T> : PerceptionScenario<T> |
|||
where T : UnitySimulationScenarioConstants, new() |
|||
public sealed override bool isScenarioComplete => currentIteration >= constants.totalIterations; |
|||
protected override bool isScenarioReadyToStart |
|||
{ |
|||
get |
|||
{ |
|||
if (!Configuration.Instance.IsSimulationRunningInCloud() && !m_SkippedFirstFrame) |
|||
{ |
|||
m_SkippedFirstFrame = true; |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
} |
|||
protected sealed override void IncrementIteration() |
|||
protected sealed override bool isScenarioComplete => currentIteration >= constants.totalIterations; |
|||
|
|||
/// <inheritdoc/>
|
|||
protected override void OnConfigurationImport() |
|||
currentIteration += constants.instanceCount; |
|||
if (Configuration.Instance.IsSimulationRunningInCloud()) |
|||
{ |
|||
DeserializeFromFile(new Uri(Configuration.Instance.SimulationConfig.app_param_uri).LocalPath); |
|||
constants.instanceIndex = int.Parse(Configuration.Instance.GetInstanceId()) - 1; |
|||
} |
|||
else |
|||
base.OnConfigurationImport(); |
|||
currentIteration = constants.instanceIndex; |
|||
public sealed override void DeserializeFromFile(string configFilePath) |
|||
protected sealed override void IncrementIteration() |
|||
base.DeserializeFromFile(Configuration.Instance.IsSimulationRunningInCloud() |
|||
? new Uri(Configuration.Instance.SimulationConfig.app_param_uri).LocalPath |
|||
: configFilePath); |
|||
currentIteration = constants.instanceIndex; |
|||
currentIteration += constants.instanceCount; |
|||
} |
|||
} |
|||
} |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue