Reinforcement learning : How to define custom environment with multiple image based observations

1 回表示 (過去 30 日間)
Hi,
I am trying to create a custom agent with image based observations. How can assign an image to rlNumericSpec.
I have created ObservationInfo as follows since the image is 320X180. Normally the image is RGB even if I converted to gray I do not know how to assign in to ObservationInfo in the customer reset and step functions.
ObservationInfo = rlNumericSpec([320 180]);
Even if I solve this I require RGB images and later on more than one images.
Any ideas?
Best regards

回答 (1 件)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2021 年 3 月 18 日
For grayscale images, take a look at this example. For rgb, maybe the following would work
ObservationInfo = rlNumericSpec([320 180 3]);
  2 件のコメント
Dr. Ali Peker
Dr. Ali Peker 2021 年 3 月 19 日
編集済み: Dr. Ali Peker 2021 年 3 月 19 日
Thank you I have converted the image using im2double in custom reset and step functions. for RGB I have used [180 320 3] it works.
DAMODARAN B.K
DAMODARAN B.K 2021 年 5 月 23 日
from visualiser plot how did you take images?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by