{"id":336531,"date":"2022-08-04T09:00:13","date_gmt":"2022-08-04T09:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336531"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336531","title":{"rendered":"<span>\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 Microsoft COCO \u0441\u0432\u043e\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c YOLOX. \u0427\u0430\u0441\u0442\u044c 2<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\"\/><br \/>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/topic\/edit\/680116\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0434\u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043e\u0442 yolov5 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 Pascal VOC \u0432 coco \u0444\u043e\u0440\u043c\u0430\u0442. \u0422\u0430\u043a\u0436\u0435 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 Microsoft COCO 2017 (80 \u043a\u043b\u0430\u0441\u0441\u043e\u0432) \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u00ab\u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435\u00bb \u043a\u043b\u0430\u0441\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 (\u0434\u0432\u0435\u0440\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b). \u0412 \u00ab\u0441\u0443\u0445\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u0435\u00bb 46 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 2 \u0432\u043d\u043e\u0432\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c: \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c yolox \u043d\u0430 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<br \/>  \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 yolox \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 yolox \u043d\u0430 windows.<\/h2>\n<p>  YOLOX \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a torch, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0435 \u044f\u0441\u043d\u043e \u043a\u0430\u043a\u0443\u044e \u0438\u0437 \u0432\u0435\u0440\u0441\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 YOLOX.<br \/>  <a href=\"https:\/\/pytorch.org\/\" rel=\"nofollow noopener noreferrer\">Torch<\/a> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 cuda, \u0435\u0441\u043b\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430 \u043d\u0435 \u043e\u0442 NVIDIA \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u0442\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u043e\u0434\u044b )<br \/>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 cuda \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430:  <\/p>\n<pre><code class=\"python\">nvcc --version<\/code><\/pre>\n<p>  \u0414\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5j\/qs\/ev\/5jqsevw5ltdj_u_szsqpmrap_2c.png\" data-src=\"https:\/\/habrastorage.org\/webt\/5j\/qs\/ev\/5jqsevw5ltdj_u_szsqpmrap_2c.png\"\/><br \/>  \u0412\u0435\u0440\u0441\u0438\u044f 10.2. \u0417\u043d\u0430\u0447\u0438\u0442 torch \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\">pip install torch==1.10.0+cu102 torchvision==0.11.0+cu102 torchaudio==0.10.0 -f https:\/\/download.pytorch.org\/whl\/torch_stable.html<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 yolox.<\/h3>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/github.com\/Megvii-BaseDetection\/YOLOX\" rel=\"nofollow noopener noreferrer\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\"> git clone git@github.com:Megvii-BaseDetection\/YOLOX.git cd YOLOX pip3 install -v -e .  <\/code><\/pre>\n<p>  \u041d\u0430 windows \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0448\u044c \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 arm. \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437.<\/p>\n<p>  \u041d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 YOLOX \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 <a href=\"https:\/\/github.com\/MegEngine\/YOLOX\" rel=\"nofollow noopener noreferrer\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 MegEngine. \u041d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043d \u0432 \u0440\u0430\u0437\u044b \u0434\u043e\u043b\u044c\u0448\u0435 \u0438 \u043d\u0430\u0431\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u0430\u043c \u043d\u0435 \u0442\u0430\u043a \u0432\u0435\u043b\u0438\u043a.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 yolox \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0438 \u0432\u0435\u0441\u0430 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 yolox.<\/h3>\n<p>  C \u0441\u0430\u0439\u0442\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f yolox \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0432\u0435\u0441\u0430. \u041b\u0443\u0447\u0448\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u043b\u0435\u0433\u0447\u0435 (light), \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u043d\u0430 \u0438 \u043d\u0435 \u0442\u0430\u043a \u0442\u043e\u0447\u043d\u0430, \u043a\u0430\u043a \u0435\u0435 \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0441\u0435\u0441\u0442\u0440\u044b, \u043e\u0434\u043d\u0430\u043a\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 arm \u0432 \u0440\u0430\u0437\u044b \u0431\u043e\u043b\u044c\u0448\u0435.<br \/>   <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bo\/ny\/rm\/bonyrmpa1tispmq5r9bhkr_vbgk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bo\/ny\/rm\/bonyrmpa1tispmq5r9bhkr_vbgk.png\"\/><br \/>  \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c:  <\/p>\n<pre><code class=\"python\">python tools\\demo.py image -n yolox-tiny -c models\\yolox_tiny.pth --path assets\\bus9.jpg --conf 0.25 --nms 0.45 --tsize 416 --save_result<\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0439\u0434\u0435\u043c \u0432 <\/p>\n<pre><code class=\"python\">YOLOX-main\\YOLOX_outputs\\yolox_tiny\\vis_res<\/code><\/pre>\n<p>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\"\/><\/p>\n<p>  \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lf\/8h\/3w\/lf8h3wfsysqfb2aorrb4sb1bshc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/lf\/8h\/3w\/lf8h3wfsysqfb2aorrb4sb1bshc.png\"\/><\/p>\n<p>  \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 (inference time) \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b &#8212;fuse &#8212;fp16, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212;tsize, \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0432 \u0435\u0433\u043e.<\/p>\n<h2>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/h2>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0441\u0430\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442: train \u0438 val \u043f\u0430\u043f\u043a\u0438 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438. \u0424\u0430\u0439\u043b\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u2014 \u044d\u0442\u043e \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 json, \u0443\u0441\u043b\u043e\u0432\u043d\u043e train.json \u0438 val.json, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0434\u0430\u0442\u0430\u0441\u0435\u0442.<br \/>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<br \/>  \/YOLOX\/datasets\/coco\/:<br \/>  &#8212;\/annotations\/:<br \/>  &#8212;&#8212;instances_train2017.json<br \/>  &#8212;&#8212;instances_val2017.json<br \/>  &#8212;train2017 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438)<br \/>  &#8212;val2017 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438)<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0444\u0430\u0439\u043b\u0435:<br \/>  YOLOX\\yolox\\data\\datasets\\coco_classes.py:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> COCO_CLASSES = ( \"person\", \"bicycle\", \"car\", \"bench\", \"cat\", \"dog\", \"backpack\", \"umbrella\", \"handbag\", \"suitcase\", \"sports ball\", \"bottle\", \"wine glass\", \"cup\", \"fork\", \"knife\", \"spoon\", \"bowl\", \"banana\", \"apple\", \"sandwich\", \"orange\", \"carrot\", \"chair\", \"potted plant\", \"bed\", \"dining table\", \"toilet\", \"laptop\", \"mouse\", \"remote\", \"keyboard\", \"cell phone\", \"microwave\", \"oven\", \"sink\", \"refrigerator\", \"book\", \"clock\", \"vase\", \"scissors\", \"teddy bear\", \"hair drier\", \"toothbrush\", \"door\", \"Stairs\" ) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 YOLOX-main\\exps\\example\\custom:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">yolo_tiny_my.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> #!\/usr\/bin\/env python3 # -*- coding:utf-8 -*- # Copyright (c) Megvii, Inc. and its affiliates. import os  from yolox.exp import Exp as MyExp  class Exp(MyExp):     def __init__(self):         super(Exp, self).__init__()         self.depth = 0.33         self.width = 0.375         self.input_size = (416, 416)         #self.mosaic_scale = (0.5, 1.5)         self.random_size = (10, 20)         self.test_size = (416, 416)         self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(\".\")[0]         #self.enable_mixup = False               # Define yourself dataset path         self.data_dir = r\"D:\\3\\YOLOX-main\\datasets\\coco\"         self.train_ann = r\"D:\\3\\YOLOX-main\\datasets\\coco\\annotations\\instances_train2017.json\"         self.val_ann = r\"D:\\3\\YOLOX-main\\datasets\\coco\\annotations\\instances_val2017.json\"         self.num_classes = 46 #\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432         self.max_epoch = 300         self.data_num_workers = 4 #4         self.eval_interval = 1          #self.min_lr_ratio = 0.05 <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u2014 46, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u2014 300, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0443\u0442\u0438, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/h3>\n<p>  \u0411\u0443\u0434\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043d\u0430 NVIDIA GTX 1060 6Gb.<br \/>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 YOLOX \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:  <\/p>\n<pre><code class=\"python\">python tools\/train.py -f exps\/example\/custom\/yolox_tiny_my.py -d 1 -b 8 --fp16 -o -c models\/yolox_tiny.pth<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vx\/7g\/yl\/vx7gylxnzmehxowxnh0wrvnwcgg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vx\/7g\/yl\/vx7gylxnzmehxowxnh0wrvnwcgg.png\"\/><br \/>  \u0422\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0448\u0435\u043b.<\/p>\n<p>  \u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4d\/9f\/iw\/4d9fiwre8yafawftz7a1r0hnliy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/4d\/9f\/iw\/4d9fiwre8yafawftz7a1r0hnliy.png\"\/><br \/>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ETA \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <br \/>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c 32 \u0434\u043d\u044f )<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b windows gpu-z \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0442\u0440\u0443\u0434\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ea\/r9\/e9\/ear9e9bf1olodx50o_fwpursl1w.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ea\/r9\/e9\/ear9e9bf1olodx50o_fwpursl1w.png\"\/><\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u044d\u043f\u043e\u0445\u043e\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 YOLOX_Outputs \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u044d\u043f\u043e\u0445\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3h\/ec\/oh\/3hecoh6zx7cuhfpydohv2bexfgk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/3h\/ec\/oh\/3hecoh6zx7cuhfpydohv2bexfgk.png\"\/><br \/>  \u042d\u0442\u043e \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"python\">python tools\/demo.py video -f exps\/example\/custom\/yolox_tiny_my.py -c models\/epoch_91_ckpt.pth --path assets\/doors1 --conf 0.25 --nms 0.45 --tsize 640 --save_result --device cpu<\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u044d\u043f\u043e\u0445\u043e\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f 91 \u0447\u0435\u0440\u0435\u0437 \u0432\u0438\u0434\u0435\u043e\u0440\u043e\u043b\u0438\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e cpu \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u044b\u043c \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u043f\u043e\u043c\u043e\u0449\u043d\u0435\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 NVIDIA Tesla V100-PCIE-32GB, \u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u0434\u0440\u0435\u0435 \u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 batch-size (b). <br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:   <\/p>\n<pre><code class=\"python\">python tools\/train.py -f exps\/example\/custom\/yolox_tiny_my.py -d 1 -b 128 --fp16 -o -c models\/yolox_tiny.pth<\/code><\/pre>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. <br \/>  \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e yolox \u043d\u0430 raspberry pi \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 arm.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/680344\/\"> https:\/\/habr.com\/ru\/post\/680344\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ge\/zt\/qp\/geztqpm_3jxbwf9joknpmb-ro80.png\"\/><br \/>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/topic\/edit\/680116\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0434\u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043e\u0442 yolov5 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 Pascal VOC \u0432 coco \u0444\u043e\u0440\u043c\u0430\u0442. \u0422\u0430\u043a\u0436\u0435 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 Microsoft COCO 2017 (80 \u043a\u043b\u0430\u0441\u0441\u043e\u0432) \u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u00ab\u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435\u00bb \u043a\u043b\u0430\u0441\u0441\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 (\u0434\u0432\u0435\u0440\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b). \u0412 \u00ab\u0441\u0443\u0445\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u0435\u00bb 46 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 2 \u0432\u043d\u043e\u0432\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c: \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c yolox \u043d\u0430 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<br \/>  \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 yolox \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-336531","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336531","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=336531"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336531\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}