I have hyperspectral data cubes of 640*480*100. And want to use patches of my data 16*16*100 as an input for the deeplearning toolbox, but i can't seem to get to get it working. The toolbox only allows image formats, but saving the patches as images isn't possible due to the spectral dimension.

2 件のコメント

Cris LaPierre
Cris LaPierre 2023 年 4 月 6 日
Could you be more specific? The Deep Learning Toolbox is a collection of functions, apps, and examples for designing, training, and analyzing deep learning networks. Which one of these are you having difficulty using?
George navash
George navash 2023 年 4 月 6 日
Hi Cris,
I mean the deep network designer from the toolbox. It only allows jpg, png, etc as input format which consists out of mainly 3 dimensions, r,g,b. But my spectrum consists out of 100 dimensions for the wavelength aspect. I have saved my data in matrices of 16*16*100 but i cant use .mat as an input for the deep network designer

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

 採用された回答

Matt J
Matt J 2023 年 4 月 6 日
編集済み: Matt J 2023 年 4 月 6 日

0 投票

but i cant use .mat as an input
Yes, you can.
imds = imageDatastore(location,"ReadFcn",@load);
You also don't necessarily need to keep your input data in files. The input to trainNetwork could be a 16x16x100xN numeric array, assuming you're using a recent enough version of Matlab.

4 件のコメント

George navash
George navash 2023 年 4 月 6 日
Hi Matt,
I tried this and i get the following error.
I assume the @load is loading my .mat files as a structure. I am not sure how to solve this issue.
Matt J
Matt J 2023 年 4 月 6 日
Something like this, then,
imds = imageDatastore(location,"ReadFcn",@(z)load(z).yourImage);
Matt J
Matt J 2023 年 4 月 6 日
Incidentally also, you should probably look at randomPatchExtractionDatastore.
George navash
George navash 2023 年 4 月 6 日
This worked thankyou!!

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

その他の回答 (1 件)

Abhishek Tripathi
Abhishek Tripathi 2023 年 4 月 7 日
編集済み: Abhishek Tripathi 2023 年 4 月 7 日

0 投票

We have one example for Classify Hyperspectral Images Using Deep Learning. Please go through this.
For more info. see the documentation here.

カテゴリ

ヘルプ センター および File Exchange で Lidar Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by