function out = resnet50_wrapper(im) %#codegen
% Wrapper function to call ResNet50 predict function.

%   Copyright 2019 The MathWorks, Inc.   

% This example uses OpenCV for reading frames from a web camera 
% and displaying output image. Update buildinfo to link with 
% OpenCV library available on target.
opencv_link_flags = '`pkg-config --cflags --libs opencv`';
coder.updateBuildInfo('addLinkFlags',opencv_link_flags);

% To avoid multiple loads of the network for each run, we use 
% persistent rnet
persistent rnet;
if isempty(rnet)
    rnet = resnet50();
end
out = rnet.predict(im);



end