{"id":369914,"date":"2024-05-21T04:13:54","date_gmt":"2024-05-21T04:13:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369914"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:13:54","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369914","title":{"rendered":"<span>\u041a\u0430\u043a \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/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>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435\u0443\u043a\u043b\u043e\u043d\u043d\u043e \u043f\u0440\u043e\u043d\u0438\u043a\u0430\u044e\u0442 \u0432\u043e \u0432\u0441\u0435 \u0441\u0444\u0435\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438, \u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044f\u0440\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a, \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d <abbr title=\"Large Language Models in Education, \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438\">LLM4EDU<\/abbr>. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c Gan W. \u0438 \u0441\u043e\u0430\u0432\u0442\u043e\u0440\u043e\u0432 <a href=\"https:\/\/arxiv.org\/abs\/2311.13160\" rel=\"noopener noreferrer nofollow\">[1]<\/a> LLM4EDU \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u043e\u0433\u0443\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vo\/l6\/mq\/vol6mqma-xsq9vi5be7qem5uioi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vo\/l6\/mq\/vol6mqma-xsq9vi5be7qem5uioi.png\"\/><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0444\u0435\u0440\u0435. \u0422\u0430\u043a, \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0430\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0432\u044b\u044f\u0432\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0440\u0435\u0434\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u0432 \u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 (\u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0438 \u0442.\u0434.);<\/p>\n<\/li>\n<li>\n<p>\u043e\u0446\u0435\u043d\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u0432, Completion Rate, Transformation Rate \/ Success Rate, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0441\u0435\u0449\u0430\u0435\u043c\u043e\u0441\u0442\u0438).<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c  \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u0439, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u043e\u0432 \u043e\u0431 \u0443\u0441\u043f\u0435\u0445\u0430\u0445 \u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u0430\u0445 \u0443\u0447\u0430\u0449\u0438\u0445\u0441\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438.<br \/> \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u043f\u043e\u0448\u043b\u0438 \u0438 \u043c\u044b.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0443 \u043d\u0430\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f <strong>\u043c\u043e\u0434\u0443\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0430\u0443\u0434\u0438\u043e<\/strong> \u0438 <strong>\u043c\u043e\u0434\u0443\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0438\u0434\u0435\u043e<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0441\u0432\u044f\u0437\u0438, \u0438\u0445 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u043d \u0438 \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043a\u0430\u0436\u0443\u0449\u0443\u044e\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041d\u0438\u0436\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 ?<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0430\u0443\u0434\u0438\u043e<\/h2>\n<p>\u0412 \u0430\u0443\u0434\u0438\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u043d. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0430\u0443\u0434\u0438\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0441\u043e\u0431\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c <strong>HuBERT fine-tuned on DUSHA dataset for speech emotion recognition in russian language<\/strong>. \u0414\u0430\u043d\u043d\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 Dusha, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439 \u0432 \u0443\u0441\u0442\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<br \/> \u041f\u043b\u044e\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>accuracy = 0.86<\/p>\n<\/li>\n<li>\n<p>balanced = 0.76<\/p>\n<\/li>\n<li>\n<p>macro f1 score = 0.81 on test set<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442 10 \u0434\u043e 95% (\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043e\u043a\u043e\u043b\u043e 65-70%).<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u0438\u0437 <a href=\"https:\/\/huggingface.co\/xbgoose\/hubert-large-speech-emotion-recognition-russian-dusha-finetuned\" rel=\"noopener noreferrer nofollow\">Hugging Face<\/a> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">from transformers import HubertForSequenceClassification, Wav2Vec2FeatureExtractor import torchaudio import torch  feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(\"facebook\/hubert-large-ls960-ft\") model_em = HubertForSequenceClassification.from_pretrained(\"xbgoose\/hubert-speech-emotion-recognition-russian-dusha-finetuned\") num2emo = {0: '\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f',                       1: '\u0437\u043b\u043e\u0441\u0442\u044c',                       2: '\u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u0430\u044f',                       3: '\u0433\u0440\u0443\u0441\u0442\u044c',                       4: '\u0434\u0440\u0443\u0433\u0430\u044f'}  def recognize_emotion(chunk):      \"\"\"\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u044d\u043c\u043e\u0446\u0438\u0438 \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432\"\"\"      waveform, sample_rate = torchaudio.load(chunk, normalize=True)     transform = torchaudio.transforms.Resample(sample_rate, 16000)     waveform = transform(waveform)      inputs = feature_extractor(             waveform,             sampling_rate=feature_extractor.sampling_rate,             return_tensors=\"pt\",             padding=True,             max_length=16000 * 10,             truncation=True         )      logits = model_em(inputs['input_values'][0]).logits     predictions = torch.argmax(logits, dim=-1)     predicted_emotion = num2emotion[predictions.numpy()[0]]     return predicted_emotion <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0442\u0438\u0448\u0438\u043d\u0443 \u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u043f\u0430\u0443\u0437\u0430\u043c \u0432 \u0440\u0435\u0447\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 pydub.<\/p>\n<pre><code class=\"python\"># !pip3 install pydub from pydub import AudioSegment from pydub.silence import split_on_silence  def split_audio_into_chunks(filepath):     \"\"\"\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0430\u0443\u0434\u0438\u043e \u043d\u0430 \u0447\u0430\u043d\u043a\u0438         \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439\"\"\"      # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b \u0441 pydub     sound = AudioSegment.from_file(filepath)      # \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0430\u0443\u0434\u0438\u043e \u043f\u043e \u0442\u0438\u0448\u0438\u043d\u0435 (700ms \u0438 \u0431\u043e\u043b\u044c\u0448\u0435)     chunks = split_on_silence(sound, min_silence_len=700, silence_thresh=sound.dBFS-14, keep_silence=700)     # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439     whole_emotions = []      for i, audio_chunk in enumerate(chunks, start=1):         # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0447\u0430\u043d\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u043e\u0432         # \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u0431\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044d\u043c\u043e\u0446\u0438\u0439         buffer = io.BytesIO()         audio_chunk.export(buffer, format=\"wav\")         buffer.seek(0)        # \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e         whole_emotions.append(recognize_emotion(buffer))     return whole_emotions <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u044d\u043c\u043e\u0446\u0438\u0439 \u0438\u0437 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0430 \u0432 \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0418\u0442\u0430\u043a, \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0430\u0443\u0434\u0438\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0437 \u0432\u0438\u0434\u0435\u043e.<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0438\u0434\u0435\u043e<\/h2>\n<p>\u041f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430 \u0432 \u043a\u0430\u0434\u0440\u0435, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0437\u0433\u043b\u044f\u0434\u0430, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Pygaze. \u0412\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e \u043b\u0438\u0446\u0430\/\u043b\u0438\u0446, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e \u043a\u0430\u043c\u0435\u0440\u044b, \u0443\u0433\u043b\u044b \u0432\u0437\u0433\u043b\u044f\u0434\u0430, \u043b\u0438\u0446\u0430, \u0444\u0430\u043a\u0442 \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u0432 \u043a\u0430\u043c\u0435\u0440\u0443:<\/p>\n<pre><code class=\"python\">#!pip3 install pygaze from pygaze import PyGaze, PyGazeRenderer import cv2 image = cv2.imread(\"jonas.jpg\") pg = PyGaze() print(pg.predict(image)) <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e \u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438. \u0421\u0440\u0435\u0434\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c <abbr title=\"Face expression recognition\">FER<\/abbr> \u0438 DeepFace.<br \/> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 FER DeepFace \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\"># !pip3 install deepFace import cv2 import matplotlib.pyplot as plt from deepface import DeepFace img = '\/content\/joseph-gonzalez-iFgRcqHznqg-unsplash.jpg' imageFace = cv2.imread(img) plt.imshow(imageFace[:,:,::-1]) analyze = DeepFace.analyze(img) print(analyze) <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/g7\/nk\/ql\/g7nkqlq1uvnx6srfacerg9k9oda.png\" data-src=\"https:\/\/habrastorage.org\/webt\/g7\/nk\/ql\/g7nkqlq1uvnx6srfacerg9k9oda.png\"\/><\/figure>\n<p><em>\u0424\u043e\u0442\u043e \u0432\u0437\u044f\u0442\u043e \u0441 <\/em><a href=\"https:\/\/unsplash.com\/\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/unsplash.com\/<\/em><\/a> <\/p>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0444\u0440\u0435\u0439\u043c\u044b \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421 \u044d\u0442\u0438\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 imageio:<\/p>\n<pre><code class=\"python\">#!pip3 install imageio[pyav] import imageio.v3 as iio for i, frame in enumerate(iio.imiter(video_file_path, plugin=\"pyav\")):     face = DeepFace.analyze(img)     print(face)     gaze = pg.predict(image)     print(gaze) <\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438 \u0432 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u043e\u043d\u0435 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0438 \u0443\u0447\u0438\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0438\u0442\u0435\u043b\u044f \u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0447\u0438\u0442\u0435\u043b\u044f, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \ud83d\ude42<\/p>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u043c\u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u0432, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u043d\u043e \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 XXI \u0432\u0435\u043a\u0430.<\/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\/797995\/\"> https:\/\/habr.com\/ru\/articles\/797995\/<\/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>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043d\u0435\u0443\u043a\u043b\u043e\u043d\u043d\u043e \u043f\u0440\u043e\u043d\u0438\u043a\u0430\u044e\u0442 \u0432\u043e \u0432\u0441\u0435 \u0441\u0444\u0435\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438, \u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044f\u0440\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0430\u043a, \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d <abbr title=\"Large Language Models in Education, \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438\">\u0435\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438&#187;>LLM4ED<\/abbr>. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c Gan W. \u0438 \u0441\u043e\u0430\u0432\u0442\u043e\u0440\u043e\u0432 <a href=\"https:\/\/arxiv.org\/abs\/2311.13160\" rel=\"noopener noreferrer nofollow\">[1]<\/a> LLM4EDU \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u043e\u0433\u0443\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0444\u0435\u0440\u0435. \u0422\u0430\u043a, \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0430\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0432\u044b\u044f\u0432\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0440\u0435\u0434\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u0432 \u0441 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 (\u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0438 \u0442.\u0434.);<\/p>\n<\/li>\n<li>\n<p>\u043e\u0446\u0435\u043d\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u0432, Completion Rate, Transformation Rate \/ Success Rate, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0441\u0435\u0449\u0430\u0435\u043c\u043e\u0441\u0442\u0438).<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c  \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u0439, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u043e\u0432 \u043e\u0431 \u0443\u0441\u043f\u0435\u0445\u0430\u0445 \u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u0430\u0445 \u0443\u0447\u0430\u0449\u0438\u0445\u0441\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438.<br \/> \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u043f\u043e\u0448\u043b\u0438 \u0438 \u043c\u044b.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0443 \u043d\u0430\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f <strong>\u043c\u043e\u0434\u0443\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0430\u0443\u0434\u0438\u043e<\/strong> \u0438 <strong>\u043c\u043e\u0434\u0443\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0438\u0434\u0435\u043e<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0441\u0432\u044f\u0437\u0438, \u0438\u0445 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u043d \u0438 \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043a\u0430\u0436\u0443\u0449\u0443\u044e\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041d\u0438\u0436\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 ?<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0430\u0443\u0434\u0438\u043e<\/h2>\n<p>\u0412 \u0430\u0443\u0434\u0438\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u043d. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0430\u0443\u0434\u0438\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0441\u043e\u0431\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c <strong>HuBERT fine-tuned on DUSHA dataset for speech emotion recognition in russian language<\/strong>. \u0414\u0430\u043d\u043d\u0430\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 Dusha, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439 \u0432 \u0443\u0441\u0442\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<br \/> \u041f\u043b\u044e\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>accuracy = 0.86<\/p>\n<\/li>\n<li>\n<p>balanced = 0.76<\/p>\n<\/li>\n<li>\n<p>macro f1 score = 0.81 on test set<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442 10 \u0434\u043e 95% (\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043e\u043a\u043e\u043b\u043e 65-70%).<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u0438\u0437 <a href=\"https:\/\/huggingface.co\/xbgoose\/hubert-large-speech-emotion-recognition-russian-dusha-finetuned\" rel=\"noopener noreferrer nofollow\">Hugging Face<\/a> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">from transformers import HubertForSequenceClassification, Wav2Vec2FeatureExtractor import torchaudio import torch  feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(\"facebook\/hubert-large-ls960-ft\") model_em = HubertForSequenceClassification.from_pretrained(\"xbgoose\/hubert-speech-emotion-recognition-russian-dusha-finetuned\") num2emo = {0: '\u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f',                       1: '\u0437\u043b\u043e\u0441\u0442\u044c',                       2: '\u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u0430\u044f',                       3: '\u0433\u0440\u0443\u0441\u0442\u044c',                       4: '\u0434\u0440\u0443\u0433\u0430\u044f'}  def recognize_emotion(chunk):      \"\"\"\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u044d\u043c\u043e\u0446\u0438\u0438 \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432\"\"\"      waveform, sample_rate = torchaudio.load(chunk, normalize=True)     transform = torchaudio.transforms.Resample(sample_rate, 16000)     waveform = transform(waveform)      inputs = feature_extractor(             waveform,             sampling_rate=feature_extractor.sampling_rate,             return_tensors=\"pt\",             padding=True,             max_length=16000 * 10,             truncation=True         )      logits = model_em(inputs['input_values'][0]).logits     predictions = torch.argmax(logits, dim=-1)     predicted_emotion = num2emotion[predictions.numpy()[0]]     return predicted_emotion <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0442\u0438\u0448\u0438\u043d\u0443 \u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043f\u043e \u043f\u0430\u0443\u0437\u0430\u043c \u0432 \u0440\u0435\u0447\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 pydub.<\/p>\n<pre><code class=\"python\"># !pip3 install pydub from pydub import AudioSegment from pydub.silence import split_on_silence  def split_audio_into_chunks(filepath):     \"\"\"\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0430\u0443\u0434\u0438\u043e \u043d\u0430 \u0447\u0430\u043d\u043a\u0438         \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439\"\"\"      # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b \u0441 pydub     sound = AudioSegment.from_file(filepath)      # \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0430\u0443\u0434\u0438\u043e \u043f\u043e \u0442\u0438\u0448\u0438\u043d\u0435 (700ms \u0438 \u0431\u043e\u043b\u044c\u0448\u0435)     chunks = split_on_silence(sound, min_silence_len=700, silence_thresh=sound.dBFS-14, keep_silence=700)     # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u043e\u0446\u0438\u0439     whole_emotions = []      for i, audio_chunk in enumerate(chunks, start=1):         # \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0447\u0430\u043d\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u043e\u0432         # \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0438\u0445 \u0432 \u0431\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044d\u043c\u043e\u0446\u0438\u0439         buffer = io.BytesIO()         audio_chunk.export(buffer, format=\"wav\")         buffer.seek(0)        # \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e         whole_emotions.append(recognize_emotion(buffer))     return whole_emotions <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u044d\u043c\u043e\u0446\u0438\u0439 \u0438\u0437 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0430 \u0432 \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0418\u0442\u0430\u043a, \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0430\u0443\u0434\u0438\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0437 \u0432\u0438\u0434\u0435\u043e.<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0438\u0434\u0435\u043e<\/h2>\n<p>\u041f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430 \u0432 \u043a\u0430\u0434\u0440\u0435, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0437\u0433\u043b\u044f\u0434\u0430, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Pygaze. \u0412\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e \u043b\u0438\u0446\u0430\/\u043b\u0438\u0446, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e \u043a\u0430\u043c\u0435\u0440\u044b, \u0443\u0433\u043b\u044b \u0432\u0437\u0433\u043b\u044f\u0434\u0430, \u043b\u0438\u0446\u0430, \u0444\u0430\u043a\u0442 \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u0432 \u043a\u0430\u043c\u0435\u0440\u0443:<\/p>\n<pre><code class=\"python\">#!pip3 install pygaze from pygaze import PyGaze, PyGazeRenderer import cv2 image = cv2.imread(\"jonas.jpg\") pg = PyGaze() print(pg.predict(image)) <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e \u0432\u0438\u0434\u0435\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u044d\u043c\u043e\u0446\u0438\u0438. \u0421\u0440\u0435\u0434\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c <abbr title=\"Face expression recognition\">FER<\/abbr> \u0438 DeepFace.<br \/> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 FER DeepFace \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\"># !pip3 install deepFace import cv2 import matplotlib.pyplot as plt from deepface import DeepFace img = '\/content\/joseph-gonzalez-iFgRcqHznqg-unsplash.jpg' imageFace = cv2.imread(img) plt.imshow(imageFace[:,:,::-1]) analyze = DeepFace.analyze(img) print(analyze) <\/code><\/pre>\n<figure class=\"\"><\/figure>\n<p><em>\u0424\u043e\u0442\u043e \u0432\u0437\u044f\u0442\u043e \u0441 <\/em><a href=\"https:\/\/unsplash.com\/\" rel=\"noopener noreferrer nofollow\"><em>https:\/\/unsplash.com\/<\/em><\/a> <\/p>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0444\u0440\u0435\u0439\u043c\u044b \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421 \u044d\u0442\u0438\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 imageio:<\/p>\n<pre><code class=\"python\">#!pip3 install imageio[pyav] import imageio.v3 as iio for i, frame in enumerate(iio.imiter(video_file_path, plugin=\"pyav\")):     face = DeepFace.analyze(img)     print(face)     gaze = pg.predict(image)     print(gaze) <\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438 \u0432 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u043e\u043d\u0435 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0438 \u0443\u0447\u0438\u0442\u0435\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0438\u0442\u0435\u043b\u044f \u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0440\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0435\u043d\u0438\u043a\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0447\u0438\u0442\u0435\u043b\u044f, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \ud83d\ude42<\/p>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u043c\u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u0432, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u043d\u0438\u044f, \u043d\u043e \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 XXI \u0432\u0435\u043a\u0430.<\/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\/797995\/\"> https:\/\/habr.com\/ru\/articles\/797995\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-369914","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369914","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=369914"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369914\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}