GTC的Matlab演示:样式转移和名人LookAlikes
What are we going to show?
深度学习云
即使你不会GTC,我们希望你know that we support NVIDIA GPU Cloud Resources, through theirNGC平台。这意味着您可以在云中使用NVIDIA GPU运行MATLAB。新的(nvidia!)博客文章用一个示例说明了详细信息:https://devblogs.nvidia.com/ 有关云资源的更多链接:- Here's a super detailed video to get you set up using GPUs on the cloud:链接到视频
- and more details can be found here:链接到文档
Demos
在节目中,我们将通过抽奖活动吸引人们到我们的展位,获得免费的Matlab家居许可证和凉爽的演示,包括:- Deep Learning on DGX
- 深度学习延伸
- Age Detection using YOLO on a Jetson Xavier board
函数mdl = buildCelebModel(imds_celeb,net,layer layer)%获取名人激活num_files = length(imds_celeb.files);activs_c = [];对于II = 1:num_files ipicture = imresize(imds_celeb.readimage(ii),[448,448]);bbox = face_predict(ipicture);如果〜ISEMPTY(bbox)bboxpt = bbox(1,:);bufx = floor(.3*bboxpt(3));bufy = floor(.3*bboxpt(4));xs = max(bboxpt(1)-bufx,1);ys = max(bboxpt(2)-bufy,1);Xe = min(bboxpt(1)+bboxpt(3)-1+bufx,size(ipicture,2)); ye = min(bboxpt(2)+bboxpt(4)-1+bufy, size(ipicture,1)); face = ipicture(ys:ye, xs:xe, :); face = imresize(face, [224,224]); end xx = activations(net,single(face),layer); activs_c = vertcat(activs_c,squeeze(xx(1,1,:))'); %' end MDL = KDTreeSearcher(activs_c); endThe idea is to pull activations from each face, and then build a model (MDL) that you can use to find the closest match. When I run this through my webcam, extract a face from the camera, I can run this code:
activs_u = squeeze(xx(1,1,:))';%' [Idx,D] = knnsearch(app.mdl,activs_u,'K',num);And I will get the Index (Idx) corresponding to the image number of my closest match. Inside the app, it will look something like this: Whether or not you believe I look like Uma I guess is up for debate, but let's just say I was happy with my match!!更新:第二天我再次运行时,显然我看起来像Padma?该算法可疑! Also keep in mind at a conference such as this, it's not really about showing the most ground breaking or highest accuracy algorithm. It's about letting people interact with deep learning and hopefully starting a conversation.也就是说,在我去圣何塞之前,我还有几天可以与这些演示一起玩。关于如何在会议前使这些演示更好的建议吗? I put the code for the doppelganger example in the download code button below. Let me know what you think of the demos, and please stop by the booth if you're going to be at GTC San Jose!
Copyright 2018 The MathWorks, Inc.
Get the MATLAB code
Comments
要发表评论,请单击here登录您的数学帐户或创建一个新帐户。