How do I create training data set for deep learning?

3 ビュー (過去 30 日間)
Casey
Casey 2022 年 12 月 22 日
回答済み: Aastha 2025 年 5 月 15 日
I am trying to create a convolutional neural network from a unsupervised learning.
The training data set I want to create contains 10 examples (x_i, y_i) , i=1,2,...10 .
the x_i and y__i are both certain types of images.
So when using the convolutional neural network, I would like to input x_i and train the output as y_i.
Is it possible to create this training data set on matlab, and if so, how can I do that?
  2 件のコメント
KSSV
KSSV 2022 年 12 月 22 日
What exactly are the images? What do you want to train? What is input and what you are targetting?
Casey
Casey 2022 年 12 月 22 日
編集済み: Casey 2022 年 12 月 22 日
@KSSV Thank you for your comment.
My images are propagated light beam wavefront's intensity distribution(x) and phase distribution(y), which involves the atmospheric turbulence.
So the input would be the intensity distribution, and through the training of CNN, I would like to predict its phase distribution.

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

回答 (1 件)

Aastha
Aastha 2025 年 5 月 15 日
Hi @Casey,
To create a training dataset for an image-to-image machine learning task using a CNN. You can use the "imageDatastore" function in MATLAB to organize your data into a training set. Kindly refer to the steps mentioned below:
1. Define two image datastores using the "imageDatastore" function in MATLAB; one for the input images and one for the output (target) images. Then, combine them into a single paired datastore using the combine function:
% Create image datastores
inputDS = imageDatastore(inputFolderPath, ...
'IncludeSubfolders', true, ...
'LabelSource', 'none');
outputDS = imageDatastore(outputFolderPath, ...
'IncludeSubfolders', true, ...
'LabelSource', 'none');
% Combine input and output into a single paired datastore
combinedDS = combine(inputDS, outputDS);
2. You can then use the "trainnetwork" function in MATLAB to train your CNN model. For more information on the training procedure and available parameters, refer to the MathWorks documentation of the "trainnetwork" function:
For additional details on using image datastores, you can refer to the MathWorks documentation of "imageDatastore" function:
Hope this is helpful!

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by