{"id":721,"date":"2022-12-15T17:49:53","date_gmt":"2022-12-15T09:49:53","guid":{"rendered":"http:\/\/wordpress.loc\/?p=721"},"modified":"2022-12-15T17:50:25","modified_gmt":"2022-12-15T09:50:25","slug":"esp32_ch2-15","status":"publish","type":"post","link":"https:\/\/www.nmking.io\/index.php\/2022\/12\/15\/721\/","title":{"rendered":"ESP32CAM tensorflow lite \u4eba\u9ad4\u5075\u6e2c \u521d\u9ad4\u9a57"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>\u524d\u5148\u65e5\u5b50Google\u5ba3\u5e03Tensorflow\u5c07\u51fa\u4e00\u7248Tensorflow Micro\u7248\uff0c\u6bd4Tensorflow Lite\u66f4\u5c0f\u8981\u652f\u63f4arduino\u7cfb\u7d71\uff0c\u5c24\u5176\u6a19\u660e\u8981\u7d66esp32\u7cfb\u5217\uff0c\u8b93\u4eba\u975e\u5e38\u9a5a\u5947<\/p><\/blockquote><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-ht-block-toc is-style-rounded htoc htoc--position-wide toc-list-style-plain\" data-htoc-state=\"expanded\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">Table of Contents<\/span><span class=\"htoc__toggle\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\"><g fill=\"#444\"><path d=\"M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><path d=\"M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><\/g><\/svg><\/span><\/span><div class=\"htoc__itemswrap\"><ul class=\"ht_toc_list\"><li class=\"\"><a href=\"#htoc-\">\u5be6\u505a\u8aaa\u660e<\/a><\/li><li class=\"\"><a href=\"#htoc-1\">\u4e00\u3001\u6e96\u5099\u88dd\u7f6e<\/a><\/li><li class=\"\"><a href=\"#htoc-arduino\">\u4e8c\u3001Arduino\u74b0\u5883\u8a2d\u5b9a<\/a><\/li><li class=\"\"><a href=\"#htoc-arduino-ide-tensorflow-lite\">\u4e09\u3001Arduino IDE\u5b89\u88ddTensorflow Lite\u7a0b\u5f0f\u5eab<\/a><\/li><li class=\"\"><a href=\"#htoc-11\">\u56db\u3001\u8f09\u5165\u7bc4\u4f8b\u7a0b\u5f0f<\/a><\/li><li class=\"\"><a href=\"#htoc-111\">\u4e94\u3001\u4eba\u9ad4\u5075\u6e2c\u7d50\u679c<\/a><ul class=\"ht_toc_child_list\"><li class=\"\"><a href=\"#htoc-1111\">1.\u7121\u4eba\u6e2c\u8a66<\/a><\/li><li class=\"\"><a href=\"#htoc-2\">2.\u4eba\u9ad4\u6e2c\u8a66<\/a><\/li><\/ul><\/li><li class=\"\"><a href=\"#htoc-11111\">\u7d50\u8ad6<\/a><\/li><\/ul><\/div><\/div>\n\n\n\n<p>\u6211\u7684ESP32\u5be6\u505a\u66f8\u7c4d\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/10\/esp32_ch1-2\/\" target=\"_blank\">\u6211\u51fa\u66f8\u4e86 ESP32 \u7269\u806f\u7db2\u5c08\u984c<\/a><br>\u535a\u5ba2\u4f86\u7db2\u5740\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.books.com.tw\/products\/0010901195\" target=\"_blank\">https:\/\/www.books.com.tw\/products\/0010901195<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-\">\u5be6\u505a\u8aaa\u660e<\/h2>\n\n\n\n<p>\u524d\u5148\u65e5\u5b50Google\u5ba3\u5e03Tensorflow\u5c07\u51fa\u4e00\u7248Tensorflow Micro\u7248\uff0c\u6bd4Tensorflow Lite\u66f4\u5c0f\u8981\u652f\u63f4arduino\u7cfb\u7d71\uff0c\u5c24\u5176\u6a19\u660e\u8981\u7d66esp32\u7cfb\u5217\uff0c\u8b93\u4eba\u975e\u5e38\u9a5a\u5947\uff0c\u5927\u5bb6\u4e00\u958b\u59cb\u5728PC\u4e0a\u8dd1python tensorflow\uff0c\u5f8c\u4f86\u5728\u6a39\u8393\u6d3e\u3001Jetson nano\u4e0a\u8dd1Keras Tensorflow\uff0c\u6c92\u60f3\u5230\u73fe\u5728\u7adf\u7136\u53ef\u4ee5\u5728ESP32\u4e0a\u9762\u8dd1Tensorflow\u3002<\/p>\n\n\n\n<p>\u96d6\u7136\u807d\u5230\u9019\u6a23\u7684\u6d88\u606f\uff0c\u4f46\u4e5f\u6c92\u6642\u9593\u53bb\u7814\u7a76\uff0c\u76f4\u5230\u67d0\u5929ESP32\u611b\u73a9\u7684\u7248\u53cb\u8a62\u554fesp32cam\u8981\u600e\u9ebc\u8f09\u5165Tensorflow\u6a21\u578b\uff0c\u6211\u624d\u77e5\u9053Arduino\u7a0b\u5f0f\u5eab\u7adf\u7136\u5df2\u7d93\u6709\u7bc4\u4f8b\u4e86\uff0c\u5728\u9019\u88e1\u5c31\u5148\u6e2c\u8a66ESP32CAM\u7684\u4eba\u9ad4\u5075\u6e2c\u7bc4\u4f8b\u3002<br>\u5148\u653e\u4e00\u5f35\u6211\u7684\u8f2a\u5ed3\u5716<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429204-721580350-g_n.png?resize=840%2C978&#038;ssl=1\" alt=\"\" width=\"840\" height=\"978\"\/><figcaption class=\"wp-element-caption\">ESP32CAM\u7684\u4eba\u9ad4\u5075\u6e2c\u8f2a\u5ed3\u5716<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-1\">\u4e00\u3001\u6e96\u5099\u88dd\u7f6e<\/h2>\n\n\n\n<p>\u9996\u5148\u4f60\u8981\u6709\u4e00\u7d44ESP32CAM\u4ee5\u53ca\u4e00\u689dCP2102\u4e0b\u8f09\u7dda\uff0c\u6216\u8005ESP32CAM CH340\u63a5\u53e3\u52a0\u4e00\u689dUSB\u7dda\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-arduino\">\u4e8c\u3001Arduino\u74b0\u5883\u8a2d\u5b9a<\/h2>\n\n\n\n<p>\u74b0\u5883\u8a2d\u5b9a\u53ef\u4ee5\u53c3\u8003\u672c\u7bc7\uff1a<a href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/03\/esp32_ch2\/\">ESP32-CAM (arduino)\u5f71\u50cf\u4f3a\u670d\u5668\u53ca\u81c9\u90e8\u8fa8\u8b58\u6559\u5b78<\/a><a href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/03\/esp32_ch2\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u539f\u59cb<\/a><a href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/03\/esp32_ch2\/\">\u6a94Video Stream Server<\/a>\uff0c\u6700\u597d\u5148\u5229\u7528 ESP32\/Camera\/CameraWebServer \u6e2c\u8a66\uff0c\u78ba\u8a8d\u6676\u7247\u53ca\u93e1\u982d\u904b\u4f5c\u6b63\u5e38\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-arduino-ide-tensorflow-lite\">\u4e09\u3001Arduino IDE\u5b89\u88ddTensorflow Lite\u7a0b\u5f0f\u5eab<\/h2>\n\n\n\n<p>\u529f\u80fd\u8868\/\u7a0b\u5f0f\u5eab\/\u7ba1\u7406\u7a0b\u5f0f\u5eab\uff0c\u958b\u555f\u7a0b\u5f0f\u5eab\u7ba1\u7406\u54e1<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604428173-1403364072-g_n.png?resize=841%2C576&#038;ssl=1\" alt=\"\" width=\"841\" height=\"576\"\/><figcaption class=\"wp-element-caption\">\u641c\u5c0bTensorflow\u7a0b\u5f0f\u5eab<\/figcaption><\/figure>\n\n\n\n<p>\u8f38\u5165\u95dc\u9375\u5b57\uff1aTensorflow\uff0c\u627e\u5230\u540d\u7a31\u70baTensorFlowLite_ESP32\u7684\u7a0b\u5f0f\u5eab\uff0c\u4e26\u9ede\u9078\u53f3\u5074\u5b89\u88dd<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-11\">\u56db\u3001\u8f09\u5165\u7bc4\u4f8b\u7a0b\u5f0f<\/h2>\n\n\n\n<p>\u5b8c\u6210\u7a0b\u5f0f\u5eab\u5b89\u88dd\u5f8c\uff0c\u76f4\u63a5\u8f09\u5165TensorFlowLite_ESP32\u7684\u7bc4\u4f8b\u7a0b\u5f0f\uff0c\u4f4d\u7f6e\u5728\u529f\u80fd\u8868\/\u6a94\u6848\/\u7bc4\u4f8b\/\u6700\u4e0b\u65b9\u7b2c\u4e09\u65b9\u7a0b\u5f0f\u5eab\u7684\u7bc4\u4f8b\/TensorFlow_ESP32\/person_detection_ESP32-Camera<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604428410-3952614543-g_n.png?resize=840%2C932&#038;ssl=1\" alt=\"\" width=\"840\" height=\"932\"\/><figcaption class=\"wp-element-caption\">\u8f09\u5165TensorFlowLite_ESP32\u7684\u7bc4\u4f8b\u7a0b\u5f0f<\/figcaption><\/figure>\n\n\n\n<p>\u8f09\u5165\u5f8c\uff0c\u9ede\u9078\u9801\u7c3dconfig.h\uff0c\u5c07\u7b2c12\u884c\u7684#define CONFIG_CAMERA_MODEL_AI_THINKER 1\u524d\u65b9\u8a3b\u89e3\u522a\u9664\uff0c\u82e5\u60a8\u4f7f\u7528\u5225\u7a2e\u88dd\u7f6e\uff0c\u8acb\u81ea\u884c\u9078\u64c7\u578b\u865f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604428448-3462008955-g_n.png?resize=842%2C713&#038;ssl=1\" alt=\"\" width=\"842\" height=\"713\"\/><figcaption class=\"wp-element-caption\">\u5c07\u7b2c12\u884c\u7684#\u8a3b\u89e3\u522a\u9664<\/figcaption><\/figure>\n\n\n\n<p>\u5b8c\u6210\u4e0a\u8ff0\u52d5\u4f5c\u5f8c\uff0c\u9ede\u9078\u4e0a\u50b3\u7a0b\u5f0f\u78bc<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-111\">\u4e94\u3001\u4eba\u9ad4\u5075\u6e2c\u7d50\u679c<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"htoc-1111\">1.\u7121\u4eba\u6e2c\u8a66<\/h3>\n\n\n\n<p>\u6211\u5148\u7167\u8457\u96fb\u8166\u87a2\u5e55\u770b\u770b\uff0c\u5206\u6578\u770b\u5f97\u51fa\u4f86\uff0c\u662f\u6c92\u4eba\u5f97\u5206\u6bd4\u8f03\u591a\uff0c\u4e2d\u9593\u4e00\u5708\u5713\u5713\u7684\u61c9\u8a72\u662f\u5f88\u4eae\u7684\u87a2\u5e55<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429066-469631717-g_n.png?resize=838%2C992&#038;ssl=1\" alt=\"\" width=\"838\" height=\"992\"\/><figcaption class=\"wp-element-caption\">\u7167\u8457\u96fb\u8166\u87a2\u5e55\uff0c\u986f\u793a\u7121\u4eba<\/figcaption><\/figure>\n\n\n\n<p>\u628a\u87a2\u5e55\u958b\u4e00\u500b\u7a7a\u767d\u7684\u8a18\u4e8b\u672c\uff0c\u4e26\u653e\u5728\u87a2\u5e55\u4e0a\u534a\u90e8\uff0c\u53ef\u4ee5\u770b\u5230\u7d50\u679c<\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429345-1415038442-g_n.png?resize=455%2C341&#038;ssl=1\" alt=\"\" width=\"455\" height=\"341\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429369-2019258413-g_n.png?w=1290&#038;ssl=1\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n\n<p>\u628a\u8a18\u4e8b\u672c\u653e\u5230\u4e0b\u534a\u90e8\u6642\u7684\u7d50\u679c<\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429462-4225245187-g_n.png?resize=451%2C334&#038;ssl=1\" alt=\"\" width=\"451\" height=\"334\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429437-920152652-g_n.png?w=1290&#038;ssl=1\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n\n<p>\u5230\u6b64\u770b\u5f97\u51fa\u4f86\uff0c\u4ed6\u662f\u900f\u904eASCII code\u53bb\u7c21\u55ae\u5448\u73fe\u756b\u9762\u7684<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"htoc-2\">2.\u4eba\u9ad4\u6e2c\u8a66<\/h3>\n\n\n\n<p>\u9019\u96bb\u7a0b\u5f0f\u8aaa\u662f\u5075\u6e2c\u4eba\u9ad4\uff0c\u90a3\u5c0d\u8457\u6211\u6703\u51fa\u73fe\u4ec0\u9ebc\u5462\uff1f<br>\u7167\u8457\u81ea\u5df1\u53ef\u4ee5\u5927\u81f4\u770b\u5230\u5927\u53d4\u6211\u5e25\u6c23\u7684\u8f2a\u5ed3\uff0c\u4e0d\u77e5\u9053\u5927\u5bb6\u770b\u5f97\u51fa\u4f86\u55ce\uff1f<br>\u4e5f\u53ef\u4ee5\u770b\u5230Person\u7684Score\u8f03\u9ad8\uff0c\u4ee3\u8868\u6709\u4eba\u7684\u6a5f\u7387\u5f88\u9ad8<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429204-721580350-g_n.png?resize=841%2C980&#038;ssl=1\" alt=\"\" width=\"841\" height=\"980\"\/><figcaption class=\"wp-element-caption\">\u4eba\u9ad4\u6e2c\u8a66\u4e2dPerson\u7684Score\u8f03\u9ad8<\/figcaption><\/figure>\n\n\n\n<p>\u526a\u5200\u77f3\u982d\u5e03\uff0c\u770b\u5f97\u51fa\u4f86\u6211\u6bd4\u4ec0\u9ebc\u55ce\uff1f<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429705-3217130644-g_n.png?resize=840%2C1148&#038;ssl=1\" alt=\"\" width=\"840\" height=\"1148\"\/><figcaption class=\"wp-element-caption\">\u624b\u90e8\u6e2c\u8a66\u7d50\u679c<\/figcaption><\/figure>\n\n\n\n<p>\u6700\u5f8c\u7528\u4e00\u500b\u8b9a\u505a\u7d50\u5c3e<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1604429736-3499540370-g_n.png?resize=840%2C1014&#038;ssl=1\" alt=\"\" width=\"840\" height=\"1014\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-11111\">\u7d50\u8ad6<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>FPS\u5927\u7d041\u5f35\/5\u79d2<\/li>\n\n\n\n<li>\u4eba\u9ad4\u8fa8\u8b58\u6548\u679c\u9084\u7b97\u4e0d\u932f\uff0c\u7576\u7136\u4e0d\u80fd\u50cfYOLO\uff0c\u4e00\u96bb\u624b\u90fd\u53ef\u4ee5\u5224\u65b7\u51fa\u4eba<\/li>\n\n\n\n<li>\u6a5f\u8eab\u4e0d\u6703\u767c\u71d9<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u5148\u65e5\u5b50Google\u5ba3\u5e03Tensorflow\u5c07\u51fa\u4e00\u7248Tensorflow Micro\u7248\uff0c\u6bd4Tensorflow [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1,26],"tags":[],"class_list":["post-721","post","type-post","status-publish","format-standard","hentry","category-esp32","category-esp32cam"],"blocksy_meta":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/comments?post=721"}],"version-history":[{"count":1,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":722,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/721\/revisions\/722"}],"wp:attachment":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/media?parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/categories?post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/tags?post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}