カスタムミニバッチデ​​ータストアで学習さ​せ​たネットワークを​任意​のサイズの画像​に適用​させる方法

3 visualizaciones (últimos 30 días)
Fork
Fork el 30 de Oct. de 2018
Comentada: Fork el 4 de Nov. de 2018
今までは、denoiseImage関数を用いて、学習させていましたが、 ミニバッチデータストア を参考にミニバッチデータストアを用いて、学習させ、ネットワークを作成しましたが、denoiseImageのように任意のサイズの画像に適用できず、学習時の入力画像サイズでしか、ネットワークを適用できません。 ミニバッチデータストアのプログラムを変更する必要があるのでしょうか、それとも別の方法があるのでしょうか。

Respuestas (2)

Tohru Kikawada
Tohru Kikawada el 1 de Nov. de 2018
任意の画像サイズに適用するためには、ミニバッチデータストア内で画像を分割し、画像パッチをまとめてバッチとして渡すような実装が必要です。
denoisingImageDatastore の実装はご覧になりましたでしょうか。下記の397行目に画像パッチを切り出している処理があります。
>> edit denoisingImageDatastore
少し複雑ですが、上記を参考に実装をお試しください。
  1 comentario
Fork
Fork el 4 de Nov. de 2018
お忙しいところ、ご回答いただきありがとうございました。
for i = 1:ds.MiniBatchSize ds.CurrentFullImage = im2double(ds.InputImageDatastore.readimage(ds.CurrentImageIndex)); rowLocations = randi(max(size(ds.CurrentFullImage,1)-50,1), i, 1); colLocations = randi(max(size(ds.CurrentFullImage,2)-50,1), i, 1); patches{i} = ds.CurrentFullImage(rowLocations(i):rowLocations(i)+49,... colLocations(i):colLocations(i)+49, :);
このように直してみましたが、50*50のままでした。 denoisingImageDatastore のように、画像パッチをまとめてバッチとして渡すためには、どのようなコードの追加が必要でしょうか
また、denoisingImageSourceでも、偽色を取り除くことは可能なのでしょうか

Iniciar sesión para comentar.


Fork
Fork el 2 de Nov. de 2018
お忙しいところ、ご回答いただきありがとうございました。
for i = 1:ds.MiniBatchSize
ds.CurrentFullImage = im2double(ds.InputImageDatastore.readimage(ds.CurrentImageIndex));
rowLocations = randi(max(size(ds.CurrentFullImage,1)-50,1), i, 1);
colLocations = randi(max(size(ds.CurrentFullImage,2)-50,1), i, 1);
patches{i} = ds.CurrentFullImage(rowLocations(i):rowLocations(i)+49,...
colLocations(i):colLocations(i)+49, :);
このように直してみましたが、50*50のままでした。
denoisingImageDatastore のように、画像パッチをまとめてバッチとして渡すためには、どのようなコードの追加が必要でしょうか
また、denoisingImageSourceでも、偽色を取り除くことは可能なのでしょうか

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!