Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Instance Segmentation Annotation

Discussion in 'Unity Simulation' started by unity_KCkxF0SN_XzVXg, Jun 11, 2020.

Thread Status:
Not open for further replies.
  1. unity_KCkxF0SN_XzVXg

    unity_KCkxF0SN_XzVXg

    Joined:
    Jun 11, 2020
    Posts:
    2
    Hi there, I am trying to create a project which generate instance segmentation annotation, I am following the instruction below :
    https://github.com/Unity-Technologi...master/doc/use-cases/instance-segmentation.md

    When I got to creating InstanceDataCapture.cs file, the "InstanceCount" namespace could not be found.

    Error that shows up:
    Assets\Scripts\DataExtract\InstanceDataCapture.cs(56,17): error CS0246: The type or namespace name 'InstanceCount' could not be found (are you missing a using directive or an assembly reference?)

    I am wondering which package does the "InstanceCount" get declared.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,153
    It appears we may be missing a script, sorry about that, we will update the tutorial. In the meantime, please create a script called InstanceCount.cs and paste the following:
    Code (CSharp):
    1. [System.Serializable]
    2. public class InstanceCount : System.Object
    3. {
    4.     public string screenCaptureName; // Name of saved image to correlate data
    5.     public string labelInstances;
    6.     public InstanceCount(string screenCaptureName, string labelInstances)
    7.     {
    8.         this.screenCaptureName = screenCaptureName;
    9.         this.labelInstances = labelInstances;
    10.     }
    11. }
     
  3. unity_KCkxF0SN_XzVXg

    unity_KCkxF0SN_XzVXg

    Joined:
    Jun 11, 2020
    Posts:
    2
    It works, thanks alot :)
     
    JeffDUnity3D likes this.
  4. andrzej_

    andrzej_

    Joined:
    Dec 2, 2016
    Posts:
    80
    @JeffDUnity3D
    Will this work with the HDRP Perception SDK as well?

    Also one thing that will not work with both semantic and instance segmentation as it's implemented currently is more complex shaders with transparencies (alpha cutouts) or ones using displacement. Masks will not match the RGB output if you just assign a simple unlit shader.
     
Thread Status:
Not open for further replies.
unityunity