浏览代码

Apply suggestions from code review

Co-authored-by: sleal-unity <53197518+sleal-unity@users.noreply.github.com>
/main
GitHub 4 年前
当前提交
e40a699c
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 10
      com.unity.perception/Documentation~/Tutorial/Phase1.md
  2. 2
      com.unity.perception/Documentation~/Tutorial/Phase2.md

10
com.unity.perception/Documentation~/Tutorial/Phase1.md


* **Action**: From the _**Inspector**_ tab, enable `Use Automatic Labeling for All Selected Items`, and then select `Use asset name` as the labeling scheme.
<p align="center">
<img src="Images/autolabel.png" width = "400"/>
<img src="Images/autolabel.png" width="400"/>
</p>
This will assign each of the selected Prefabs its own name as a label.

<p align="center">
<img src="Images/addtoconfigwindow.png" width = "500"/>
<img src="Images/addtoconfigwindow.png" width="500"/>
<img src="Images/labelconfigs.png" width = "800"/>
<img src="Images/labelconfigs.png" width="800"/>
</p>
**Note:** Since we used automatic labels here and added them to our configurations, we are confident that the labels in the configurations match the labels of our objects. In cases where you decide to add manual labels to objects and configurations, make sure you use the exact same labels, otherwise, the objects for which a matching label is not found in your configurations will not be detected by the labelers that are using those configurations.

Since we have visualizations enabled on our `Perception Camera`, you should now see a bounding box being drawn around the object you put in the scene, and the object itself being colored according to its label's color in `TutorialSemanticSegmentationLabelConfig`, similar to the image below:
<p align="center">
<img src="Images/one_object_run.png" width = "600"/>
<img src="Images/one_object_run.png" width="600"/>
</p>
### <a name="step-5">Step 5: Set Up Randomizers and Generate Data</a>

* **Action**: In the UI snippet for `TextureRandomizer`, click _**Add Folder**_ and choose `Assets/Samples/Perception/0.6.0-preview.1/Tutorial Files/Background Textures`.
* **Action**: In the UI snippet for `RotationRandomizer`, verify that all the maximum values for the three ranges are `360` and that minimum values are `0`.
* **Action**: In the UI snippet for `RotationRandomizer`, verify that all the minimum values for the three ranges are `0` and that maximum values are `360`.
Your list of Randomizers should now look like the screenshot below:

2
com.unity.perception/Documentation~/Tutorial/Phase2.md


The purpose of this piece of code is to obtain a random float parameter and assign it to the light's `Intensity` field on the start of every Iteration. Let's go through the code above and understand each part. The `FloatParameter` field makes it possible for us to define a randomized float parameter and modify its properties from the editor UI, similar to how we already modified the properties for the previous Randomizers we used.
**Note:** If you look at the _**Console**_ tab of the editor now, you will see an error regarding `MyLightRandomizerTag` not being found. This is normal, since we have not yet created this class; the error will go away once we create the class later.
**Note:** If you look at the _**Console**_ tab of the editor now, you will see an error regarding `MyLightRandomizerTag` not being found. This is to be expected, since we have not yet created this class; the error will go away once we create the class later.
If you return to your list of Randomizers in the _**Inspector**_ view of `SimulationScenario`, you can now add this new Randomizer.

正在加载...
取消
保存