Warning: JPEG library error (8 bit), "Invalid SOS parameters for sequential JPEG".

Hello there!
I am trying to modify the pretrained network, alexnet, for my images, which are in jpg format. The code after creating the datastore is here:
forestzones = imds.Labels;
[trainimgs,testimgs] = splitEachLabel(imds,0.8,'randomized');
foractual = testimgs.Labels;
trainimgs = augmentedImageDatastore([227 227],trainimgs);
testimgs = augmentedImageDatastore([227 227],testimgs);
anet = alexnet;
layers = anet.Layers;
fc = fullyConnectedLayer(2);
layers(23) = fc;
layers(end) = classificationLayer;
opts = trainingOptions('sgdm','InitialLearnRate',0.01);
[fornet,info] = trainNetwork(trainimgs,layers,opts)
I get >> Warning: JPEG library error (8 bit), "Invalid SOS parameters for sequential JPEG".
As a result I am not getting a proper info table.
What is the problem.
Thank you in advance!!

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 30 日

0 投票

Apparently the Samsung Galaxy S9 has a bug in how it creates JPEG images that leads to that error.
The JPEG library itself was updated by now, but that has not necessarily made it into your version of MATLAB (and you do not indicate which MATLAB release you are using.)

2 件のコメント

John
John 2024 年 8 月 21 日
I just downloaded a trial version of Matlab, and I am trying out one of the examples "Detecting Cell Edge" on my own picture from a phone. I am getting the same message "Warning: JPEG library error (8 bit), "Invalid SOS parameters for sequential JPEG". What is the solution to this problem?
Walter Roberson
Walter Roberson 2024 年 8 月 22 日
Do you happen to be using a Galaxy S9 ? If not, do you happen to be using a Samsung phone?

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

カテゴリ

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

質問済み:

2020 年 10 月 30 日

コメント済み:

2024 年 8 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by