Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unity Perception: Running Multiple Scenes with Perception

Discussion in 'Computer Vision' started by bkleck, Sep 24, 2021.

  1. bkleck

    bkleck

    Joined:
    Aug 19, 2021
    Posts:
    3
    Hello,

    I was wondering if it was possible to leverage on the Perception Package to create an application for synthetic data generation.
    E.g. Multiple scenes with fixed length scenario and randomizers and run them in sequence.

    I have tried to put multiple scenes into a build, but run into many issues during the transition between scenes with the Perception package.
     
  2. JonHUnity

    JonHUnity

    Joined:
    Sep 16, 2016
    Posts:
    21
    Scene loading is tricky, since they require multiple frames to load. For these kinds of cases, we have introduced a new method `ScenarioBase.DelayIteration()` (GitHub), which can be called from a Randomizer's `OnIterationStart()` to delay the rest of the randomization until the next frame.
     
  3. bkleck

    bkleck

    Joined:
    Aug 19, 2021
    Posts:
    3
    Thank you for your help!

    I managed to get the scene transitions to work, but the currentIteration did not reset on each new scene. I managed to reset currentIterations by calling Restart() during OnIdle().

    However, only the first frame is captured for each subsequent scene (except for the first scene), and each subsequent scene advances to the end almost near immediately.

    I am not too sure why this happens too, maybe you could help me with this?