{"id":17936,"date":"2022-12-05T10:00:00","date_gmt":"2022-12-05T02:00:00","guid":{"rendered":"https:\/\/www.circuspi.com\/?p=17936"},"modified":"2022-12-05T08:45:49","modified_gmt":"2022-12-05T00:45:49","slug":"jetson-nano-dli-hello-camera","status":"publish","type":"post","link":"https:\/\/www.circuspi.com\/index.php\/2022\/12\/05\/jetson-nano-dli-hello-camera\/","title":{"rendered":"Jetson Nano DLI \u6559\u5b78(\u4e00)\uff1a\u74b0\u5883\u6e96\u5099\u8207 Hello Camera"},"content":{"rendered":"\n<p><style>\n\/* ###\u5be6\u9a57\u4e0b\u4e00\u5217### *\/\n\na:link {color:#0695e4\n;}    \/* \u8a2d\u5b9a\u5c1a\u672a\u9ede\u95b1\u904e\u7684\u9023\u7d50\u6a23\u5f0f *\/\na:visited {color:#0695e4\n;} \/* \u8a2d\u5b9a\u904e\u53bb\u66fe\u7d93\u95b1\u904e\u7684\u9023\u7d50 *\/\na:hover {color:#0695e4\n;}   \/* \u8a2d\u5b9a\u6ed1\u9f20\u6e38\u6a19\u6307\u5728\u9023\u7d50\u4f4d\u7f6e\u4e0a\u7684\u6a23\u5f0f *\/\na:active {color:#0000BB;}  \/* \u8a2d\u5b9a\u4e0a\u9ede\u64ca\u904e\u7684\u9023\u7d50\u6a23\u5f0f *\/\n<\/style><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"527\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/12\/JetsonNano_DLICH1_L.jpg\" alt=\"Jetson Nano DLI \u6559\u5b78(\u4e00)\uff1a\u74b0\u5883\u6e96\u5099\u8207 Hello Camera\" class=\"wp-image-18009\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.nvidia.com\/zh-tw\/\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA<\/a> \u7dda\u4e0a\u5b78\u7fd2\u8cc7\u6e90 <a href=\"https:\/\/www.nvidia.com\/zh-tw\/training\/\" target=\"_blank\" rel=\"noreferrer noopener\">DLI (Deep Learning Institute)<\/a> \u6709\u500b\u975e\u5e38\u5be6\u7528\u7684\u5165\u9580\u8ab2\u7a0b\uff0d<a href=\"https:\/\/courses.nvidia.com\/courses\/course-v1:DLI+S-RX-02+V2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with AI on Jetson Nano<\/a> \uff0c\u5728\u9019\u514d\u8cbb\u8ab2\u7a0b\u4e2d\u5c07\u4f7f\u7528 <a href=\"https:\/\/jupyter.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">JupyterLab<\/a> \u4ecb\u9762\u5feb\u901f\u9032\u5165 Edge AI \u9818\u57df\uff0c\u5b8c\u6210\u8ab2\u7a0b\u9084\u53ef\u7372\u5f97 NVIDIA \u7dda\u4e0a\u8ab2\u7a0b\u8b49\u66f8\u5594\uff01\u672c\u7bc7\u6587\u7ae0\u5c07\u505a\u7b2c\u4e00\u90e8\u5206\u7684\u5165\u9580\u4ecb\u7d39\u4ee5\u53ca\u907f\u5751\u6307\u5f15\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8a9949ab-555f-4245-8e32-a94c5ddfeddd%2FUntitled.png?table=block&amp;id=4368369f-f2de-436b-adc1-b19aef676db7&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=2000&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"813\" height=\"338\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u4e8b\u5148\u6e96\u5099<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Camera<\/h3>\n\n\n\n<p>\u958b\u59cb\u4e4b\u524d\u9700\u8981\u5148\u6e96\u5099\u4e00\u500b Camera\uff0c\u904e\u7a0b\u6703\u505a Camera \u64f7\u53d6\u5373\u6642\u5f71\u50cf\u505a\u70ba\u8a13\u7df4\u8207\u63a8\u8ad6\u7528\u3002Camera \u53ef\u4ee5\u4f7f\u7528 CSI \u4ecb\u9762\u7684 <a href=\"https:\/\/www.icshop.com.tw\/product-page.php?24894\" target=\"_blank\" rel=\"noreferrer noopener\">IMX-219 \u6a39\u8393\u6d3e Camera V2<\/a> \u6216\u662f USB \u4ecb\u9762\u7684<a href=\"https:\/\/www.icshop.com.tw\/product-page.php?27390\" target=\"_blank\" rel=\"noreferrer noopener\">\u7f85\u6280 C270<\/a> Webcam\u3002\u9019\u908a\u63a8\u85a6\u4f7f\u7528 C270\uff0c\u56e0\u70ba USB \u4ecb\u9762\u63d2\u62d4\u6bd4\u8f03\u4e0d\u6703\u6709\u554f\u984c\uff0cCSI \u4ecb\u9762\u5c0d\u786c\u9ad4\u65b0\u624b\u8f03\u4e0d\u53cb\u5584\uff0c\u4e0d\u5c0f\u5fc3\u53ef\u80fd\u5c31\u6703\u63a5\u89f8\u4e0d\u826f\u751a\u81f3\u9020\u6210\u786c\u9ad4\u640d\u6bc0\u3002\u800c USB Webcam \u53ea\u8981\u662f\u6a19\u6e96 UVC(USB video class) \u4ecb\u9762\u5728 Linux \u6709\u9a45\u52d5\u7684\u88dd\u7f6e\u7686\u53ef\u4f7f\u7528\uff0c\u5404\u4f4d\u624b\u4e0a\u4e5f\u53ef\u4ee5\u5c07\u65e2\u6709\u7684 UVC Webcam \u62ff\u4f86\u4f7f\u7528\uff0c\u6c92\u6709\u7684\u8a71\u63a8\u85a6 C270 \u6bd4\u8f03\u4e0d\u6703\u6709\u554f\u984c\uff0c\u50f9\u9322\u4e5f\u53ef\u4ee5\u63a5\u53d7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u8a3b\u518a\u8ab2\u7a0b<\/h3>\n\n\n\n<p>\u8a3b\u518a <a href=\"https:\/\/courses.nvidia.com\/courses\/course-v1:DLI+S-RX-02+V2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with AI on Jetson Nano \u8ab2\u7a0b<\/a>\u4e26\u975e\u5fc5\u8981\uff0c\u56e0\u70ba\u53ea\u8981\u555f\u52d5 Docker \u5bb9\u5668\u5c31\u53ef\u4ee5\u81ea\u884c\u5728 JupyterLab \u9032\u884c\u64cd\u4f5c\u3002\u4f46\u662f\u5b8c\u6210\u8ab2\u7a0b\u53ef\u4ee5\u63db\u4e00\u5f35\u96fb\u5b50\u8b49\u66f8\u4f86\u6eff\u8db3\u81ea\u5df1\u7684\u865b\u69ae\u5fc3\uff0c\u597d\u50cf\u883b\u503c\u5f97\u7684d(`\uff65\u2200\uff65)b\uff01\u524d\u5f80<a href=\"https:\/\/courses.nvidia.com\/courses\/course-v1:DLI+S-RX-02+V2\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u8ab2\u7a0b\u9801<\/a>\u9032\u884c\u8a3b\u518a\uff0c\u88e1\u9762\u4e5f\u6709\u5b98\u65b9\u6559\u5b78\u53ef\u4ee5\u53c3\u8003\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u5b89\u88dd\u8207\u555f\u52d5 Docker\uff08\u26a0\ufe0f\u524d\u65b9\u6709\u5751\uff0c\u8acb\u6ce8\u610f\uff01\uff09<\/h2>\n\n\n\n<p>\u5728\u73fe\u884c\u7248\u672c\u6c92\u8fa6\u6cd5\u50cf DLI \u8ab2\u7a0b\u4e2d\u53ef\u4ee5\u76f4\u63a5\u555f\u52d5 Docker image\uff0c\u6703\u767c\u751f\u932f\u8aa4\uff0c\u5fc5\u9808\u5b89\u88dd\u5c0d\u61c9\u7684\u5957\u4ef6\u4e26\u4e14\u53c3\u8003 <a href=\"https:\/\/forums.developer.nvidia.com\/t\/docker-isnt-working-after-apt-upgrade\/195213\/6\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA \u8ad6\u58c7\u8a0e\u8ad6\u4e32<\/a>\u4f86\u9032\u884c\u89e3\u6c7a\u3002\u9019\u908a\u5df2\u6574\u7406\u70ba\u4ee5\u4e0b\u6d41\u7a0b\uff1a<\/p>\n\n\n\n<p>1. \u5b89\u88dd\u5c0d\u61c9\u5957\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo apt-get install<\/span> nvidia-container-toolkit nvidia-container-runtime nvidia-container-csv-*<\/code><\/pre>\n\n\n\n<p>2. \u91cd\u65b0\u5b89\u88dd\u6307\u5b9a\u7248\u672c docker<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">wget<\/span> https:\/\/launchpad.net\/ubuntu\/+source\/docker.io\/20.10.2-0ubuntu1~18.04.2\/+build\/21335731\/+files\/docker.io_20.10.2-0ubuntu1~18.04.2_arm64.deb\n<span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo<\/span> dpkg -i docker.io_20.10.2-0ubuntu1~18.04.2_arm64.deb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">rm<\/span> docker.io_20.10.2-0ubuntu1~18.04.2_arm64.deb\n<span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo apt-get install<\/span> containerd <\/code><\/pre>\n\n\n\n<p>3. \u5efa\u7acb package \u5c0d\u61c9\u7248\u672c\u6587\u4ef6\uff0c\u4f7f\u7528\u5716\u5f62\u4ecb\u9762\u7684\u6587\u5b57\u7de8\u8f2f\u5668 gedit \u7de8\u8f2f\u3002\u82e5\u719f\u6089 vi \u6216\u662f nano \u7d42\u7aef\u6a5f\u7684\u6587\u5b57\u7de8\u8f2f\u5668\u53ef\u4ee5\u81ea\u884c\u8abf\u6574\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo<\/span> gedit \/etc\/apt\/preferences<\/code><\/pre>\n\n\n\n<p>4. \u586b\u5165\u4ee5\u4e0b\u5167\u5bb9\u4e26\u5b58\u6a94<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Package: docker.io\nPin: version <span style=\"color:#cf2e2e\" class=\"tadv-color\">20.10<\/span>.2*\nPin-Priority: <span style=\"color:#cf2e2e\" class=\"tadv-color\">1001<\/span>\n\nPackage: containerd\nPin: version <span style=\"color:#cf2e2e\" class=\"tadv-color\">1.5<\/span>.2*\nPin-Priority: <span style=\"color:#cf2e2e\" class=\"tadv-color\">1001<\/span><\/code><\/pre>\n\n\n\n<p>5. \u91cd\u65b0\u555f\u52d5\u7cfb\u7d71<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo reboot<\/span><\/code><\/pre>\n\n\n\n<p>6. \u5efa\u7acb\u8cc7\u6599\u5b58\u653e\u76ee\u9304<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">mkdir<\/span> -p ~\/nvdli-data<\/code><\/pre>\n\n\n\n<p>7. \u57f7\u884c\u555f\u52d5 docker\uff0c\u7b2c\u4e00\u6b21\u57f7\u884c\u6703\u5230 <a href=\"https:\/\/catalog.ngc.nvidia.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">NVDIA NGC<\/a> \u4e0b\u8f09 DLI Getting Started with AI on Jetson Nano \u7684\u8ab2\u7a0b <a href=\"https:\/\/catalog.ngc.nvidia.com\/orgs\/nvidia\/teams\/dli\/containers\/dli-nano-ai\" target=\"_blank\" rel=\"noreferrer noopener\">docker image<\/a>\uff0c\u4e26\u4e14\u555f\u52d5\u3002\u5176\u4e2d\u6700\u5f8c\u4e00\u6bb5\u7684 <strong>v2.0.1-r32.6.1tw<\/strong> \u6307\u7684\u662f\u7248\u672c\u4ee5\u53ca ipynb \u7b46\u8a18\u672c\u4e2d\u7684\u8aaa\u660e\u8a9e\u8a00\uff0c\u6211\u5011\u8981\u6307\u5b9a Jetpack 4.6 \u7248\u672c\u524d\u8f1f <strong>v2.0.1-r32.6.1<\/strong> \u52a0\u4e0a <strong>tw<\/strong> \u662f\u7e41\u9ad4\u4e2d\u6587\u8aaa\u660e\u3002\u82e5\u8981\u95b1\u8b80\u82f1\u6587\u7684\u5167\u5bb9\u5247\u662f\u628a\u6700\u5f8c\u7684 <strong>tw<\/strong> \u522a\u53bb\u3002\u5b8c\u6574 image tag \u53ef\u53c3\u95b1<a href=\"https:\/\/catalog.ngc.nvidia.com\/orgs\/nvidia\/teams\/dli\/containers\/dli-nano-ai\" target=\"_blank\" rel=\"noreferrer noopener\">\u8aaa\u660e\u9801<\/a>\u3002\u6ce8\u610f Jetpack 4.6 \u8207 4.6.1 \u5169\u500b\u7248\u672c\u6240\u5c0d\u61c9\u7684 docker image \u6709\u6240\u4e0d\u540c\uff0c\u8f38\u5165\u524d\u52d9\u5fc5\u518d\u6b21\u78ba\u8a8d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo docker<\/span> run --runtime nvidia -it --rm --network <span style=\"color:#cf2e2e\" class=\"tadv-color\">host<\/span> \\\n     --volume ~\/nvdli-data:\/nvdli-nano\/data \\\n     --device \/dev\/video0 \\\n     nvcr.io\/nvidia\/dli\/dli-nano-ai:v2.0.1-r32.6.1tw<\/code><\/pre>\n\n\n\n<p>8. \u6b64\u5916\uff0c\u5982\u679c\u958b\u767c\u8005\u662f\u4f7f\u7528 CSI Camera\uff0c\u9700\u8981\u984d\u5916\u52a0\u4e00\u500b voulme \u53c3\u6578\uff0c\u5b8c\u6574\u6307\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color:#cf2e2e\" class=\"tadv-color\">sudo docker<\/span> run --runtime nvidia -it --rm --network <span style=\"color:#cf2e2e\" class=\"tadv-color\">host<\/span> \\\n --volume ~\/nvdli-data:\/nvdli-nano\/data \\\n --volume \/tmp\/argus_socket:\/tmp\/argus_socket \\\n --device \/dev\/video0 \\\n nvcr.io\/nvidia\/dli\/dli-nano-ai:v2.0.1-r32.6.1tw<\/code><\/pre>\n\n\n\n<p>9. \u4e0b\u8f09 image \u9032\u5ea6\u986f\u793a\u5982\u4e0b\u5716\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Faed71a71-056b-4f83-bea4-5a2077e3adde%2FUntitled.png?table=block&amp;id=373e2089-45eb-482a-a0b6-2015e563ce26&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"836\" height=\"700\"\/><\/figure><\/div>\n\n\n\n<p>10. \u555f\u52d5\u5b8c\u6210\u5c31\u6703\u770b\u5230\u4ee5\u4e0b\u63d0\u793a\u8a0a\u606f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffdf11d6f-fe29-466a-a8cf-8d7b9e05a0d0%2FUntitled.png?table=block&amp;id=97d1cc66-065a-4f6f-9fd5-03bbc0f43fd0&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"814\" height=\"236\"\/><\/figure><\/div>\n\n\n\n<p>11. \u9019\u6642\u6211\u5011\u5c31\u53ef\u4ee5\u5230\u76f8\u540c\u5340\u57df\u7db2\u8def\u5167\u7684\u4efb\u4f55\u4e00\u53f0\u96fb\u8166\uff0c\u5728\u700f\u89bd\u5668\u8f38\u5165 Jetson Nano \u7684 IP \u4f4d\u7f6e\uff0c\u4e26\u6307\u5b9a\u57e0\u865f 8888\uff0c\u5c31\u6703\u770b\u5230 JupyterLab \u767b\u5165\u756b\u9762\uff0c\u8f38\u5165\u9810\u8a2d\u5bc6\u78bc <em>dlinano<\/em> \u5373\u53ef\u5b8c\u6210\u767b\u5165\uff01\u7b46\u8005\u5efa\u8b70\u53ef\u4ee5\u5728 PC \u4e0a\u64cd\u4f5c JupyerLab \u6703\u6bd4\u8f03\u9806\u66a2\uff0c\u82e5\u771f\u4e0d\u5f97\u5df2\u624d\u5728 Jetson Nano \u7684\u700f\u89bd\u5668\u64cd\u4f5c\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F2e10e937-14f8-4ebb-90ff-9d78cb874a07%2FUntitled.png?table=block&amp;id=ba767936-dea2-48cc-937d-e30c05c300cc&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"780\" height=\"341\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u5abd\uff01\u6211\u4e0a\u96fb\u8996\u5566\uff01\uff1f<\/h2>\n\n\n\n<p>\u767b\u5165\u5f8c\u5c31\u6703\u770b\u5230\u6a19\u6e96\u7684 JupyterLab \u4ecb\u9762\uff0c\u9019\u90e8\u5206\u7684\u64cd\u4f5c\u6211\u5011\u5c31\u4e0d\u8d05\u8ff0\u4e86\uff0c\u82e5\u6c92\u6709\u4f7f\u7528\u904e\u53ef\u81ea\u884c\u6478\u7d22\u6216\u662f\u4e0a\u7db2\u627e\u76f8\u95dc\u8cc7\u6599\u61c9\u8a72\u662f\u76f8\u7576\u8c50\u5bcc\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F65eeb962-c77f-480b-99bd-3b72a9eafa52%2FUntitled.png?table=block&amp;id=0fb809f6-d206-43de-9d25-29862f12682a&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"831\" height=\"429\"\/><\/figure><\/div>\n\n\n\n<p>\u5de6\u5074\u6b04\u4f4d\u7684\u76ee\u9304\u7d50\u69cb\u53ef\u4ee5\u770b\u5230\u5e7e\u500b\u76ee\u9304\uff1a<\/p>\n\n\n\n<ul><li><strong>classification<\/strong> &#8211; \u5f71\u50cf\u5206\u985e\u7684 ipynb \u7b46\u8a18\u672c<\/li><li><strong>data<\/strong> &#8211; \u5b58\u653e\u64f7\u53d6\u7684\u5f71\u50cf\u8cc7\u6599<\/li><li><strong>hello_camera<\/strong> &#8211; Camera \u6e2c\u8a66\u7528\u7684 ipynb \u7b46\u8a18\u672c<\/li><li><strong>regression<\/strong> &#8211; \u5f71\u50cf\u8cc7\u6599\u56de\u6b78\u7684 ipynb \u7b46\u8a18\u672c<\/li><\/ul>\n\n\n\n<p>\u9ede\u9032\u53bb hello_camera \u76ee\u9304\uff0c\u6709\u5b58\u653e\u5169\u500b\u6a94\u6848\uff0d<strong>csi_camera.ipynb<\/strong> \u8207 <strong>usb_camera.ipynb<\/strong>\u3002\u4f9d\u64da\u6211\u5011\u63a5\u4e0a\u7684 Camera \u662f CSI \u754c\u9762\u6216\u662f USB \u754c\u9762\u4f86\u505a\u9078\u64c7\uff0c\u7b46\u8005\u9019\u908a\u5c31\u9078\u64c7\u958b\u555f <strong>usb_camera.ipynb<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8d78a405-3277-4556-8ef6-bc31d48ecdf8%2FUntitled.png?table=block&amp;id=142faec5-b19b-49b8-8856-6148fc43faf7&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"\" width=\"945\" height=\"476\"\/><\/figure><\/div>\n\n\n\n<p>\u958b\u555f\u5f8c\u6703\u5230\u53ef\u611b\u7684\u7e41\u9ad4\u4e2d\u6587\u8aaa\u660e\u4ee5\u53ca\u5c0d\u61c9\u7684\u7a0b\u5f0f\u78bc\uff0c\u4f9d\u5e8f\u57f7\u884c\u5404\u500b\u7a0b\u5f0f\u78bc cell\uff0c\u57f7\u884c\u5230\u4e0b\u65b9\u9019\u4e00\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>camera.running = True\n\ndef update_image(change):\n    image = change&#91;<span style=\"color:#00d084\" class=\"tadv-color\">'new'<\/span>]\n    image_widget.value = bgr8_to_jpeg(image)\n    \ncamera.observe(update_image, <span style=\"color:#fcb900\" class=\"tadv-color\">names<\/span>='<span style=\"color:#00d084\" class=\"tadv-color\">value<\/span>')<\/code><\/pre>\n\n\n\n<p>\u5c31\u6703\u770b\u5230 ipynb \u4e0a\u6240\u5efa\u7acb\u7684 camera widget \u6703\u5c07 camera \u4e32\u6d41\u5373\u6642\u986f\u793a\u5728\u756b\u9762\u4e0a\uff0c\u5c31\u4ee3\u8868\u8a2d\u5099\u5df2\u7d93\u6e96\u5099\u5c31\u7dd2\u56c9\uff01\u56e0\u70ba\u7a0b\u5f0f\u78bc\u90fd\u6709\u4e2d\u6587\u7684\u8aaa\u660e\u5167\u6587\uff0c\u7b46\u8005\u5c31\u4e0d\u518d\u984d\u5916\u8d05\u8ff0\u4e86\uff0c\u91dd\u5c0d\u5e7e\u9ede\u91cd\u9ede\u505a\u88dc\u5145\uff1a<\/p>\n\n\n\n<ul><li>\u7576\u6709\u591a\u500b camera \u88dd\u7f6e\u7684\u8a71\uff0c\u52d9\u5fc5\u6307\u5b9a\u5230\u6b63\u78ba\u7684\u88dd\u7f6e\u540d\u7a31\u3002<\/li><li>\u986f\u793a\u7684\u5f71\u50cf\u6703\u9019\u9ebc\u5c0f\u800c\u4e14\u8b8a\u5f62\u7684\u539f\u56e0\u662f\u5df2\u7d93\u88ab\u58d3\u7e2e\u6210 224&#215;224 \u50cf\u7d20\u4e86\uff0c\u9019\u662f\u56e0\u70ba\u5f8c\u9762\u8981\u4f7f\u7528\u7684\u6df1\u5ea6\u5b78\u7fd2\u6a21\u578b shape \u5c31\u662f 224&#215;224 RGB\uff0c\u7576\u7136\u4f60\u4e5f\u53ef\u4ee5\u81ea\u884c\u4fee\u6539\u53c3\u6578\u73a9\u73a9\u770b\u3002<\/li><li>\u95dc\u9589 ipynb \u524d\u52d9\u5fc5\u4f9d\u5b9a\u8981\u91cb\u653e camera \u786c\u9ad4\u8cc7\u6e90\uff0c\u5426\u5247\u53ef\u80fd\u6703\u9020\u6210\u7cfb\u7d71\u8cc7\u6e90\u5361\u6b7b\uff0c camera \u7121\u6cd5\u518d\u88ab\u5225\u8655\u7684\u7a0b\u5f0f\u78bc\u4f7f\u7528\uff0c\u5fc5\u9808\u91cd\u65b0\u555f\u52d5\u624d\u80fd\u5fa9\u539f\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/massive-danthus-1c2.notion.site\/image\/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F016da482-056c-409a-aa1a-9d66171f9161%2FUntitled.png?table=block&amp;id=f665568d-acde-4295-a6e4-a056e0f20392&amp;spaceId=b4fd4f91-6283-40d5-bc09-2016e5fc107b&amp;width=1890&amp;userId=&amp;cache=v2\" alt=\"Getting Started with AI on Jetson Nano (\u4e00)\uff1a \u74b0\u5883\u6e96\u5099\u8207 hello Camera\" width=\"949\" height=\"585\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u5c0f\u7d50<\/h2>\n\n\n\n<p>\u9019\u500b DLI \u8ab2\u7a0b\u4e0d\u65b7\u7684\u5728\u9032\u5316\uff0c\u6700\u65e9\u5728 <a href=\"https:\/\/www.icshop.com.tw\/product-page.php?27812\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA Jetson Nano Developer Kit<\/a> \u4e0a\u53ea\u8981\u71d2\u9304\u5b8c\u63d0\u4f9b\u7684 image \u5230 SD \u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\uff0c\u5f8c\u4f86\u5247\u662f\u6539\u7528 docker \u7684\u65b9\u5f0f\u4f86\u555f\u52d5 JupyterLab\uff0c\u4e26\u4e14\u9084\u589e\u52a0\u4e86\u591a\u570b\u8a9e\u8a00\u7684\u8aaa\u660e\uff0c\u771f\u662f\u975e\u5e38\u4fbf\u5229\u3002\u4f46\u7b46\u8005\u5728\u6e2c\u8a66\u6642\u767c\u73fe\u65b0\u7248 Docker \u5957\u4ef6\u6709\u76f8\u5bb9\u6027\u554f\u984c\uff0c\u597d\u5728\u7db2\u8def\u4e0a\u5df2\u7d93\u6709\u4eba\u63d0\u4f9b\u89e3\u6cd5\uff0c\u53ea\u8981\u6309\u7167\u4e0a\u8ff0\u5167\u5bb9\u64cd\u4f5c\u5c31\u6c92\u554f\u984c\u4e86\u3002\u63a5\u4e0b\u4f86\u5c31\u53ef\u4ee5\u958b\u59cb\u505a AI \u5f71\u50cf\u5206\u985e\u56c9\uff01\u4e0b\u7bc7\u6587\u7ae0\u898b\uff5e(\u309d\u2200\uff65)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NVIDIA \u7dda\u4e0a\u5b78\u7fd2\u8cc7\u6e90 DLI (Deep Learning Institute) \u6709\u500b\u975e\u5e38\u5be6\u7528\u7684\u5165\u9580\u8ab2\u7a0b\uff0dGetting Started with AI on Jetson Nano\uff0c\u8ab2\u7a0b\u5c07\u4f7f\u7528 JupyterLab \u4ecb\u9762\u5feb\u901f\u9032\u5165 Edge AI \u9818\u57df\uff0c\u5b8c\u6210\u8ab2\u7a0b\u9084\u53ef\u7372\u5f97\u7dda\u4e0a\u8ab2\u7a0b\u8b49\u66f8\uff0c\u672c\u6587\u5c07\u505a\u7b2c\u4e00\u90e8\u5206\u7684\u5165\u9580\u4ecb\u7d39\u4ee5\u53ca\u907f\u5751\u6307\u5f15\u3002<\/p>\n","protected":false},"author":1,"featured_media":18010,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101,238],"tags":[],"table_tags":[],"_links":{"self":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/17936"}],"collection":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/comments?post=17936"}],"version-history":[{"count":20,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/17936\/revisions"}],"predecessor-version":[{"id":18012,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/17936\/revisions\/18012"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/media\/18010"}],"wp:attachment":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=17936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=17936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=17936"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/table_tags?post=17936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}