{"id":362786,"date":"2024-05-21T01:42:11","date_gmt":"2024-05-21T01:42:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=362786"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T01:42:11","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=362786","title":{"rendered":"<span>\u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u0442\u044b \u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e\u0439 \u043d\u043e\u0447\u044c\u044e<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u00a0\u0432\u0430\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <a href=\"https:\/\/newtechaudit.ru\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/a> \u041f\u0440\u043e\u043c\u043a\u0438\u043d \u041c\u0438\u0445\u0430\u0438\u043b, \u041c\u044b\u043c\u0440\u0438\u043d \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0438 \u0413\u043e\u0441\u043f\u043e\u0434\u0430\u0440\u0438\u043a\u043e\u0432\u0430 \u0418\u0440\u0438\u043d\u0430.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437\u00a0\u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0418\u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0437\u0430\u00a0\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438. \u0412\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 ML \u043a\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435) \u043f\u043e\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u043c \u043a\u0430\u043c\u0435\u0440 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0431\u0441\u0443\u0434\u0438\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0432\u00a0\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u043e\u0441\u0442\u0443<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"#%D0%BE%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85\" rel=\"noopener noreferrer nofollow\">\u041e \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%BE%20%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8\" rel=\"noopener noreferrer nofollow\">\u041e \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%BF%D0%BE%D0%B4%D1%85%D0%BE%D0%B4\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%B7%D0%B0%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e8a\/e8e\/9ea\/e8ae8e9ea26593c708769270959a9bfc.jpg\" width=\"1022\" height=\"643\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e8a\/e8e\/9ea\/e8ae8e9ea26593c708769270959a9bfc.jpg\" data-blurred=\"true\"\/><\/figure>\n<h2>\u041e \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BE%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85\" id=\"\u043e \u0434\u0430\u043d\u043d\u044b\u0445\"><\/a><\/p>\n<p>\u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u0438\u0434\u0435\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u00a0\u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u0445, \u0430\u00a0\u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u00a0\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u043e\u043c \u0441\u043b\u0443\u0436\u0431\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0430\u0441\u0442\u043e \u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0443\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0433\u0434\u0435\u2011\u0442\u043e \u0440\u044f\u0434\u043e\u043c \u0441\u00a0\u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a \u0438 \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438\u00a0\u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 *.mp4, *.avi \u0441\u00a0\u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043e\u0445\u0440\u0430\u043d\u044b. \u041d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u043b \u0432\u00a0\u0441\u0435\u0431\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043e\u043a\u043e\u043b\u043e 490\u00a0\u0413\u0411, \u0430\u00a0\u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043b\u043e 590\u00a0\u0447\u0430\u0441\u043e\u0432. \u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0438\u0434\u0435\u043e\u0440\u044f\u0434\u0430 \u043d\u0435\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c. <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0435. \u0423\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u043d\u0430\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437\u00a0\u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u043e \u0441\u043f\u044f\u0449\u0438\u0435 \u043b\u044e\u0434\u0438 (1). \u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438\u0437\u00a0\u0432\u0441\u0435\u0445 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f\u00a0\u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u00ab\u043d\u0430\u0434\u0437\u0438\u0440\u0430\u0442\u0435\u043b\u044f\u00bb. \u0417\u0430\u043f\u0438\u0441\u0438 \u0441\u043e \u0441\u043f\u044f\u0449\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u0430\u043a\u00a0\u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043b\u044e\u0434\u0435\u0439 (2);<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u044e\u0434\u0438 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0445\u043e\u0434\u044f\u0442 (3);<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u044e\u0434\u0438 \u0432\u00a0\u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0437\u0435, \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0435\u00a0\u0441\u043f\u044f\u0442 (4).<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044c \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e. \u041d\u043e\u00a0\u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u2011\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u044f\u0432\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u043d\u0438\u0437\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u2011\u0437\u0430 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (1) \u0438 (2);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0438\u0437\u043a\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438\u0437\u2011\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0432\u0438\u0436\u0443\u0449\u0438\u0445\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e\u00a0\u0434\u043b\u044f\u00a0\u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u2011\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041e \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BE%20%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8\" id=\"\u043e \u043c\u043e\u0434\u0435\u043b\u0438\"><\/a><\/p>\n<p>\u0420\u0430\u043d\u0435\u0435 \u0443\u00a0\u043d\u0430\u0441\u00a0\u0431\u044b\u043b \u043e\u043f\u044b\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 YOLOv7\u00a0(You Only Look Once). \u041e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u00a0\u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0434\u0430\u00a0\u0438 \u0432\u00a0\u0441\u0435\u0442\u0438 \u043e\u00a0\u043d\u0435\u0439 \u043e\u0442\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0445\u043e\u0440\u043e\u0448\u043e (<a href=\"https:\/\/habr.com\/ru\/articles\/701268\/\" rel=\"noopener noreferrer nofollow\">1<\/a>, <a href=\"https:\/\/habr.com\/ru\/articles\/725296\/\" rel=\"noopener noreferrer nofollow\">2<\/a>).<\/p>\n<p>YOLOv7\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/arxiv.org\/abs\/2204.06806\" rel=\"noopener noreferrer nofollow\">CV \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0\u0440\u043e\u0431\u043e\u0442\u043e\u0442\u0435\u0445\u043d\u0438\u043a\u0435 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041c\u043e\u0434\u0435\u043b\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c. \u041e\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441\u00a0\u0435\u0451 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0434\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u00a0\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043b\u0430. \u0418 \u043d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u0432\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043f\u043e\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e99\/6fc\/db2\/e996fcdb2919d50322ef8fc049d0c2b5.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 YOLO \" title=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 YOLO \" width=\"679\" height=\"205\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e99\/6fc\/db2\/e996fcdb2919d50322ef8fc049d0c2b5.png\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 YOLO <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u043b\u044f\u00a0\u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f\u00a0\u0431\u044b\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyTorch. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u043c\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c pyTorch \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BF%D0%BE%D0%B4%D1%85%D0%BE%D0%B4\" id=\"\u043f\u043e\u0434\u0445\u043e\u0434\"><\/a><\/p>\n<p>\u0414\u043b\u044f\u00a0\u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n<p><strong>\u0428\u0430\u0433 \u043f\u0435\u0440\u0432\u044b\u0439:<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043b\u044e\u0434\u0435\u0439 \u0434\u043b\u044f\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 YOLOv7.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0432\u0442\u043e\u0440\u043e\u0439:<\/strong> \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0\u043a\u0430\u0434\u0440\u044b.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0442\u0440\u0435\u0442\u0438\u0439:<\/strong> \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043f\u043e\u00a0\u043a\u0430\u0434\u0440\u0430\u043c \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439:<\/strong> \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u044e\u0434\u0435\u0439 \u0432\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0435 \u0441\u00a0\u0446\u0435\u043b\u044c\u044e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>\u0428\u0430\u0433 \u043f\u044f\u0442\u044b\u0439:<\/strong> \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ad\/84b\/2cf\/4ad84b2cfe36282920fdeb286bec4886.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \" title=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \" width=\"690\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ad\/84b\/2cf\/4ad84b2cfe36282920fdeb286bec4886.png\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043c \u0434\u0430\u0436\u0435 \u043d\u0435\u00a0\u043d\u0443\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0438\u043b\u0438\u00a0\u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0442\u044c: \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u00a0\u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u00a0\u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440, \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u043e\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0435\u0431\u0435\u043b\u0438, \u043d\u043e\u00a0\u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0430\u00a0\u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 (\u0444\u043b\u0430\u0433 \u0441\u043d\u0430 \u0438 \u0444\u043b\u0430\u0433 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f). \u0422\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0447\u0442\u043e \u0441\u043d\u0438\u0437\u0438\u0442 \u043e\u0431\u044a\u0451\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/h2>\n<p><a class=\"anchor\" name=\"%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\" id=\"\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\"><\/a><\/p>\n<p>\u041f\u044f\u0442\u0438 \u0448\u0430\u0433\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0443\u00a0\u043d\u0430\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u044f\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 YOLOv7\u00a0\u0434\u043b\u044f\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb (<strong>pose_detection.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0\u043a\u0430\u0434\u0440\u044b (<strong>video_framer.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043f\u043e\u00a0\u043a\u0430\u0434\u0440\u0430\u043c \u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (<strong>util_tools.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u0441\u0442\u0438 (<strong>human_poser.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043e\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u0432 (<strong>full_detect.py<\/strong>).<\/p>\n<\/li>\n<\/ol>\n<h3>\u0428\u0430\u0433 \u043f\u0435\u0440\u0432\u044b\u0439<\/h3>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <strong>pose_detection.py<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ol>\n<li>\n<p><strong>plot_pose_prediction<\/strong>\u00a0\u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def plot_pose_prediction(img : cv2.Mat, pred : list, thickness=2, show_bbox : bool=True) -> cv2.Mat:     bbox = xywh2xyxy(pred[:, 2:6])     for idx in range(pred.shape[0]):         plot_skeleton_kpts(img, pred[idx, 7:].T, 3)         if show_bbox:             plot_one_box(bbox[idx], img, line_thickness=thickness)<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p><strong>make_pose_prediction<\/strong>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def make_pose_prediction(model, device: str, img : cv2.Mat) -> List:       img_ = letterbox(img, 960, stride=64, auto=True)[0]     resized_shape = img_.shape[0:2]        img_ = transforms.ToTensor()(img_)     img_ = torch.tensor(np.array([img_.numpy()]))     img_ = img_.to(device).float()     with torch.no_grad():         output, _ = model(img_)     conf_threshold = 0.25     tmp = non_max_suppression_kpt(output, conf_thres=conf_threshold,                                                                  nc=model.yaml['nc'],                                                                   nkpt=model.yaml['nkpt'],                                                                   kpt_label=True)     while len(tmp[0]) == 0:         conf_threshold -= 0.001         tmp = non_max_suppression_kpt(output, conf_thres= conf_threshold,                                                                      nc=model.yaml['nc'],                                                                       nkpt=model.yaml['nkpt'],                                                                       kpt_label=True)     output = output_to_keypoint(tmp)       output = scale_pose_output(output, resized_shape, img.shape[0:2])     return output<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p><strong>video_pose<\/strong>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>VideoWriter<\/strong> \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0438\u0434\u0435\u043e \u0438 \u0432\u00a0\u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u0432\u044b\u0432\u043e\u0434\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.   <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def video_pose(filename: str, out_filename: str, model, device) -> List:     clip = VideoFileClip(filename)     duration = clip.duration     fps = clip.fps       cap = cv2.VideoCapture(filename)     width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))     height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))     fourcc = cv2.VideoWriter_fourcc(*'MJPG')     out = cv2.VideoWriter(out_filename, fourcc, fps, (width, height))     predictions = []     with tqdm(total=int(round(fps*duration))) as bar:         while cap.isOpened():             ret, frame = cap.read()             if ret:                 pred = make_pose_prediction(model, device, frame)                 predictions.append(pred[0])                 plot_pose_prediction(frame, pred, show_bbox=False)                 out.write(frame)                 cv2.waitKey(100)             else:                 break             bar.update(1)     cap.release()     out.release()     clip.close()     cv2.destroyAllWindows()     return predictions<\/code><\/pre>\n<h3>\u0428\u0430\u0433 \u0432\u0442\u043e\u0440\u043e\u0439<\/h3>\n<p>\u041a\u043e\u0434 \u0432\u00a0\u0444\u0430\u0439\u043b\u0435 <strong>video_framer.py<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430\u00a0\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 JPEG \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>fetch_frames_to_jpg<\/strong> \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 JPEG.<\/p>\n<pre><code class=\"python\">def fetch_frames_to_jpg(path: str) -> List:     op = \"video_framer.fetch_frames_to_jpg\"     try:         fps, duration = __video_info(path)     except ValueError as err:         raise ValueError(f\"{op}: {err}\")     frames = []     cap = cv.VideoCapture(path)     try:         with tqdm(total=int(round(fps*duration))) as bar:             while cap.isOpened():                 success, frame = cap.read()                 if success:                     _, frame = cv.imencode('.jpeg', frame)                     frames.append(frame)                 else:                     break                 bar.update(1)     except Exception as err:         raise ValueError(f\"{op}: {err}\")     finally:         cap.release()     return frames<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>fetch_frames_to_poses<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0430\u0434\u0440\u0435 (\u043a\u043e\u0434 \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0440\u044b\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c):<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def fetch_frames_to_poses(model, device, path: str, fps_user=None, frames_skip=None) -> List:     op = \"video_framer.fetch_frames_to_poses\"     try:         fps, duration = __video_info(path)     except ValueError as err:         raise ValueError(f\"{op}: {err}\")     if fps_user:         fps = fps_user     poses = []     cap = cv.VideoCapture(path)     try:         with tqdm(total=int(round(fps*duration))) as bar:             frames_counter = frames_skip             while cap.isOpened():                                     success, frame = cap.read()                 if success:                     # Skip frames                     if frames_skip:                         if frames_counter &lt; frames_skip:                             frames_counter += 1                             bar.update(1)                             continue                         else:                             frames_counter = 0                      pose = make_pose_prediction(model, device, frame)                     poses.append(pose[0])                 else:                     break                 bar.update(1)     except Exception as err:         raise ValueError(f\"{op}: {err}\")     finally:         cap.release()     return poses  def __video_info(path: str) -> Tuple[int, float]:     op = \"video_framer.__video_info\"     try:         clip = VideoFileClip(path)         fps = clip.fps         duration = clip.duration     except Exception as err:         raise ValueError(f\"{op}: {err}\")     finally:         clip.close()     return fps, duration<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/74b\/702\/644\/74b702644b289d576e1da6231d8536dd.jpg\" width=\"180\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/74b\/702\/644\/74b702644b289d576e1da6231d8536dd.jpg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/def\/734\/106\/def734106cfc62955ad1b709fcc43538.jpg\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 - \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430   \" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 - \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430   \" width=\"275\" height=\"245\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/def\/734\/106\/def734106cfc62955ad1b709fcc43538.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u00a0\u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 <\/figcaption><\/div>\n<\/figure>\n<h3>\u0428\u0430\u0433 \u0442\u0440\u0435\u0442\u0438\u0439<\/h3>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <strong>util_tools.py<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0438 \u0438\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 JPEG. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>get_fps<\/strong> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0443 \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u0434\u0440\u043e\u0432 \u0432\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f\u00a0\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430. \u041e\u0431\u044a\u0451\u043c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def get_fps(video_path: str, seconds_cut: int=60) -> float: assert os.path.exists(video_path), f'Video on path {video_path} not found'  temp_video_path = '.\/temp' + os.path.splitext(video_path)[-1]               subprocess.run(['ffmpeg',  '-i',  video_path, '-to', str(seconds_cut),                                             '-c:v',  'copy', temp_video_path, '-loglevel', 'quiet'])      cap = cv2.VideoCapture(temp_video_path)     frames_count = 0     while cap.isOpened():         success, frame = cap.read()         if success:             frames_count += 1         else:             break      os.remove(temp_video_path)      return round(frames_count\/seconds_cut, 2)  def report_by_minutes(arr_is_markup: List[bool],                                            fps: float, markup_border: float,                                            frames_nums: List[int] = None,                                            markup_name: str = None) -> pd.DataFrame:      # \u041a\u043e\u043b-\u0432\u043e \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e     frames_in_minute = fps * 60          # \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0443\u0442     if frames_nums is not None:         frames_count = frames_nums[-1]     else:         frames_count = len(arr_is_markup)          minutes = list(range(ceil(frames_count \/ frames_in_minute)))      # \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0437\u043c\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0438\u043d\u0443\u0442\u044b     minutes_markup = [False] * len(minutes)          # \u0426\u0438\u043a\u043b \u043f\u043e \u043c\u0438\u043d\u0443\u0442\u0430\u043c     for minute in minutes:         # \u0413\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u0434\u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443         left_border = int(frames_in_minute * minute)         right_border = min(int(left_border + frames_in_minute), frames_count)                  if frames_nums is not None:             # \u041d\u043e\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430, \u0431\u043e\u043b\u044c\u0448\u0435 \u043b\u0435\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b             left_border = np.where(frames_nums >= left_border)[0][0]             # \u041d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u0430\u0434\u0440\u0430, \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u0430\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b             right_border = np.where(frames_nums &lt;= right_border)[0][-1]                 # \u041a\u043e\u043b-\u0432\u043e \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u043f\u043e\u0434\u0441\u043f\u0438\u0441\u043a\u0435         frames_count_diff = right_border - left_border         # \u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043c\u0438\u043d\u0443\u0442\u044b         minutes_markup[minute] = (             sum(arr_is_markup[left_border:right_border]) \/ frames_count_diff             > markup_border         )      if not markup_name:         markup_name = '\u041e\u0442\u043c\u0435\u0442\u043a\u0430'      df_report = pd.DataFrame(np.column_stack((                                      minutes,                                      minutes_markup     )), columns=['\u041c\u0438\u043d\u0443\u0442\u0430', markup_name])     df_report[markup_name] = df_report[markup_name].astype('bool')          return df_report<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0428\u0430\u0433 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0441\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u00a0\u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 (\u0441\u043a\u0440\u0438\u043f\u0442 <strong>human_poser.py<\/strong>). <\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c YOLOv7\u00a0\u0441\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 CUDA, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0442\u0435\u00a0\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e\u00a0\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u044b CPU (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430), \u043d\u043e\u00a0\u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU (\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044f\u0434\u0440\u0430) \u0434\u043b\u044f\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0417\u0430\u0442\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0438 \u0438\u043b\u0438\u00a0\u0447\u0430\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043f\u043e\u2011\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0432\u043e\u00a0\u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u00ab<strong>model.eval()<\/strong>\u00bb). <\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"python\"># \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\") print('Device', device) # \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 model = attempt_load('weights\/yolov7-w6-pose.pt') # \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c \u043e\u0446\u0435\u043d\u043a\u0438, map_location=device model.eval() print('Number of classes:', model.yaml['nc']) print('Number of keypoints:', model.yaml['nkpt']))<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u00a0\u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043f\u0438\u0442, \u043c\u044b \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043d\u043e\u0433 \u0438 \u0442\u0435\u043b\u0430. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441\u00a0\u0442\u0435\u043c \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043d\u043e\u0433 \u0432\u043e\u00a0\u0432\u0440\u0435\u043c\u044f \u0441\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u043e\u0433\u0430 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u0441\u043e\u0433\u043d\u0443\u0442\u0430 \u0432\u00a0\u043a\u043e\u043b\u0435\u043d\u0435). \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u00a0\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0435\u0447\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e.<\/p>\n<p>\u0412\u00a0\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043e\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0438 cv2\u00a0\u0438 pandas \u0434\u043b\u044f\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def process_files(process_paths: Iterable[str]):     for poses_path in tqdm(poses_paths):         fps, video_name = validate_path(poses_path)         if not fps:             continue         report = process_file(poses_path, get_params(fps), fps)         reports_folder = 'reports'         os.makedirs(reports_folder, exist_ok=True)         report.to_excel(f'{reports_folder}\/report_{video_name}.xlsx', index=False)   def validate_path(poses_path: str) -> Tuple([str], str):     if not os.path.exists(poses_path):         print(f'CSV file with poses not find: {poses_path}')         return None     video_name = os.path.basename(poses_path).split('_poses_skip_')[0]     if video_name not in dict_video_fps:         print(f'FPS undefined for: {poses_path}')         return None     return dict_video_fps[video_name], video_name  def process_file(poses_path: str, sleep_detect_parametrs: list, fps: float):     df_poses = pd.read_csv(poses_path)     columns = list(df_poses.columns[8:])     poses = np.array(df_poses[columns].values.tolist())     predictions = np.array([True]*len(poses))      for ind, params in enumerate(sleep_detect_parametrs):         pairs = check_sleeping(poses, **params)         pairs_predictions = np.array([False]*len(predictions))          for pair in pairs:             pairs_predictions[pair[0]:pair[1]] = True         predictions &amp;= pairs_predictions      poses_filter = get_poses_filter(df_poses)     pred = predictions &amp; poses_filter      return render_report(df_poses, poses_filter, pred, fps)  def get_params(fps: float) -> list:     return [{         'body_part_probability': 0.2,         'radius': 40,         # 'crit_time': 5,         # 'frames_movement_count': 5,         # 'crit_time': int(fps),         'frames_movement_count': int(fps),         'body_parts': ['\u043d\u043e\u0441', '\u043f\u0440\u0430\u0432 \u0433\u043b\u0430\u0437', '\u043b\u0435\u0432 \u0433\u043b\u0430\u0437', '\u043b\u0435\u0432 \u0443\u0445\u043e', '\u043f\u0440\u0430\u0432 \u0443\u0445\u043e']     }, {         'body_part_probability': 0.6,         'radius': 20,         'crit_time': int(fps * 0.5),         'frames_movement_count': int(fps * 0.5),         'body_parts': ['\u043b\u0435\u0432 \u0437\u0430\u043f\u044f\u0441\u0442\u044c\u0435', '\u043f\u0440\u0430\u0432 \u0437\u0430\u043f\u044f\u0441\u0442\u044c\u0435'],     }]<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/21b\/35e\/7bd\/21b35e7bd2178160658348e394f8151a.jpg\" alt=\"\u041f\u043e\u0437\u0430 \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \" title=\"\u041f\u043e\u0437\u0430 \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \" width=\"384\" height=\"405\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21b\/35e\/7bd\/21b35e7bd2178160658348e394f8151a.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0437\u0430 \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 <\/figcaption><\/div>\n<\/figure>\n<h3>\u0428\u0430\u0433 \u043f\u044f\u0442\u044b\u0439<\/h3>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u0434 \u0438\u0437\u00a0\u0441\u043a\u0440\u0438\u043f\u0442\u0430 <strong>full_detect.py<\/strong> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0442\u0447\u0435\u0442\u044b \u043e\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u0441\u043d\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def render_report(df_poses: pd.DataFrame, poses_filter, pred: set, fps: float) -> pd.DataFrame:     df_nogo_filter = report_by_minutes(         poses_filter,         fps,         markup_border=0.1,         frames_nums=df_poses['#'].to_numpy(),         markup_name='\u0424\u0438\u043b\u044c\u0442\u0440 \u043d\u043e\u0433\u043e',     )     df_nogo_filter['\u0424\u0438\u043b\u044c\u0442\u0440 \u043d\u043e\u0433\u043e'] = df_nogo_filter['\u0424\u0438\u043b\u044c\u0442\u0440 \u043d\u043e\u0433\u043e'].apply(lambda x: 'x' if x else '')      df_sleep_report = report_by_minutes(         pred,         fps,         markup_border=0.1,         frames_nums=df_poses['#'].to_numpy(),         markup_name='\u0421\u043f\u0438\u0442',     )     df_sleep_report['\u0421\u043f\u0438\u0442'] = df_sleep_report['\u0421\u043f\u0438\u0442'].apply(lambda x: 'x' if x else '')      df_absent_report = report_by_minutes(         df_poses['box_p'] &lt; 0.4,         fps,         markup_border=0.6,         frames_nums=df_poses['#'].to_numpy(),         markup_name='\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442'     )     df_absent_report['\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442'] = df_absent_report['\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442'].apply(lambda x: 'x' if x else '')      df_report = df_sleep_report.merge(df_absent_report, on='\u041c\u0438\u043d\u0443\u0442\u0430')     df_report = df_nogo_filter.merge(df_report, on='\u041c\u0438\u043d\u0443\u0442\u0430')      df_report['\u0412\u0440\u0435\u043c\u044f'] = df_report['\u041c\u0438\u043d\u0443\u0442\u0430'].apply(lambda x: f'{x\/\/60:02d}:{x%60:02d}:__')     df_report.drop('\u041c\u0438\u043d\u0443\u0442\u0430', axis=1, inplace=True)     df_report = df_report[['\u0412\u0440\u0435\u043c\u044f'] + df_report.columns[:-1].tolist()]     return df_report<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u043e\u0432 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432. \u042d\u043a\u0441\u043f\u0435\u0440\u0442\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430\u00a0\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041c\u0438\u043d\u0443\u0442\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0424\u0438\u043b\u044c\u0442\u0440 \u043d\u043e\u0433<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u043f\u0438\u0442<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">3<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">6<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">x<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p><a class=\"anchor\" name=\"%D0%B7%D0%B0%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B5\" id=\"\u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\"><\/a><\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c YOLOv7\u00a0\u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0435\u043a\u0442\u0440 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0441\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u00a0\u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430\u00a0\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u0441\u043b\u0443\u0436\u0431\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u043e\u0438\u0445 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u0447\u0442\u043e\u00a0\u0432\u00a0\u0446\u0435\u043b\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u0443\u0440\u043e\u0432\u043d\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f\u00a0\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u044b\u0441\u043b\u0438 \u043e\u00a0\u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0445\u043e\u0434\u0430 \u0434\u043b\u044f\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435, \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438\u043c \u0432\u00a0\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/780262\/\"> https:\/\/habr.com\/ru\/articles\/780262\/<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u00a0\u0432\u0430\u043c\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 <a href=\"https:\/\/newtechaudit.ru\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 NTA<\/a> \u041f\u0440\u043e\u043c\u043a\u0438\u043d \u041c\u0438\u0445\u0430\u0438\u043b, \u041c\u044b\u043c\u0440\u0438\u043d \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0438 \u0413\u043e\u0441\u043f\u043e\u0434\u0430\u0440\u0438\u043a\u043e\u0432\u0430 \u0418\u0440\u0438\u043d\u0430.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437\u00a0\u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0418\u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0437\u0430\u00a0\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438. \u0412\u00a0\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 ML \u043a\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435) \u043f\u043e\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u043c \u043a\u0430\u043c\u0435\u0440 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0431\u0441\u0443\u0434\u0438\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u0432\u00a0\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u043e\u0441\u0442\u0443<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"#%D0%BE%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85\" rel=\"noopener noreferrer nofollow\">\u041e \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%BE%20%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8\" rel=\"noopener noreferrer nofollow\">\u041e \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%BF%D0%BE%D0%B4%D1%85%D0%BE%D0%B4\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#%D0%B7%D0%B0%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041e \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BE%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85\" id=\"\u043e \u0434\u0430\u043d\u043d\u044b\u0445\">\u043d\u044b\u0445&#187;<\/a><\/p>\n<p>\u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043d\u0430\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u0438\u0434\u0435\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u00a0\u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u0445, \u0430\u00a0\u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u00a0\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u043e\u043c \u0441\u043b\u0443\u0436\u0431\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0430\u0441\u0442\u043e \u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0443\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0433\u0434\u0435\u2011\u0442\u043e \u0440\u044f\u0434\u043e\u043c \u0441\u00a0\u043a\u0430\u043c\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a \u0438 \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438\u00a0\u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 *.mp4, *.avi \u0441\u00a0\u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043e\u0445\u0440\u0430\u043d\u044b. \u041d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u043b \u0432\u00a0\u0441\u0435\u0431\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043e\u043a\u043e\u043b\u043e 490\u00a0\u0413\u0411, \u0430\u00a0\u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043b\u043e 590\u00a0\u0447\u0430\u0441\u043e\u0432. \u041f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0438\u0434\u0435\u043e\u0440\u044f\u0434\u0430 \u043d\u0435\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c. <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0435. \u0423\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u043d\u0430\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437\u00a0\u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u043e \u0441\u043f\u044f\u0449\u0438\u0435 \u043b\u044e\u0434\u0438 (1). \u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438\u0437\u00a0\u0432\u0441\u0435\u0445 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043e\u0432 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f\u00a0\u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u00ab\u043d\u0430\u0434\u0437\u0438\u0440\u0430\u0442\u0435\u043b\u044f\u00bb. \u0417\u0430\u043f\u0438\u0441\u0438 \u0441\u043e \u0441\u043f\u044f\u0449\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u0430\u043a\u00a0\u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u043b\u044e\u0434\u0435\u0439 (2);<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u044e\u0434\u0438 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0445\u043e\u0434\u044f\u0442 (3);<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u0430\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u044e\u0434\u0438 \u0432\u00a0\u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0437\u0435, \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0435\u00a0\u0441\u043f\u044f\u0442 (4).<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044c \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e. \u041d\u043e\u00a0\u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u2011\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u044f\u0432\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u043d\u0438\u0437\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u2011\u0437\u0430 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (1) \u0438 (2);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0438\u0437\u043a\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0430 \u0438\u0437\u2011\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0432\u0438\u0436\u0443\u0449\u0438\u0445\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0432\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e\u00a0\u0434\u043b\u044f\u00a0\u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u2011\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041e \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BE%20%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8\" id=\"\u043e \u043c\u043e\u0434\u0435\u043b\u0438\">\u0435\u043b\u0438&#187;<\/a><\/p>\n<p>\u0420\u0430\u043d\u0435\u0435 \u0443\u00a0\u043d\u0430\u0441\u00a0\u0431\u044b\u043b \u043e\u043f\u044b\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 YOLOv7\u00a0(You Only Look Once). \u041e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u00a0\u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0434\u0430\u00a0\u0438 \u0432\u00a0\u0441\u0435\u0442\u0438 \u043e\u00a0\u043d\u0435\u0439 \u043e\u0442\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0445\u043e\u0440\u043e\u0448\u043e (<a href=\"https:\/\/habr.com\/ru\/articles\/701268\/\" rel=\"noopener noreferrer nofollow\">1<\/a>, <a href=\"https:\/\/habr.com\/ru\/articles\/725296\/\" rel=\"noopener noreferrer nofollow\">2<\/a>).<\/p>\n<p>YOLOv7\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/arxiv.org\/abs\/2204.06806\" rel=\"noopener noreferrer nofollow\">CV \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0\u0440\u043e\u0431\u043e\u0442\u043e\u0442\u0435\u0445\u043d\u0438\u043a\u0435 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041c\u043e\u0434\u0435\u043b\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c. \u041e\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u00a0\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441\u00a0\u0435\u0451 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0434\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u00a0\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043b\u0430. \u0418 \u043d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u0432\u00a0\u0437\u0430\u0434\u0430\u0447\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u044f\u0449\u0438\u0445 \u043f\u043e\u00a0\u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 YOLO <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u043b\u044f\u00a0\u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f\u00a0\u0431\u044b\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyTorch. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u043c\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c pyTorch \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u00a0\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0441\u043f\u044f\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439<\/h2>\n<p><a class=\"anchor\" name=\"%D0%BF%D0%BE%D0%B4%D1%85%D0%BE%D0%B4\" id=\"\u043f\u043e\u0434\u0445\u043e\u0434\">\u043e\u0434&#187;><\/a><\/p>\n<p>\u0414\u043b\u044f\u00a0\u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043f\u044f\u0449\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n<p><strong>\u0428\u0430\u0433 \u043f\u0435\u0440\u0432\u044b\u0439:<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043b\u044e\u0434\u0435\u0439 \u0434\u043b\u044f\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 YOLOv7.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0432\u0442\u043e\u0440\u043e\u0439:<\/strong> \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0\u043a\u0430\u0434\u0440\u044b.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0442\u0440\u0435\u0442\u0438\u0439:<\/strong> \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043f\u043e\u00a0\u043a\u0430\u0434\u0440\u0430\u043c \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p><strong>\u0428\u0430\u0433 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439:<\/strong> \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u044e\u0434\u0435\u0439 \u0432\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0435 \u0441\u00a0\u0446\u0435\u043b\u044c\u044e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>\u0428\u0430\u0433 \u043f\u044f\u0442\u044b\u0439:<\/strong> \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0451\u0442\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f <\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043c \u0434\u0430\u0436\u0435 \u043d\u0435\u00a0\u043d\u0443\u0436\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0438\u043b\u0438\u00a0\u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0442\u044c: \u0432\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u00a0\u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u00a0\u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440, \u0441\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u043e\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0435\u0431\u0435\u043b\u0438, \u043d\u043e\u00a0\u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0430\u00a0\u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 (\u0444\u043b\u0430\u0433 \u0441\u043d\u0430 \u0438 \u0444\u043b\u0430\u0433 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f). \u0422\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0447\u0442\u043e \u0441\u043d\u0438\u0437\u0438\u0442 \u043e\u0431\u044a\u0451\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/h2>\n<p><a class=\"anchor\" name=\"%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\" id=\"\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\">\u0430\u0446\u0438\u044f&#187;><\/a><\/p>\n<p>\u041f\u044f\u0442\u0438 \u0448\u0430\u0433\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0443\u00a0\u043d\u0430\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u044f\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 YOLOv7\u00a0\u0434\u043b\u044f\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb (<strong>pose_detection.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0\u043a\u0430\u0434\u0440\u044b (<strong>video_framer.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u043e\u0432\u00bb \u043f\u043e\u00a0\u043a\u0430\u0434\u0440\u0430\u043c \u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (<strong>util_tools.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u043e\u0441\u0442\u0438 (<strong>human_poser.py<\/strong>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043e\u00a0\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u043e\u0432 (<strong>full_detect.py<\/strong>).<\/p>\n<\/li>\n<\/ol>\n<h3>\u0428\u0430\u0433 \u043f\u0435\u0440\u0432\u044b\u0439<\/h3>\n<p>\u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <strong>pose_detection.py<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ol>\n<li>\n<p><strong>plot_pose_prediction<\/strong>\u00a0\u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def plot_pose_prediction(img : cv2.Mat, pred : list, thickness=2, show_bbox : bool=True) -> cv2.Mat:     bbox = xywh2xyxy(pred[:, 2:6])     for idx in range(pred.shape[0]):         plot_skeleton_kpts(img, pred[idx, 7:].T, 3)         if show_bbox:             plot_one_box(bbox[idx], img, line_thickness=thickness)<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p><strong>make_pose_prediction<\/strong>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def make_pose_prediction(model, device: str, img : cv2.Mat) -> List:       img_ = letterbox(img, 960, stride=64, auto=True)[0]     resized_shape = img_.shape[0:2]        img_ = transforms.ToTensor()(img_)     img_ = torch.tensor(np.array([img_.numpy()]))     img_ = img_.to(device).float()     with torch.no_grad():         output, _ = model(img_)     conf_threshold = 0.25     tmp = non_max_suppression_kpt(output, conf_thres=conf_threshold,                                                                  nc=model.yaml['nc'],                                                                   nkpt=model.yaml['nkpt'],                                                                   kpt_label=True)     while len(tmp[0]) == 0:         conf_threshold -= 0.001         tmp = non_max_suppression_kpt(output, conf_thres= conf_threshold,                                                                      nc=model.yaml['nc'],                                                                       nkpt=model.yaml['nkpt'],                                                                       kpt_label=True)     output = output_to_keypoint(tmp)       output = scale_pose_output(output, resized_shape, img.shape[0:2])     return output<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p><strong>video_pose<\/strong>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>VideoWriter<\/strong> \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0438\u0434\u0435\u043e \u0438 \u0432\u00a0\u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u0432\u044b\u0432\u043e\u0434\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.   <\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def video_pose(filename: str, out_filename: str, model, device) -> List:     clip = VideoFileClip(filename)     duration = clip.duration     fps = clip.fps       cap = cv2.VideoCapture(filename)     width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))     height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))     fourcc = cv2.VideoWriter_fourcc(*'MJPG')     out = cv2.VideoWriter(out_filename, fourcc, fps, (width, height))     predictions = []     with tqdm(total=int(round(fps*duration))) as bar:         while cap.isOpened():             ret, frame = cap.read()             if ret:                 pred = make_pose_prediction(model, device, frame)                 predictions.append(pred[0])                 plot_pose_prediction(frame, pred, show_bbox=False)                 out.write(frame)                 cv2.waitKey(100)             else:                 break             bar.update(1)     cap.release()     out.release()     clip.close()     cv2.destroyAllWindows()     return predictions<\/code><\/pre>\n<h3>\u0428\u0430\u0433 \u0432\u0442\u043e\u0440\u043e\u0439<\/h3>\n<p>\u041a\u043e\u0434 \u0432\u00a0\u0444\u0430\u0439\u043b\u0435 <strong>video_framer.py<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430\u00a0\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 JPEG \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437\u00a0\u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>fetch_frames_to_jpg<\/strong> \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 JPEG.<\/p>\n<pre><code class=\"python\">def fetch_frames_to_jpg(path: str) -> List:     op = \"video_framer.fetch_frames_to_jpg\"     try:         fps, duration = __video_info(path)     except ValueError as err:         raise ValueError(f\"{op}: {err}\")     frames = []     cap = cv.VideoCapture(path)     try:         with tqdm(total=int(round(fps*duration))) as bar:             while cap.isOpened():                 success, frame = cap.read()                 if success:                     _, frame = cv.imencode('.jpeg', frame)                     frames.append(frame)                 else:                     break                 bar.update(1)     except Exception as err:         raise ValueError(f\"{op}: {err}\")     finally:         cap.release()     return frames<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <strong>fetch_frames_to_poses<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0430\u0434\u0440\u0435 (\u043a\u043e\u0434 \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0440\u044b\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c):<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def fetch_frames_to_poses(model, device, path: str, fps_user=None, frames_skip=None) -> List:     op = \"video_framer.fetch_frames_to_poses\"     try:         fps, duration = __video_info(path)     except ValueError as err:         raise ValueError(f\"{op}: {err}\")     if fps_user:         fps = fps_user     poses = []     cap = cv.VideoCapture(path)     try:         with tqdm(total=int(round(fps*duration))) as bar:             frames_counter = frames_skip             while cap.isOpened():                                     success, frame = cap.read()                 if success:                     # Skip frames                     if frames_skip:                         if frames_counter &lt; frames_skip:                             frames_counter += 1                             bar.update(1)                             continue                         else:                             frames_counter = 0<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-362786","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/362786","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=362786"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/362786\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=362786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=362786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}