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

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

Risposte (2)

Tohru Kikawada
Tohru Kikawada il 1 Nov 2018
任意の画像サイズに適用するためには、ミニバッチデータストア内で画像を分割し、画像パッチをまとめてバッチとして渡すような実装が必要です。
denoisingImageDatastore の実装はご覧になりましたでしょうか。下記の397行目に画像パッチを切り出している処理があります。
>> edit denoisingImageDatastore
少し複雑ですが、上記を参考に実装をお試しください。
  1 Commento
Fork
Fork il 4 Nov 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でも、偽色を取り除くことは可能なのでしょうか

Accedi per commentare.


Fork
Fork il 2 Nov 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でも、偽色を取り除くことは可能なのでしょうか

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!