-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththings
More file actions
34 lines (29 loc) · 1.39 KB
/
things
File metadata and controls
34 lines (29 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
adam optimizer가 sgdm보다 성능이 좋음
adam 사용시 250회 훈련해도 충분함
학습 많이하면 overfitting 생김
countEachLabel을 빼고 하나의 폴더에 사진을 넣을 시 참고
class1 = imageDatastore({'cat1/random_folder/','cat1/'});
class1.Labels = repelem("cat1",numImages);
imdsFinal = imageDatastore([class1.Files; class2.Files]);
imdsFinal.Labels = [class1.Labels; class2.Labels]);
imds = imageDatastore(fullfile(matlabroot, 'toolbox', 'matlab', {'demos','imagesci'}),...
'LabelSource', 'foldernames', 'FileExtensions', {'.jpg', '.png', '.tif'})
imds =
ImageDatastore with properties:
Files: {
' ...\matlab\toolbox\matlab\demos\cloudCombined.jpg';
' ...\matlab\toolbox\matlab\demos\example.tif';
' ...\matlab\toolbox\matlab\demos\landOcean.jpg'
... and 5 more
}
Labels: [demos; demos; demos ... and 5 more categorical]
ReadFcn: @readDatastoreImage
---------------------------------------
tif파일만 읽기
imds = imageDatastore(fullfile(matlabroot,"toolbox","matlab"),...
"IncludeSubfolders",true,"FileExtensions",".tif","LabelSource","foldernames")
-----------------------------------------
https://kr.mathworks.com/help/matlab/ref/startswith.html
https://kr.mathworks.com/help/matlab/ref/mfilename.html
https://kr.mathworks.com/help/matlab/ref/count.html
imds.Labels=repmat(a, size(imds.Labels, 1), 1)