{"id":341179,"date":"2022-11-13T15:00:12","date_gmt":"2022-11-13T15:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=341179"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=341179","title":{"rendered":"<span>\u0423\u0447\u0438\u043c \u0410\u043b\u0438\u0441\u0443 \u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0410\u043b\u0438\u0441\u0435 (\u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API). <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d08\/922\/2e0\/d089222e085a2706f013ea3e06dc5f53.png\" alt=\"\" title=\"\" width=\"600\" height=\"375\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d08\/922\/2e0\/d089222e085a2706f013ea3e06dc5f53.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c API \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/508106\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. <\/p>\n<p>\u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434), \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u2013 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 <a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430. <\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/flows.nodered.org\/node\/node-red-contrib-yandex-station-management\" rel=\"noopener noreferrer nofollow\">node-red-contrib-yandex-station-management<\/a> \u0434\u043b\u044f Node-Red \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u043d\u0435\u0441\u0435\u0442 \u0410\u043b\u0438\u0441\u0430 (\u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043e\u043b\u043e\u043d\u043a\u0438). \u0415\u0449\u0435 \u0410\u043b\u0438\u0441\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u00ab\u043e\u0442\u0441\u0435\u0431\u044f\u0442\u0438\u043d\u0443\u00bb.<\/p>\n<p>\u0412\u0441\u0435 \u00a0\u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a>. <\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b:<\/summary>\n<div class=\"spoiler__content\">\n<ol>\n<li>\n<p><a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/nodered.org\/\" rel=\"noopener noreferrer nofollow\">Node-Red<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">Python@3.9<\/a> + <a href=\"https:\/\/pypi.org\/project\/opencv-python\/\" rel=\"noopener noreferrer nofollow\">OpenCV@4.5.1<\/a>. + <a href=\"https:\/\/keras.io\/\" rel=\"noopener noreferrer nofollow\">Tensorflow@2.10 Keras<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a><\/p>\n<\/li>\n<li>\n<p>MQTT (<a href=\"https:\/\/mosquitto.org\/\" rel=\"noopener noreferrer nofollow\">mosquitto<\/a>)<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0430:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>Intel NUC core i5 <\/p>\n<\/li>\n<li>\n<p>4GB RAM<\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430 Haswell-ULT Integrated Graphics Controller (\u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0430).<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u0438\u0446 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043c\u0435\u0440\u0430 \u0432\u044b\u0434\u0430\u044e\u0449\u0430\u044f RTSP \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0421 Ubuntu Server 20.04<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u0412 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0430\u0439\u043b <code>docker-compose.yml<\/code> \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Node-Red, MQTT \u0438 PostgreSQL. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 docker-compose \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/450312\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a><strong>. <\/strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f docker. <strong> <\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Tensorflow \u0438 OpenCV \u0432 Ubuntu 20.04 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>sudo apt install python3-venv python3-dev<\/code><\/p>\n<p><code>pip3 install opencv-python@4.5.1 tensorflow@2.10.0<\/code> paho<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Docker:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/sprut.ai\/article\/node-red-poshagovaya-instrukciya-dlya-novichkov-chast-1\" rel=\"noopener noreferrer nofollow\">Node-Red<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/selectel.ru\/blog\/tutorials\/how-to-install-and-use-postgresql-on-ubuntu-20-04\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.8host.com\/blog\/ustanovka-brokera-soobshhenij-mosquitto-v-debian-10\/\" rel=\"noopener noreferrer nofollow\">Mosquitto<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f79\/d34\/412\/f79d344124f76a8cb3cab29a00b43b03.png\" width=\"1198\" height=\"556\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f79\/d34\/412\/f79d344124f76a8cb3cab29a00b43b03.png\"\/><figcaption><\/figcaption><\/figure>\n<ol>\n<li>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <code>alice_has_fun.py<\/code> \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u043b\u0438\u0446\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json;<\/p>\n<\/li>\n<li>\n<p>Node-Red \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043b\u044e\u0434\u0435\u0439 \u0438\u0437 MQTT, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043b\u0438\u0446\u0430  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u0437 \u0411\u0414 \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a \u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, Node-Red \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e. \u0424\u0440\u0430\u0437\u044b \u0434\u043b\u044f \u0410\u043b\u0438\u0441\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0411\u0414 PostgreSQL;<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0432 Node-Red:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6d0\/5f7\/9df\/6d05f79df624649dc9fa26976f912e2c.png\" width=\"979\" height=\"630\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d0\/5f7\/9df\/6d05f79df624649dc9fa26976f912e2c.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435  <code>docker-compose<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u043b\u043e\u043a My Yandex Station \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u043b\u043e\u043a\u0430 Yandex Station:<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a9\/630\/487\/8a9630487c2ef08c87f449e7944c3548.png\" width=\"1003\" height=\"446\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a9\/630\/487\/8a9630487c2ef08c87f449e7944c3548.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0436\u0438\u043c Manual \u0434\u043b\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (\u0438 \u0410\u043b\u0438\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0435\u0439 \u0444\u0440\u0430\u0437\u0443 \u043a\u0430\u043a \u0434\u0435\u043b\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043e\u043d\u0430 \u0437\u0430 \u0432\u0430\u0441 \u043f\u043e\u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f), \u0433\u043e\u043b\u043e\u0441, \u0448\u0435\u043f\u043e\u0442 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u0426\u0435\u043f\u043e\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0431\u043b\u043e\u043a\u0430 <code>alice_fun<\/code>, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u043b\u043e\u043a\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0435, \u0438 \u0410\u043b\u0438\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 Fun \u0431\u0435\u0437 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430. \u0412 \u0431\u043b\u043e\u043a\u0435 <code>rand3<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u043d\u0435 \u0431\u043e\u043b\u0442\u0430\u043b\u0430 \u043d\u043e\u0447\u044c\u044e.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043b\u0430 \u0444\u0440\u0430\u0437\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043b\u0430 \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u044f \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u0434\u043f\u043e\u0442\u043e\u043a <code>Say by case<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/497\/11f\/044\/49711f044808fc7185833e87bf4d0266.png\" width=\"927\" height=\"424\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/497\/11f\/044\/49711f044808fc7185833e87bf4d0266.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043f\u043e\u0442\u043e\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0444\u0440\u0430\u0437 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0410\u043b\u0438\u0441\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e, \u0442\u0430\u043a \u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0438\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0430\u0437 \u0432 \u0411\u0414 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0442\u043e\u043a UI. \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d UI \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u0441\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"https:\/\/github.com\/twocolors\/node-red-dashboard-template\/blob\/main\/alice_v2.json\" rel=\"noopener noreferrer nofollow\">twocolors<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/01e\/0e5\/972\/01e0e597201c5084f29195b92b594475.png\" width=\"1146\" height=\"517\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01e\/0e5\/972\/01e0e597201c5084f29195b92b594475.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446<\/h2>\n<p>\u0412 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 <code>collect_images.py<\/code> \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u0438\u0446 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0445 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e 150-300 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0421\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>python3 collect_images.py -i &lt;source> -n &lt;face_name><\/code><\/p>\n<p>source:<\/p>\n<ul>\n<li>\n<p>0 \u2013 \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0442\u043e\u043a (&#171;rtsp:\/\/192.168.1.86:8554\/unicast&#187;)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430 \u0444\u0430\u0439\u043b\u0430 (&#171;raw\/IMG_2404.MOV&#187;)<\/p>\n<\/li>\n<\/ul>\n<p>face_name: \u0418\u043c\u044f \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043b\u0438\u0446\u0430<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043a\u0430\u043c\u0435\u0440\u043e\u0439, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0438\u0440\u0443\u044f \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043e\u0439, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u043d\u0438 \u0431\u0443\u0434\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043e\u0442\u043e. \u0422\u043e \u0436\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u0430\u0440\u043e\u0439 \u0434\u0440\u0443\u0437\u0435\u0439. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e detected:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/167\/258\/d8c\/167258d8c9450542ff5e40a09aef0fcd.png\" width=\"668\" height=\"329\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/167\/258\/d8c\/167258d8c9450542ff5e40a09aef0fcd.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 <a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a>, \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Keras h5. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u0442\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0432 \u043a\u0430\u043c\u0435\u0440\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e0b\/1fa\/241\/e0b1fa2415326836565d4337f3197ca2.gif\" width=\"752\" height=\"369\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e0b\/1fa\/241\/e0b1fa2415326836565d4337f3197ca2.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 h5 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c <code>labels.txt<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c <code>alice_has_fun.py<\/code>. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>labels.txt<\/code> \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Node-Red, PorstgerSQL \u0438 Mosquitto \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<p><code>docker-compose up -d<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>config.json<\/code> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 config.json:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>{<br \/> \"mqtt_pub\": false,<br \/> \"show_camera\": false,<br \/> \"input_source\": 0,<br \/> \"frame_recognition_rate\": 4,<br \/> \"publish_min_dalay\": 1,<br \/> \"camera_w\": 1080,<br \/> \"camera_h\": 720,<br \/> \"mqtt_broker\": \"127.0.0.1\",<br \/> \"mqtt_port\": 11883,<br \/> \"save_on_detect\": true,<br \/> \"draw_rect\": true,<br \/> \"min_predict_threshold\": 65<br \/> }<\/code><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_pub<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u043b\u0441\u0438 True \u0442\u043e \u0440\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">show_camera<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u043b\u0441\u0438 True \u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e cv2.imshow \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u043e \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">input_source<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0438\u0441\u043b\u043e (0 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430), \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0442\u043e\u043a\u0430 (&#171;rtsp:\/\/192.168.1.86:8554\/unicast&#187;) \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430 (&#171;raw\/IMG_2404.MOV&#187;)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">frame_recognition_rate<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">publish_min_dalay<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u044b\u0445 \u043a\u0430\u0434\u0440\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">camera_w<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0428\u0438\u0440\u0438\u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">camera_h<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0441\u043e\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_broker<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0434\u0440\u0435\u0441 MQTT \u0431\u0440\u043e\u043a\u0435\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_port<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0440\u0442 MQTT \u0431\u0440\u043e\u043a\u0435\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">save_on_detect<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u043a\u0430\u0434\u0440 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e on_detect<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">draw_rect<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043b\u0438\u0446\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">min_predict_threshold<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043b\u0438\u0446\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440. \u0415\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0447\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 4 \u043a\u0430\u0434\u0440\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f 1 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u0432\u0448\u0438\u0445 \u043f\u043e\u0440\u043e\u0433.<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<p><code>python3 alice_has_fun.py<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435:<\/p>\n<p><code>1\/1 [==============================] - 0s 44ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 48ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 45ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 42ms\/step<\/code><\/p>\n<p><code>Creating Images..........\/on_detect\/2022-11-13\/2022-11-13_13_59_59.jpg<\/code><\/p>\n<p><code>Send {\"\u0411\u044d\u043c\": 71.39} to topic for_alice\/peoples<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 45ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 48ms\/step<\/code><\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6370eaf80ca3379afa72700a\" data-style=\"\" id=\"6370eaf80ca3379afa72700a\" width=\"\"><\/div>\n<p><a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/a><\/p>\n<p><strong>P.S.<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e &#8212; \u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446 \u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/699060\/\"> https:\/\/habr.com\/ru\/post\/699060\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0410\u043b\u0438\u0441\u0435 (\u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API). <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c API \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/508106\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. <\/p>\n<p>\u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434), \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u2013 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 <a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430. <\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/flows.nodered.org\/node\/node-red-contrib-yandex-station-management\" rel=\"noopener noreferrer nofollow\">node-red-contrib-yandex-station-management<\/a> \u0434\u043b\u044f Node-Red \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u043d\u0435\u0441\u0435\u0442 \u0410\u043b\u0438\u0441\u0430 (\u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043e\u043b\u043e\u043d\u043a\u0438). \u0415\u0449\u0435 \u0410\u043b\u0438\u0441\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u00ab\u043e\u0442\u0441\u0435\u0431\u044f\u0442\u0438\u043d\u0443\u00bb.<\/p>\n<p>\u0412\u0441\u0435 \u00a0\u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a>. <\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b:<\/summary>\n<div class=\"spoiler__content\">\n<ol>\n<li>\n<p><a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/nodered.org\/\" rel=\"noopener noreferrer nofollow\">Node-Red<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">Python@3.9<\/a> + <a href=\"https:\/\/pypi.org\/project\/opencv-python\/\" rel=\"noopener noreferrer nofollow\">OpenCV@4.5.1<\/a>. + <a href=\"https:\/\/keras.io\/\" rel=\"noopener noreferrer nofollow\">Tensorflow@2.10 Keras<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a><\/p>\n<\/li>\n<li>\n<p>MQTT (<a href=\"https:\/\/mosquitto.org\/\" rel=\"noopener noreferrer nofollow\">mosquitto<\/a>)<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0430:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>Intel NUC core i5 <\/p>\n<\/li>\n<li>\n<p>4GB RAM<\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430 Haswell-ULT Integrated Graphics Controller (\u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0430).<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u0438\u0446 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043c\u0435\u0440\u0430 \u0432\u044b\u0434\u0430\u044e\u0449\u0430\u044f RTSP \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0421 Ubuntu Server 20.04<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u0412 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0430\u0439\u043b <code>docker-compose.yml<\/code> \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Node-Red, MQTT \u0438 PostgreSQL. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 docker-compose \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/450312\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a><strong>. <\/strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f docker. <strong> <\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Tensorflow \u0438 OpenCV \u0432 Ubuntu 20.04 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>sudo apt install python3-venv python3-dev<\/code><\/p>\n<p><code>pip3 install opencv-python@4.5.1 tensorflow@2.10.0<\/code> paho<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0421\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Docker:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/sprut.ai\/article\/node-red-poshagovaya-instrukciya-dlya-novichkov-chast-1\" rel=\"noopener noreferrer nofollow\">Node-Red<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/selectel.ru\/blog\/tutorials\/how-to-install-and-use-postgresql-on-ubuntu-20-04\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.8host.com\/blog\/ustanovka-brokera-soobshhenij-mosquitto-v-debian-10\/\" rel=\"noopener noreferrer nofollow\">Mosquitto<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b: <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ol>\n<li>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <code>alice_has_fun.py<\/code> \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u043b\u0438\u0446\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json;<\/p>\n<\/li>\n<li>\n<p>Node-Red \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043b\u044e\u0434\u0435\u0439 \u0438\u0437 MQTT, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043b\u0438\u0446\u0430  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u0437 \u0411\u0414 \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a \u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, Node-Red \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e. \u0424\u0440\u0430\u0437\u044b \u0434\u043b\u044f \u0410\u043b\u0438\u0441\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0411\u0414 PostgreSQL;<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0432 Node-Red:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435  <code>docker-compose<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u043b\u043e\u043a My Yandex Station \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u043b\u043e\u043a\u0430 Yandex Station:<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0436\u0438\u043c Manual \u0434\u043b\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (\u0438 \u0410\u043b\u0438\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0435\u0439 \u0444\u0440\u0430\u0437\u0443 \u043a\u0430\u043a \u0434\u0435\u043b\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043e\u043d\u0430 \u0437\u0430 \u0432\u0430\u0441 \u043f\u043e\u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f), \u0433\u043e\u043b\u043e\u0441, \u0448\u0435\u043f\u043e\u0442 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u0426\u0435\u043f\u043e\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0431\u043b\u043e\u043a\u0430 <code>alice_fun<\/code>, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u043b\u043e\u043a\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0435, \u0438 \u0410\u043b\u0438\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 Fun \u0431\u0435\u0437 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430. \u0412 \u0431\u043b\u043e\u043a\u0435 <code>rand3<\/code> \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u043d\u0435 \u0431\u043e\u043b\u0442\u0430\u043b\u0430 \u043d\u043e\u0447\u044c\u044e.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0410\u043b\u0438\u0441\u0430 \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043b\u0430 \u0444\u0440\u0430\u0437\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043b\u0430 \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u044f \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u0434\u043f\u043e\u0442\u043e\u043a <code>Say by case<\/code>:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043f\u043e\u0442\u043e\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0444\u0440\u0430\u0437 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0410\u043b\u0438\u0441\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e, \u0442\u0430\u043a \u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0438\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0430\u0437 \u0432 \u0411\u0414 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0442\u043e\u043a UI. \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d UI \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u0441\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"https:\/\/github.com\/twocolors\/node-red-dashboard-template\/blob\/main\/alice_v2.json\" rel=\"noopener noreferrer nofollow\">twocolors<\/a>.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446<\/h2>\n<p>\u0412 <a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 <code>collect_images.py<\/code> \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u0438\u0446 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0445 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e 150-300 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0421\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>python3 collect_images.py -i &lt;source> -n &lt;face_name><\/code><\/p>\n<p>source:<\/p>\n<ul>\n<li>\n<p>0 \u2013 \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0442\u043e\u043a (&#171;rtsp:\/\/192.168.1.86:8554\/unicast&#187;)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430 \u0444\u0430\u0439\u043b\u0430 (&#171;raw\/IMG_2404.MOV&#187;)<\/p>\n<\/li>\n<\/ul>\n<p>face_name: \u0418\u043c\u044f \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043b\u0438\u0446\u0430<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043a\u0430\u043c\u0435\u0440\u043e\u0439, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0438\u0440\u0443\u044f \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043e\u0439, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u043d\u0438 \u0431\u0443\u0434\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043e\u0442\u043e. \u0422\u043e \u0436\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u0430\u0440\u043e\u0439 \u0434\u0440\u0443\u0437\u0435\u0439. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e detected:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 <a href=\"https:\/\/teachablemachine.withgoogle.com\/train\/image\" rel=\"noopener noreferrer nofollow\">Google Teachable Machine<\/a>, \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Keras h5. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u0442\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0432 \u043a\u0430\u043c\u0435\u0440\u0443.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 h5 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c <code>labels.txt<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c <code>alice_has_fun.py<\/code>. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>labels.txt<\/code> \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Node-Red, PorstgerSQL \u0438 Mosquitto \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<p><code>docker-compose up -d<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>config.json<\/code> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 config.json:<\/summary>\n<div class=\"spoiler__content\">\n<p><code>{<br \/> \"mqtt_pub\": false,<br \/> \"show_camera\": false,<br \/> \"input_source\": 0,<br \/> \"frame_recognition_rate\": 4,<br \/> \"publish_min_dalay\": 1,<br \/> \"camera_w\": 1080,<br \/> \"camera_h\": 720,<br \/> \"mqtt_broker\": \"127.0.0.1\",<br \/> \"mqtt_port\": 11883,<br \/> \"save_on_detect\": true,<br \/> \"draw_rect\": true,<br \/> \"min_predict_threshold\": 65<br \/> }<\/code><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_pub<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u043b\u0441\u0438 True \u0442\u043e \u0440\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">show_camera<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u043b\u0441\u0438 True \u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e cv2.imshow \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u043e \u0438\u0437 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">input_source<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0438\u0441\u043b\u043e (0 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430), \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0442\u043e\u043a\u0430 (&#171;rtsp:\/\/192.168.1.86:8554\/unicast&#187;) \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430 (&#171;raw\/IMG_2404.MOV&#187;)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">frame_recognition_rate<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">publish_min_dalay<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u044b\u0445 \u043a\u0430\u0434\u0440\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">camera_w<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0428\u0438\u0440\u0438\u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">camera_h<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0441\u043e\u0442\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_broker<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0434\u0440\u0435\u0441 MQTT \u0431\u0440\u043e\u043a\u0435\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mqtt_port<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0440\u0442 MQTT \u0431\u0440\u043e\u043a\u0435\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">save_on_detect<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u043a\u0430\u0434\u0440 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e on_detect<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">draw_rect<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043b\u0438\u0446\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">min_predict_threshold<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043b\u0438\u0446\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u0432 MQTT \u0431\u0440\u043e\u043a\u0435\u0440. \u0415\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0447\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 4 \u043a\u0430\u0434\u0440\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f 1 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u0432\u0448\u0438\u0445 \u043f\u043e\u0440\u043e\u0433.<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a:<\/p>\n<p><code>python3 alice_has_fun.py<\/code><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435:<\/p>\n<p><code>1\/1 [==============================] - 0s 44ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 48ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 45ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 42ms\/step<\/code><\/p>\n<p><code>Creating Images..........\/on_detect\/2022-11-13\/2022-11-13_13_59_59.jpg<\/code><\/p>\n<p><code>Send {\"\u0411\u044d\u043c\": 71.39} to topic for_alice\/peoples<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 45ms\/step<\/code><\/p>\n<p><code>1\/1 [==============================] - 0s 48ms\/step<\/code><\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6370eaf80ca3379afa72700a\" data-style=\"\" id=\"6370eaf80ca3379afa72700a\" width=\"\"><\/div>\n<p><a href=\"https:\/\/github.com\/guinmoon\/yandex_alice_has_fun\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/a><\/p>\n<p><strong>P.S.<\/strong> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e &#8212; \u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0446 \u0438 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/699060\/\"> https:\/\/habr.com\/ru\/post\/699060\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-341179","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341179"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341179\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}