{"id":5459,"date":"2022-04-26T01:23:49","date_gmt":"2022-04-25T17:23:49","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=5459"},"modified":"2024-05-05T14:19:06","modified_gmt":"2024-05-05T06:19:06","slug":"%e4%ba%ba%e8%84%b8%e8%a1%a8%e6%83%85%e8%af%86%e5%88%ab","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=5459","title":{"rendered":"\u4eba\u8138\u8868\u60c5\u8bc6\u522b"},"content":{"rendered":"\n<p>\u6d4b\u8bd5\u73af\u5883<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Ubuntu 20.04 x86_64\nPython 3.9.10\npip3 install opencv-python==4.5.5.64\npip3 install tensorflow-cpu==2.8.0\npip3 install jupyter==1.0.0\npip3 install protobuf==3.19.0<\/pre>\n\n\n\n<p>\u6e90\u7801\u57fa\u4e8e\uff1a<a href=\"https:\/\/github.com\/karansjc1\/emotion-detection\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/karansjc1\/emotion-detection<\/a><\/p>\n\n\n\n<p>\u672c\u6587\u8d44\u6e90\u6587\u4ef6\u4e0b\u8f7d\uff1a<a href=\"https:\/\/pan.baidu.com\/s\/1Fyh0qWE28V-jRhxHYOKAuw?pwd=i798\">https:\/\/pan.baidu.com\/s\/1Fyh0qWE28V-jRhxHYOKAuw?pwd=i798<\/a><\/p>\n\n\n\n<p>\u6848\u4f8b\u4ee3\u7801\u652f\u6301 5 \u79cd\u8868\u60c5\u7684\u8bc6\u522b\uff1a\u751f\u6c14\u3001\u5f00\u5fc3\u3001\u65e0\u8868\u60c5\u3001\u60b2\u4f24\u3001\u60ca\u8bb6\u3002\u539f\u7406\u4e0a\uff0c\u9996\u5148\u4f7f\u7528 opencv \u83b7\u53d6\u76f8\u673a\u56fe\u50cf\uff0c\u7136\u540e\u8f6c\u7070\u5ea6\u56fe\u4ee5\u51cf\u5c0f\u8ba1\u7b97\u91cf\u3002\u518d\u7136\u540e\u901a\u8fc7\u4eba\u8138\u7ea7\u8054\u5206\u7c7b\u5668\u68c0\u6d4b\u51fa\u4eba\u8138\u4f4d\u7f6e\uff0cROI \u622a\u53d6\u4eba\u8138\u56fe\uff0c\u4f7f\u7528 Keras \u5df2\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u8fdb\u884c\u8868\u60c5\u8bc6\u522b\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u4f7f\u7528\u7684 Keras \u4e3a Tensorflow \u5185\u7f6e\u7248\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u72ec\u7acb\u7684 Keras\uff0c\u5bfc\u5165\u5e93\u7684\u5730\u65b9\u6539\u4e00\u4e0b\u5c31\u884c\u3002\u4e0d\u8fc7\u9700\u8981\u6ce8\u610f\uff0c\u5982\u679c\u7535\u8111\u6ca1\u6709 CUDA \u652f\u6301\u6216\u8005 tf \u7248\u672c\u6ca1\u6709\u5339\u914d\u7684 CUDA \u7248\u672c\uff08\u8fc7\u8001\u6216\u592a\u65b0\uff09\u5c31\u4e0d\u8981\u5b89\u88c5 GPU \u7248 tf\uff0c\u5426\u5219\u4f7f\u7528 tf \u65f6\u4f1a\u62a5\u9519\u3002\u6211\u8fd9\u91cc\u5c31\u662f CUDA \u7248\u672c\u592a\u9ad8\u4e86\uff0c\u5199\u672c\u6587\u65f6\u6700\u65b0\u7684 tf \u7a33\u5b9a\u7248 2.8.0 \u8f6e\u5b50\u90fd\u8fd8\u6ca1\u6709\u652f\u6301\u6211\u7535\u8111\u7684 CUDA \u7248\u672c\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u5c31\u8981\u6307\u5b9a\u5b89\u88c5 CPU \u7248 tensorflow-cpu\uff0c\u800c\u5b89\u88c5\u65f6\u6307\u5b9a\u5305\u540d tensorflow \u6216\u8005 tensorflow-gpu \u90fd\u662f GPU \u7248\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u8d44\u6e90\u6587\u4ef6\u540e\uff0c\u4f7f\u7528 jupyter \u6253\u5f00<strong>\u4eba\u8138\u8868\u60c5\u8bc6\u522b0.1.ipynb<\/strong>\uff0c\u5e76\u8fd0\u884c\u6574\u4e2a\u7b14\u8bb0\u672c\uff0c\u53ef\u4ee5\u901a\u8fc7\u56fe\u50cf\u9884\u89c8\u6846\u67e5\u770b\u76f8\u673a\u56fe\u50cf\uff0c\u5728\u68c0\u6d4b\u5230\u4eba\u8138\u540e\u4f1a\u6846\u51fa\u5e76\u6807\u6ce8\u8bc6\u522b\u51fa\u7684\u8868\u60c5\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"887\" height=\"906\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/04\/image-266.png\" alt=\"\" class=\"wp-image-5469 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/04\/image-266.png 887w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/04\/image-266-294x300.png 294w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/04\/image-266-768x784.png 768w\" data-sizes=\"(max-width: 887px) 100vw, 887px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 887px; --smush-placeholder-aspect-ratio: 887\/906;\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u6d4b\u8bd5\u73af\u5883 \u6e90\u7801\u57fa\u4e8e\uff1ahttps:\/\/github.com\/karansjc1\/emotion-detectio [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-5459","post","type-post","status-publish","format-standard","hentry","category-all"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/5459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5459"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/5459\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}