Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to feed scene data to a model I am training using ML-Agents in Unity

Discussion in 'ML-Agents' started by unity_95E2298061EFD837527E, Mar 22, 2023.

  1. unity_95E2298061EFD837527E


    Feb 10, 2023
    I want to train a model using the ML-Agents package. In the training process, I would like to capture a sequence of screenshots of a scene while it is in play mode, and feed those snapshots to the model I am training in real-time (as the input data). Is there any way I can do this in Unity? Like, a script that starts screenshotting the scene frame by frame and passing it to the model in real time? Are there any packages that can help me achieve this?
    Last edited: Mar 23, 2023
  2. rayanjenkinsed


    Aug 13, 2020
    Is your goal to have the data in the scene saved ? Or the positions/elements presents visually displayed in an image fed ?