function net = getSqueezeSegV2Net
% return a trained DAG network object for SqueezeSegV2.

% Copyright 2020 The Mathworks, Inc.

pretrainedURL = 'https://www.mathworks.com/supportfiles/lidar/data/trainedSqueezeSegV2Net.mat';
pretrainedSqueezeSegV2Net = 'trainedSqueezeSegV2Net.mat';

if ~exist(pretrainedSqueezeSegV2Net,'file')
    disp('Downloading pretrained SqueezeSegV2 (2 MB)...');
    websave(pretrainedSqueezeSegV2Net,pretrainedURL);
end
squeezesegv2net = load(pretrainedSqueezeSegV2Net,'net');
net = squeezesegv2net.net;
save('SqueezeSegV2Net.mat','net');

end

