{"id":345669,"date":"2023-02-19T21:02:22","date_gmt":"2023-02-19T21:02:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345669"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345669","title":{"rendered":"<span>\u0414\u0435\u043b\u0430\u0435\u043c \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0430 Nvidia Triton Inference Server<\/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\u043e\u043a\u0440\u0443\u0433 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0435\u0431\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445. \u0422\u0430\u043a \u0438 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u044d\u0442\u043e\u0442 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441, \u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0435 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441 \u043d\u0443\u043b\u044f, \u0430 \u0432\u0437\u044f\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u0411\u044b\u043b\u0430 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438), \u043d\u043e \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0442\u043a\u0430 \u043f\u043e\u0434 \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e \u0438 \u043f\u043e\u0434 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e);<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u0435\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 pytorch (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0435\u0433\u043e \u0437\u043d\u0430\u044e).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439. \u041c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/github.com\/EtokonE\/License_Plate_Recognition\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a>.<\/p>\n<p>\u041f\u0430\u0439\u043b\u043f\u0430\u0439\u043d \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u0442\u0435\u043a\u0446\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Yolov5;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Spatial transformer \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442\u0441\u044f \u0441 LPR-net.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u0435\u0442\u043a\u0438, \u043d\u0435 \u0431\u0443\u0434\u0443 (<a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0435\u0442\u043a\u0438, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e).<\/p>\n<h2>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430, \u043a\u043e\u0434 \u0441 \u043d\u0438\u043c\u0438 \u0431\u044b\u043b \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043a\u0435\u0442<\/a>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0435\u0442\u043a\u0438.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d <a href=\"https:\/\/python-poetry.org\/\" rel=\"noopener noreferrer nofollow\">Poetry<\/a>. \u0425\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0446, \u0438 \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u0434. <code>Poetry<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439) \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <code>poetry.lock<\/code>, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0412\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0431\u044b\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u041d\u0435\u043e\u0445\u043e\u0442\u0430 \u0438\u0445 \u043a\u0443\u0434\u0430-\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u044b \u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u043b;<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u043b\u0435\u0433\u0447\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043a\u0430\u0447\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u0443\u043c\u0430\u0442\u044c, \u043f\u043e\u0434 \u043a\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u043a\u0430\u043a\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c);<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0438 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u044f\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\/tests\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432<\/a>.<\/p>\n<h2>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/h2>\n<p>\u0414\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/developer.nvidia.com\/nvidia-triton-inference-server\" rel=\"noopener noreferrer nofollow\">Nvidia Triton Inference Server<\/a> (\u0434\u0430\u043b\u0435\u0435 Triton).<\/p>\n<p>\u042f \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e Triton \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0433\u0440\u0443\u0437\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 shared memory, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0418 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u0445 Nvidia;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. Triton \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0430 \u0447\u0430\u0441\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 <a href=\"https:\/\/github.com\/triton-inference-server\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u043d\u044b\u0445<\/a> \u043f\u043e GitHub-\u0443 \u0440\u0438\u0434\u043c\u0438, \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/index.html\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<h2>Pytorch \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Triton \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/model_repository.html\" rel=\"noopener noreferrer nofollow\">model_repository<\/a>. \u041e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043e\u043f\u0438\u0441\u0430\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n<p>\u041f\u0430\u043f\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0435\u0451 \u0432\u0435\u0441\u0430.<\/p>\n<p>Triton \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e <a href=\"https:\/\/github.com\/triton-inference-server\/backend#where-can-i-find-all-the-backends-that-are-available-for-triton\" rel=\"noopener noreferrer nofollow\">\u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a\u043e\u0432<\/a> (\u0431\u0435\u043a\u0435\u043d\u0434\u043e\u0432) \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u043e\u043a. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f Pytorch \u0438 Python.<\/p>\n<p><a href=\"https:\/\/github.com\/triton-inference-server\/pytorch_backend\" rel=\"noopener noreferrer nofollow\">Pytorch<\/a> \u0431\u0435\u043a\u0435\u043d\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u043d\u0438\u0442\u044c TorchScript \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0438. \u0412 \u043d\u0435\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/lprnet\" rel=\"noopener noreferrer nofollow\">LPR-net<\/a> \u0438 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/stn\" rel=\"noopener noreferrer nofollow\">STN<\/a>. <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 STN. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>1. <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/scripts\/prepare_stn.py\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c<\/a> \u0432 TorchScript<\/p>\n<pre><code class=\"python\">dummy_input = torch.randn(1, 3, 24, 94, device=device) model = load_stn(settings.STN.WEIGHTS, device) traced_model = torch.jit.trace(model, [dummy_input])<\/code><\/pre>\n<p>2. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. Triton \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u043a \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0434\u0435.<\/p>\n<pre><code class=\"python\">model_path = (         Path(__file__).resolve().parents[1]         \/ \"model_repository\"         \/ \"stn\"         \/ \"1\"         \/ \"model.pt\"     ) traced_model.save(model_path)<\/code><\/pre>\n<p>3. \u0417\u0430\u0434\u0430\u0435\u043c <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/model_configuration.html\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c &#8212; \u0431\u0435\u043a\u0435\u043d\u0434, \u0431\u0430\u0442\u0447\u0430\u0439\u0441\u0437 (\u0447\u0442\u043e\u0431\u044b Triton \u043c\u043e\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0438\u0442\u044c \u0431\u0430\u0442\u0447\u0430\u043c\u0438), \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/stn\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/a>:<\/p>\n<pre><code>backend: \"pytorch\" max_batch_size: 32 input [     {         name: \"input__0\"         data_type: TYPE_FP32         dims: [ 3, 24, 94 ]     } ] output [     {         name: \"output__0\"         data_type: TYPE_FP32         dims: [ 3, 24, 94 ]     } ]<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0438\u0436\u043d\u0438\u0435 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u0432. \u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/model_configuration.md#special-conventions-for-pytorch-backend\" rel=\"noopener noreferrer nofollow\">\u0444\u043e\u0440\u043c\u0430\u0442<\/a> \u0434\u043b\u044f Pytorch \u0431\u0435\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/829\/35b\/441\/82935b441e22418cd4aa95ba2c6b06c4.png\" alt=\"\u041f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e STN\" title=\"\u041f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e STN\" width=\"166\" height=\"93\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/829\/35b\/441\/82935b441e22418cd4aa95ba2c6b06c4.png\"\/><figcaption>\u041f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e STN<\/figcaption><\/figure>\n<h2>Python \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u043c\u043e\u0434\u0435\u043b\u0438, \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend\" rel=\"noopener noreferrer nofollow\">Python<\/a> \u0431\u0435\u043a\u0435\u043d\u0434. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 yolo \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0432 \u043d\u0435\u0435 numpy \u0438\u043b\u0438 torch \u0442\u0435\u043d\u0437\u043e\u0440. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435- \u0438 \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433  \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d Python \u0431\u0435\u043a\u0435\u043d\u0434.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043a\u0438 \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0435\u0441\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0444\u0430\u0439\u043b <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/yolo\/1\/model.py#L39\" rel=\"noopener noreferrer nofollow\">model.py<\/a>. \u0412 \u043d\u0435\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#usage\" rel=\"noopener noreferrer nofollow\">TritonPythonModel<\/a>. \u0412 \u043d\u0435\u043c \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c:<\/p>\n<pre><code class=\"python\">def initialize(self, args):     self.model_config = json.loads(args[\"model_config\"])     self.model = load_yolo(         settings.YOLO.WEIGHTS, settings.YOLO.CONFIDENCE, torch.device(\"cuda\")     )<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0435\u0433\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u044b \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u044b:<\/p>\n<pre><code class=\"python\">def execute(     self, requests: List[pb_utils.InferenceRequest] ) -> List[pb_utils.InferenceRequest]:      responses = []      for request in requests:         image = pb_utils.get_input_tensor_by_name(request, \"input__0\").as_numpy()         image = prepare_detection_input(image)          detection = self.model(image, size=settings.YOLO.PREDICT_SIZE)          df_results = detection.pandas().xyxy[0]         img_plates = prepare_recognition_input(             df_results, image, return_torch=False         )          out_tensor_0 = pb_utils.Tensor(             \"output__0\", img_plates.astype(self.output0_dtype)         )         out_tensor_1 = pb_utils.Tensor(             \"output__1\",             df_results[[\"xmin\", \"ymin\", \"xmax\", \"ymax\"]]             .to_numpy()             .astype(self.output1_dtype),         )          inference_response = pb_utils.InferenceResponse(             output_tensors=[out_tensor_0, out_tensor_1]         )         responses.append(inference_response)      return responses<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Triton \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u0435\u043a\u0435\u043d\u0434\u0435 Python.<\/p>\n<p>\u0412 Docker <a href=\"https:\/\/catalog.ngc.nvidia.com\/orgs\/nvidia\/containers\/tritonserver\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u0440\u0430\u0437\u0430\u0445<\/a> Triton \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Python 3.8. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e. \u042f \u043f\u043e\u0448\u0451\u043b \u043f\u0440\u043e\u0449\u0435, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b 3.8 ?.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u0435\u0437 pip \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430. \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Poetry \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 Python, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u043e\u0441\u0442\u044b\u043b\u0438\u043b \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b Poetry <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/041c4be1c51b76999e725884d418b53ad85ef5ab\/inference_triton\/docker\/Dockerfiles\/DockerfileTriton#L23\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/a> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 requirements.txt. \u0418\u0445 \u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/041c4be1c51b76999e725884d418b53ad85ef5ab\/inference_triton\/docker\/Dockerfiles\/DockerfileTriton#L40\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b<\/a> \u0447\u0435\u0440\u0435\u0437 pip.<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u043a\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0437\u044b \u0442\u0440\u0438\u0442\u043e\u043d\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 <strong><em>401 unauthorized<\/em><\/strong>, \u0442\u043e <a href=\"https:\/\/stackoverflow.com\/questions\/70970424\/docker-build-docker-compose-up-error-unknown-desc-failed-to-fetch-anonymous\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u043b\u043e\u0433\u0438\u043d\u044c\u0442\u0435\u0441\u044c<\/a> \u0432 nvcr.io<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/yolo\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u044e<\/a>. \u0422\u0443\u0442 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0434\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0432\u044b\u0445\u043e\u0434\u0430. \u0411\u0430\u0442\u0447 \u0441\u0430\u0439\u0437 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d 0, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430\u0445 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0441\u043b\u0435 yolo \u0441\u0435\u0442\u043e\u043a \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0431\u0430\u0442\u0447 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 <strong><em>max_batch_size: 0<\/em><\/strong>, \u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/model_configuration.md#maximum-batch-size\" rel=\"noopener noreferrer nofollow\">\u044f\u0432\u043d\u043e<\/a> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0430\u0442\u0447 \u0434\u0438\u043c\u0435\u0448\u043d.<\/p>\n<\/div>\n<\/details>\n<pre><code>backend: \"python\" max_batch_size: 0 input [     {         name: \"input__0\"         data_type: TYPE_UINT8         dims: [ -1, -1, 3 ]     } ] output [     {         name: \"output__0\"         data_type: TYPE_FP32         dims: [ -1, 3, 24, 94 ]     },     {         name: \"output__1\"         data_type: TYPE_FP32         dims: [ -1, 4 ]     } ]<\/code><\/pre>\n<h2>\u0413\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 Triton \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/architecture.md#ensemble-models\" rel=\"noopener noreferrer nofollow\">Ensembling<\/a> \u0438 <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#business-logic-scripting\" rel=\"noopener noreferrer nofollow\">Business Logic Scripting<\/a> (BLS).<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 STN \u0438 LPR-net \u0432 \u043e\u0434\u043d\u0443 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u043c), \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u0430 \u043d\u0430 Python \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (\u0441 \u0446\u0438\u043a\u043b\u0430\u043c\u0438, \u0432\u044b\u0445\u043e\u0434\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443).<\/p>\n<p>\u0411\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e BLS, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0435\u0441\u043b\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 LPR-net (\u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u043e\u043c\u0435\u0440\u0430).<\/p>\n<p>\u0414\u043b\u044f Triton-\u0430 \u043d\u0430\u0448\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/plate_recognition\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0434\u0435\u043b\u044c\u044e<\/a> \u0441 \u043d\u0430 Python \u0431\u0435\u043a\u0435\u043d\u0434\u0435.<\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0441\u043b\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<pre><code class=\"python\">cropped_images, coordinates = self.predict(     model_name=\"yolo\",     ... )  num_plates = from_dlpack(coordinates.to_dlpack()).shape[0] if num_plates == 0:     ...     continue  (plate_features,) = self.predict(     model_name=\"stn\",     ... )  (text_features,) = self.predict(     model_name=\"lprnet\",     ... )<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u043b\u0438\u0448\u043d\u0438\u0445 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0413\u041f\u0423 \u0438 \u0426\u041f\u0423, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#interoperability-and-gpu-support\" rel=\"noopener noreferrer nofollow\">dlpack<\/a>. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c torch \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0432 Triton \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/plate_recognition\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0430\u044f<\/a> \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 Python \u0431\u0435\u043a\u0435\u043d\u0434\u0435.<\/p>\n<pre><code>backend: \"python\" max_batch_size: 0 input [     {         name: \"input__0\"         data_type: TYPE_UINT8         dims: [ -1, -1, 3 ]     } ] output [     {         name: \"coordinates\"         data_type: TYPE_FP32         dims: [ -1, 4 ]     },     {         name: \"texts\"         data_type: TYPE_STRING         dims: [ -1, 1 ]     } ]<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>Triton <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/tests\/functional\/test_models.py\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442<\/a> shared memory \u0434\u043b\u044f Python \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0435\u0431\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 kubernetes, \u043e\u043d \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f, \u043a\u0443\u0434\u0430 \u0436\u0435 \u043e\u043d\u0430 \u0434\u0435\u043b\u0430\u0441\u044c. \u041a\u043e\u0441\u0442\u044b\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442\u044c &#8212; \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043b\u044c\u044e\u043c \u043f\u043e \u043f\u0443\u0442\u0438, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u044d\u0442\u0430 shared memory.<\/p>\n<\/div>\n<\/details>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u044b. Triton \u0440\u0430\u043f\u043e\u0440\u0442\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f16\/5d3\/d34\/f165d3d34b1158882731b3405c550712.png\" alt=\"\u041b\u043e\u0433 \u0442\u0440\u0438\u0442\u043e\u043d\u0430\" title=\"\u041b\u043e\u0433 \u0442\u0440\u0438\u0442\u043e\u043d\u0430\" width=\"373\" height=\"153\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f16\/5d3\/d34\/f165d3d34b1158882731b3405c550712.png\"\/><figcaption>\u041b\u043e\u0433 \u0442\u0440\u0438\u0442\u043e\u043d\u0430<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0432 Triton \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 <em>plate_recognition<\/em> (\u0442\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u043d\u0430\u0448 \u0433\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439\/\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432). \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e HTTP \u0438\u043b\u0438 gRPC \u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/triton-inference-server\/client\" rel=\"noopener noreferrer nofollow\">tritonclient<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/tests\/functional\/test_models.py\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u0430\u0445<\/a>.<\/p>\n<pre><code class=\"python\">triton_client = httpclient.InferenceServerClient(url=\"localhost:8000\") model_name = \"plate_recognition\" image = cv2.imread(img_path)  inputs, outputs = [], []  inputs.append(httpclient.InferInput(\"input__0\", image.shape, \"UINT8\")) inputs[0].set_data_from_numpy(image)  outputs.append(httpclient.InferRequestedOutput(\"coordinates\", binary_data=False)) outputs.append(httpclient.InferRequestedOutput(\"texts\", binary_data=False))  results = triton_client.infer(     model_name=model_name,     inputs=inputs,     outputs=outputs, )  coordinates = results.as_numpy(\"coordinates\") texts = results.as_numpy(\"texts\")<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0443 \u0432\u043e\u0442 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u043d\u043e \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 \u0444\u0438\u0448\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u0440\u043a\u0430 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430.<\/p>\n<p>\u0421\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u043e:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/rate_limiter.html\" rel=\"noopener noreferrer nofollow\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435<\/a> \u0447\u0438\u0441\u043b\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/decoupled_models.html\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/a> \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/response_cache.html\" rel=\"noopener noreferrer nofollow\">\u041a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u043e\u0442\u0432\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/perf_analyzer.html\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0430\u043b\u0438\u0437\u0430<\/a> \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0418 \u0435\u0449\u0435 <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/index.html\" rel=\"noopener noreferrer nofollow\">\u043c\u043d\u043e\u0433\u043e<\/a> \u0447\u0435\u0433\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 Triton-\u0430 \u0435\u0441\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u044f examples (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend\/tree\/main\/examples\" rel=\"noopener noreferrer nofollow\">Python<\/a>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043d\u0430 <a href=\"https:\/\/pytorch.org\/serve\/\" rel=\"noopener noreferrer nofollow\">TorchServe<\/a>. \u0410 \u043f\u043e\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 <a href=\"https:\/\/t.me\/yet_another_mle\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c<\/a> \u043a\u0430\u043d\u0430\u043b. \u0422\u0430\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u0440\u043e \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438 \u0441 \u0443\u043f\u043e\u0440\u043e\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u043d\u0433.<\/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\/post\/717890\/\"> https:\/\/habr.com\/ru\/post\/717890\/<\/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\u043e\u043a\u0440\u0443\u0433 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0435\u0431\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445. \u0422\u0430\u043a \u0438 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u044d\u0442\u043e\u0442 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441, \u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0435 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441 \u043d\u0443\u043b\u044f, \u0430 \u0432\u0437\u044f\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>\u0411\u044b\u043b\u0430 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438), \u043d\u043e \u0438 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0442\u043a\u0430 \u043f\u043e\u0434 \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u044e \u0438 \u043f\u043e\u0434 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e);<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u0435\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 pytorch (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0435\u0433\u043e \u0437\u043d\u0430\u044e).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u0435\u0439. \u041c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/github.com\/EtokonE\/License_Plate_Recognition\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a>.<\/p>\n<p>\u041f\u0430\u0439\u043b\u043f\u0430\u0439\u043d \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u0442\u0435\u043a\u0446\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Yolov5;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Spatial transformer \u0434\u043b\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442\u0441\u044f \u0441 LPR-net.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u0435\u0442\u043a\u0438, \u043d\u0435 \u0431\u0443\u0434\u0443 (<a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0435\u0442\u043a\u0438, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e).<\/p>\n<h2>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430, \u043a\u043e\u0434 \u0441 \u043d\u0438\u043c\u0438 \u0431\u044b\u043b \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043a\u0435\u0442<\/a>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0435\u0442\u043a\u0438.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d <a href=\"https:\/\/python-poetry.org\/\" rel=\"noopener noreferrer nofollow\">Poetry<\/a>. \u0425\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0446, \u0438 \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u0434. <code>Poetry<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439) \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <code>poetry.lock<\/code>, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0412\u0435\u0441\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0431\u044b\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e:<\/p>\n<ol>\n<li>\n<p>\u041d\u0435\u043e\u0445\u043e\u0442\u0430 \u0438\u0445 \u043a\u0443\u0434\u0430-\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u044b \u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u043b;<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u043b\u0435\u0433\u0447\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043a\u0430\u0447\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0434\u0443\u043c\u0430\u0442\u044c, \u043f\u043e\u0434 \u043a\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u043a\u0430\u043a\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c);<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0438 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u044f\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/nn\/tests\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432<\/a>.<\/p>\n<h2>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a<\/h2>\n<p>\u0414\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/developer.nvidia.com\/nvidia-triton-inference-server\" rel=\"noopener noreferrer nofollow\">Nvidia Triton Inference Server<\/a> (\u0434\u0430\u043b\u0435\u0435 Triton).<\/p>\n<p>\u042f \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e Triton \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0433\u0440\u0443\u0437\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 shared memory, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0418 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u0445 Nvidia;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. Triton \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0430 \u0447\u0430\u0441\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 <a href=\"https:\/\/github.com\/triton-inference-server\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u043d\u044b\u0445<\/a> \u043f\u043e GitHub-\u0443 \u0440\u0438\u0434\u043c\u0438, \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/index.html\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<h2>Pytorch \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Triton \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/model_repository.html\" rel=\"noopener noreferrer nofollow\">model_repository<\/a>. \u041e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043e\u043f\u0438\u0441\u0430\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n<p>\u041f\u0430\u043f\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0435\u0451 \u0432\u0435\u0441\u0430.<\/p>\n<p>Triton \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e <a href=\"https:\/\/github.com\/triton-inference-server\/backend#where-can-i-find-all-the-backends-that-are-available-for-triton\" rel=\"noopener noreferrer nofollow\">\u0444\u0440\u0435\u0439\u043c\u043e\u0432\u043e\u0440\u043a\u043e\u0432<\/a> (\u0431\u0435\u043a\u0435\u043d\u0434\u043e\u0432) \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u043e\u043a. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f Pytorch \u0438 Python.<\/p>\n<p><a href=\"https:\/\/github.com\/triton-inference-server\/pytorch_backend\" rel=\"noopener noreferrer nofollow\">Pytorch<\/a> \u0431\u0435\u043a\u0435\u043d\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u043d\u0438\u0442\u044c TorchScript \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0438. \u0412 \u043d\u0435\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/lprnet\" rel=\"noopener noreferrer nofollow\">LPR-net<\/a> \u0438 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/stn\" rel=\"noopener noreferrer nofollow\">STN<\/a>. <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 STN. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>1. <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/scripts\/prepare_stn.py\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c<\/a> \u0432 TorchScript<\/p>\n<pre><code class=\"python\">dummy_input = torch.randn(1, 3, 24, 94, device=device) model = load_stn(settings.STN.WEIGHTS, device) traced_model = torch.jit.trace(model, [dummy_input])<\/code><\/pre>\n<p>2. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. Triton \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u043a \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0434\u0435.<\/p>\n<pre><code class=\"python\">model_path = (         Path(__file__).resolve().parents[1]         \/ \"model_repository\"         \/ \"stn\"         \/ \"1\"         \/ \"model.pt\"     ) traced_model.save(model_path)<\/code><\/pre>\n<p>3. \u0417\u0430\u0434\u0430\u0435\u043c <a href=\"https:\/\/docs.nvidia.com\/deeplearning\/triton-inference-server\/user-guide\/docs\/user_guide\/model_configuration.html\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c &#8212; \u0431\u0435\u043a\u0435\u043d\u0434, \u0431\u0430\u0442\u0447\u0430\u0439\u0441\u0437 (\u0447\u0442\u043e\u0431\u044b Triton \u043c\u043e\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0438\u0442\u044c \u0431\u0430\u0442\u0447\u0430\u043c\u0438), \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/stn\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c<\/a>:<\/p>\n<pre><code>backend: \"pytorch\" max_batch_size: 32 input [     {         name: \"input__0\"         data_type: TYPE_FP32         dims: [ 3, 24, 94 ]     } ] output [     {         name: \"output__0\"         data_type: TYPE_FP32         dims: [ 3, 24, 94 ]     } ]<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0438\u0436\u043d\u0438\u0435 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u0432. \u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/model_configuration.md#special-conventions-for-pytorch-backend\" rel=\"noopener noreferrer nofollow\">\u0444\u043e\u0440\u043c\u0430\u0442<\/a> \u0434\u043b\u044f Pytorch \u0431\u0435\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e<\/p>\n<figure class=\"\"><figcaption>\u041f\u0430\u043f\u043a\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e STN<\/figcaption><\/figure>\n<h2>Python \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u043c\u043e\u0434\u0435\u043b\u0438, \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend\" rel=\"noopener noreferrer nofollow\">Python<\/a> \u0431\u0435\u043a\u0435\u043d\u0434. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 yolo \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0432 \u043d\u0435\u0435 numpy \u0438\u043b\u0438 torch \u0442\u0435\u043d\u0437\u043e\u0440. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435- \u0438 \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433  \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d Python \u0431\u0435\u043a\u0435\u043d\u0434.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043a\u0438 \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0435\u0441\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0444\u0430\u0439\u043b <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/yolo\/1\/model.py#L39\" rel=\"noopener noreferrer nofollow\">model.py<\/a>. \u0412 \u043d\u0435\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#usage\" rel=\"noopener noreferrer nofollow\">TritonPythonModel<\/a>. \u0412 \u043d\u0435\u043c \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c:<\/p>\n<pre><code class=\"python\">def initialize(self, args):     self.model_config = json.loads(args[\"model_config\"])     self.model = load_yolo(         settings.YOLO.WEIGHTS, settings.YOLO.CONFIDENCE, torch.device(\"cuda\")     )<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0435\u0433\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u044b \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u044b:<\/p>\n<pre><code class=\"python\">def execute(     self, requests: List[pb_utils.InferenceRequest] ) -> List[pb_utils.InferenceRequest]:      responses = []      for request in requests:         image = pb_utils.get_input_tensor_by_name(request, \"input__0\").as_numpy()         image = prepare_detection_input(image)          detection = self.model(image, size=settings.YOLO.PREDICT_SIZE)          df_results = detection.pandas().xyxy[0]         img_plates = prepare_recognition_input(             df_results, image, return_torch=False         )          out_tensor_0 = pb_utils.Tensor(             \"output__0\", img_plates.astype(self.output0_dtype)         )         out_tensor_1 = pb_utils.Tensor(             \"output__1\",             df_results[[\"xmin\", \"ymin\", \"xmax\", \"ymax\"]]             .to_numpy()             .astype(self.output1_dtype),         )          inference_response = pb_utils.InferenceResponse(             output_tensors=[out_tensor_0, out_tensor_1]         )         responses.append(inference_response)      return responses<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Triton \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u0435\u043a\u0435\u043d\u0434\u0435 Python.<\/p>\n<p>\u0412 Docker <a href=\"https:\/\/catalog.ngc.nvidia.com\/orgs\/nvidia\/containers\/tritonserver\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u0440\u0430\u0437\u0430\u0445<\/a> Triton \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Python 3.8. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e. \u042f \u043f\u043e\u0448\u0451\u043b \u043f\u0440\u043e\u0449\u0435, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b 3.8 ?.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u0435\u0437 pip \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430. \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Poetry \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 Python, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u043e\u0441\u0442\u044b\u043b\u0438\u043b \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b Poetry <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/041c4be1c51b76999e725884d418b53ad85ef5ab\/inference_triton\/docker\/Dockerfiles\/DockerfileTriton#L23\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/a> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 requirements.txt. \u0418\u0445 \u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/041c4be1c51b76999e725884d418b53ad85ef5ab\/inference_triton\/docker\/Dockerfiles\/DockerfileTriton#L40\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b<\/a> \u0447\u0435\u0440\u0435\u0437 pip.<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u043a\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0437\u044b \u0442\u0440\u0438\u0442\u043e\u043d\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 <strong><em>401 unauthorized<\/em><\/strong>, \u0442\u043e <a href=\"https:\/\/stackoverflow.com\/questions\/70970424\/docker-build-docker-compose-up-error-unknown-desc-failed-to-fetch-anonymous\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u043b\u043e\u0433\u0438\u043d\u044c\u0442\u0435\u0441\u044c<\/a> \u0432 nvcr.io<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/yolo\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u044e<\/a>. \u0422\u0443\u0442 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0434\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0432\u044b\u0445\u043e\u0434\u0430. \u0411\u0430\u0442\u0447 \u0441\u0430\u0439\u0437 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d 0, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430\u0445 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0441\u043b\u0435 yolo \u0441\u0435\u0442\u043e\u043a \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0431\u0430\u0442\u0447 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 <strong><em>max_batch_size: 0<\/em><\/strong>, \u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/model_configuration.md#maximum-batch-size\" rel=\"noopener noreferrer nofollow\">\u044f\u0432\u043d\u043e<\/a> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0430\u0442\u0447 \u0434\u0438\u043c\u0435\u0448\u043d.<\/p>\n<\/div>\n<\/details>\n<pre><code>backend: \"python\" max_batch_size: 0 input [     {         name: \"input__0\"         data_type: TYPE_UINT8         dims: [ -1, -1, 3 ]     } ] output [     {         name: \"output__0\"         data_type: TYPE_FP32         dims: [ -1, 3, 24, 94 ]     },     {         name: \"output__1\"         data_type: TYPE_FP32         dims: [ -1, 4 ]     } ]<\/code><\/pre>\n<h2>\u0413\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 Triton \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/triton-inference-server\/server\/blob\/main\/docs\/user_guide\/architecture.md#ensemble-models\" rel=\"noopener noreferrer nofollow\">Ensembling<\/a> \u0438 <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#business-logic-scripting\" rel=\"noopener noreferrer nofollow\">Business Logic Scripting<\/a> (BLS).<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 STN \u0438 LPR-net \u0432 \u043e\u0434\u043d\u0443 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u043c), \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u0430 \u043d\u0430 Python \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 (\u0441 \u0446\u0438\u043a\u043b\u0430\u043c\u0438, \u0432\u044b\u0445\u043e\u0434\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443).<\/p>\n<p>\u0411\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e BLS, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0435\u0441\u043b\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 LPR-net (\u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u043e\u043c\u0435\u0440\u0430).<\/p>\n<p>\u0414\u043b\u044f Triton-\u0430 \u043d\u0430\u0448\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/tree\/master\/inference_triton\/inference_triton\/model_repository\/plate_recognition\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0434\u0435\u043b\u044c\u044e<\/a> \u0441 \u043d\u0430 Python \u0431\u0435\u043a\u0435\u043d\u0434\u0435.<\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0441\u043b\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<pre><code class=\"python\">cropped_images, coordinates = self.predict(     model_name=\"yolo\",     ... )  num_plates = from_dlpack(coordinates.to_dlpack()).shape[0] if num_plates == 0:     ...     continue  (plate_features,) = self.predict(     model_name=\"stn\",     ... )  (text_features,) = self.predict(     model_name=\"lprnet\",     ... )<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u043b\u0438\u0448\u043d\u0438\u0445 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0413\u041f\u0423 \u0438 \u0426\u041f\u0423, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/triton-inference-server\/python_backend#interoperability-and-gpu-support\" rel=\"noopener noreferrer nofollow\">dlpack<\/a>. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c torch \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0432 Triton \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/inference_triton\/model_repository\/plate_recognition\/config.pbtxt\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0430\u044f<\/a> \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 Python \u0431\u0435\u043a\u0435\u043d\u0434\u0435.<\/p>\n<pre><code>backend: \"python\" max_batch_size: 0 input [     {         name: \"input__0\"         data_type: TYPE_UINT8         dims: [ -1, -1, 3 ]     } ] output [     {         name: \"coordinates\"         data_type: TYPE_FP32         dims: [ -1, 4 ]     },     {         name: \"texts\"         data_type: TYPE_STRING         dims: [ -1, 1 ]     } ]<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>Triton <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/tests\/functional\/test_models.py\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442<\/a> shared memory \u0434\u043b\u044f Python \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0435\u0431\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 kubernetes, \u043e\u043d \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f, \u043a\u0443\u0434\u0430 \u0436\u0435 \u043e\u043d\u0430 \u0434\u0435\u043b\u0430\u0441\u044c. \u041a\u043e\u0441\u0442\u044b\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442\u044c &#8212; \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043b\u044c\u044e\u043c \u043f\u043e \u043f\u0443\u0442\u0438, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u044d\u0442\u0430 shared memory.<\/p>\n<\/div>\n<\/details>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u044b. Triton \u0440\u0430\u043f\u043e\u0440\u0442\u0443\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e.<\/p>\n<figure class=\"\"><figcaption>\u041b\u043e\u0433 \u0442\u0440\u0438\u0442\u043e\u043d\u0430<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0432 Triton \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 <em>plate_recognition<\/em> (\u0442\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u043d\u0430\u0448 \u0433\u0440\u0430\u0444 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439\/\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432). \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e HTTP \u0438\u043b\u0438 gRPC \u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/triton-inference-server\/client\" rel=\"noopener noreferrer nofollow\">tritonclient<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/EgShes\/one_task_multiple_infras\/blob\/master\/inference_triton\/tests\/functional\/test_models.py\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u0430\u0445<\/a>.<\/p>\n<pre><code class=\"python\">triton_client = httpclient.InferenceServerClient(url=\"localhost:8000\") model_name = \"plate_recognition\" image = cv2.imread(img_path)  inputs, outputs = [], []  inputs.append(httpclient.InferInput(\"input__0\", image.shape, \"UINT8\"))<\/code><\/pre>\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-345669","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345669","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=345669"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345669\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}