perfmance: "imageDatastore" low performance when specifying multiple file names directly
1 次查看(过去 30 天)
显示 更早的评论
Very low performance when specifying multiple image full path names for a given imageDatastore,see benchmark below.
env: matlab 2022b, win10
imgsDir = "someImgDir";
imgNames = imgsDir+"/"+string(0:2687)+".jpg";% The more images you have, the lower the performance
t1 = tic;
for i = 1:10
imds = imageDatastore(imgNames); % low
end
t = toc(t1)
t2 = tic;
for i = 1:10
imds = imageDatastore(imgsDir); % high
end
t = toc(t2)
t =
14.0975
t =
0.5759
Initially I wanted to sort the files in the ImageDatastore by Arabic arrays, but found the above to be a real performance problem, any better suggestions?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!