{"id":336405,"date":"2022-07-31T21:00:13","date_gmt":"2022-07-31T21:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336405"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336405","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<\/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\">\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/62e6d39f6bb29b3416f40800\" data-style=\"\" id=\"62e6d39f6bb29b3416f40800\" width=\"\"><\/div>\n<\/div>\n<p>  \u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0438\u0442\u044c custom dataset \u043d\u0430 yolo\u00bb. <br \/>  \u0427\u0442\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u044d\u0442\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438? <br \/>  \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0435\u043c \u0435\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c. \u0414\u0430\u043b\u0435\u0435 \u0431\u0435\u0440\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 yolo, \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c. <br \/>  \u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0432\u043e\u0438 \u043d\u044e\u0430\u043d\u0441\u044b \u043e\u0442 yolo \u043a yolo (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u0439 \u0436\u0435 yolov5 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0441\u044f\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439), \u043d\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0442\u0430\u043a\u043e\u0439.<br \/>  \u0412\u0441\u0435 \u0442\u0430\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u0435 \u0437\u0430\u043b\u043e\u0436\u0438\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u044b\u043c \u0438 \u043e\u0433\u043e\u043d\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u043b\u0430\u0441\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Microsoft COCO \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0441 YOLOX, \u00ab\u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c\u00bb \u0435\u0449\u0435 80 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438. <br \/>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u0443\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 Microsoft COCO? \u041f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0430\u0432\u0442\u043e\u0431\u0443\u0441\u044b \u0438 \u043b\u044e\u0434\u0435\u0439 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u0440\u0435\u043b\u043a\u0438 \u0438 \u043d\u043e\u0436\u0438, \u043d\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439:<br \/>  1. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442. \u0414\u043b\u044f \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0443\u0441\u0442\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Pascal VOC \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 YOLOv5), \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 COCO (\u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 yolox).<br \/>  2. \u0421\u043a\u0430\u0447\u0430\u0435\u043c Microsoft COCO \u0438 \u00ab\u043f\u043e\u0447\u0438\u0441\u0442\u0438\u043c\u00bb \u0435\u0433\u043e \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<br \/>  3. \u00ab\u0421\u043a\u043b\u0435\u0438\u043c\u00bb \u0441\u0432\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 Microsoft COCO.<br \/>  4. \u041e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c yolox \u043d\u0430 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<h2>\u0421\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442.<\/h2>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<br \/>   \u2014 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442;<br \/>   \u2014 \u043d\u0430\u0439\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0439.<br \/>  \u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c opensource (\u043f\u043e\u0447\u0442\u0438) \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 roboflow.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/0b\/mr\/l9\/0bmrl9bhakneg4nx1kb0ix3inue.png\" data-src=\"https:\/\/habrastorage.org\/webt\/0b\/mr\/l9\/0bmrl9bhakneg4nx1kb0ix3inue.png\"\/><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043a \u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u043a\u0440\u0430\u0439\u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u043e: \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0448\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438), \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c\u0430 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0433\u0434\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445 \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438, \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 (train, val, test), \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432\u043e \u0432\u0441\u0435\u0445 \u0435\u0435 \u0438\u043f\u043e\u0441\u0442\u0430\u0441\u044f\u0445, \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 coco,pascal \u0438 \u0442.\u0434.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bc\/3f\/tw\/bc3ftwusogduxliwdsgzn_nnnhq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bc\/3f\/tw\/bc3ftwusogduxliwdsgzn_nnnhq.png\"\/><\/p>\n<p>  \u0415\u0441\u0442\u044c \u0438 \u043c\u0438\u043d\u0443\u0441\u044b: \u0435\u0441\u043b\u0438 \u0434\u0435\u043d\u0435\u0436\u043a\u0443 \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u043b\u0430\u0442\u0438\u0442\u0435, \u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 10\u0442\u044b\u0441. \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u0442\u043e, \u0447\u0442\u043e \u0432\u0430\u0448 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u00ab\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c\u00bb \u0434\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 roboflow. <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/e9\/ph\/dd\/e9phddu62zoxqj1fg6vhr5uuduq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/e9\/ph\/dd\/e9phddu62zoxqj1fg6vhr5uuduq.png\"\/><br \/>  *\u0410\u0432\u0442\u043e\u0440 \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0438 \u0441\u043d\u044f\u043b \u0441\u0440\u0435\u0437 \u0438\u0437 10\u0442\u044b\u0441. \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432 \u0441 roboflow. \u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u043e\u0431\u0440\u043e\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u2014 <a href=\"https:\/\/disk.yandex.ru\/d\/O2VIERAQ-ko2zQ\" rel=\"nofollow noopener noreferrer\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a>.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432 roboflow, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 coco \u0444\u043e\u0440\u043c\u0430\u0442, \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043b\u0438.<br \/>  \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432 coco \u0447\u0435\u0440\u0435\u0437 roboflow.<br \/>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u00ab\u043d\u0435 \u0434\u0440\u0443\u0436\u0430\u0442\u00bb \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 yolox. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 pascal voc \u0438 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/da\/if\/2e\/daif2e_y7cwlsrjabihrpnwgqj0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/da\/if\/2e\/daif2e_y7cwlsrjabihrpnwgqj0.png\"\/><\/p>\n<p>  \u041c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0438 \u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0434\u0432\u0435\u0440\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b \u043a\u0430\u043a \u043a\u043b\u0430\u0441\u0441\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c Microsoft COCO, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0432 \u043e\u0442\u0442\u0443\u0434\u0430 \u00ab\u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435\u00bb \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<p>  \u0414\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0434\u0432\u0435\u0440\u044f\u043c\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u0430\u043c\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Pascal VOC \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u044e\u0434\u0430 \u2014 <a href=\"https:\/\/drive.google.com\/file\/d\/1qb8-mcZUAj1T0IM-1pPCdpco3ytATRRw\/view?usp=sharing\" rel=\"nofollow noopener noreferrer\">\u0434\u0430\u0442\u0430\u0441\u0435\u0442<\/a>.<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u00ab\u0434\u043e\u0441\u0442\u0430\u043b\u0441\u044f\u00bb \u043e\u0442 yolov5. <br \/>  \u0412 \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 (Pascal VOC) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<br \/>   \u2014 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 xml \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442;<br \/>   \u2014 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">doors_and_stairs_map.pbtxt<\/b>                         <\/p>\n<div class=\"spoiler_text\">item {<br \/>   id: 1<br \/>   name: &#8216;door&#8217;<br \/>  }<\/p>\n<p>  item {<br \/>   id: 2<br \/>   name: &#8216;Stairs&#8217;<br \/>  }  <\/div>\n<\/p><\/div>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0430 train\/val\/test \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u043a train \u0438 val \u0435\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0438 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438. \u0412\u0441\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 10\u0442\u044b\u0441. \u0444\u0430\u0439\u043b\u043e\u0432 (\u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a) \u044d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 Microsoft COCO, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0442\u043e \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<h2>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437 Pascal VOC \u0432 coco \u0444\u043e\u0440\u043c\u0430\u0442.<\/h2>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f yolox \u043d\u0443\u0436\u0435\u043d \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 coco. \u042d\u0442\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u0432\u0430 json \u0444\u0430\u0439\u043b\u0430 c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 (\u043e\u0434\u0438\u043d \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u0438\u0437 train, \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 validation \u043f\u0430\u043f\u043a\u0438). \u041f\u043e \u0441\u0443\u0442\u0438, \u0432\u0441\u0435 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 xml \u0444\u0430\u0439\u043b\u0430\u0445 (\u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 yolov5 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0447\u0435\u0432\u0430\u0442\u044c \u0432 2 json \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 yolox.<\/p>\n<h3>\u042d\u0442\u0430\u043f\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438.<\/h3>\n<p>  *\u0414\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0434\u0432\u0435\u0440\u0438, \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b \u0432\u0441\u0435 \u043d\u0438\u0436\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b.<br \/>  1. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0441 \u0434\u0432\u0435\u0440\u044f\u043c\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u0430\u043c\u0438, \u0432 \u043a\u043e\u0440\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 labels.txt c \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 door \u0438 Stairs. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u2014 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<br \/>  2. \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0438 train2017, val2017,train_annotations, val_annotations. \u0412 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430.<br \/>  3. \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 txt \u0444\u0430\u0439\u043b\u0430: train.txt \u0438 val.txt (\u0434\u043b\u044f train \u0438 val \u043f\u0430\u043f\u043e\u043a), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0431\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439:<br \/>  cam_image1<br \/>  cam_image1<br \/>  cam_image1<br \/>  cam_image10<br \/>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 help-code \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u2014 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">code<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import os directory = 'doors\/images\/train' file_out='train.txt' for file in os.listdir(directory):     if file.lower().endswith(\".jpg\"):         with open(file_out, 'a') as f:             f.write(f'{file.split(\".\")[0]}\\n')<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  4. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 coco \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0430\u043f\u043a\u0438 train \u0438 val:  <\/p>\n<pre><code class=\"python\">python voc2coco.py --ann_dir doors-and-stairs-dataset\/train_annotations --ann_ids doors-and-stairs-dataset\/train.txt  --labels doors-and-stairs-dataset\/labels.txt --output doors-and-stairs-dataset\/coco_instances_train.json --ext xml<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">python voc2coco.py --ann_dir doors-and-stairs-dataset\/val_annotations --ann_ids doors-and-stairs-dataset\/val.txt  --labels doors-and-stairs-dataset\/labels.txt --output doors-and-stairs-dataset\/coco_instances_val.json --ext xml<\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u2014 <a href=\"https:\/\/disk.yandex.ru\/d\/-wubj46iLIjYZg\" rel=\"nofollow noopener noreferrer\">voc2coco.py<\/a><\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 json (coco_instances_train.json, coco_instances_train.json), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 c \u043f\u0430\u043f\u043a\u0430\u043c\u0438 train \u0438 val (\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438) \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 Microsoft COCO. \u041f\u0430\u043f\u043a\u0438 \u0441 xml \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.<br \/>  \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 json \u2014 <a href=\"https:\/\/disk.yandex.ru\/d\/o9yCIY79wWlEoQ\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>2. \u0421\u043a\u0430\u0447\u0430\u0435\u043c Microsoft COCO \u0438 \u00ab\u043f\u043e\u0447\u0438\u0441\u0442\u0438\u043c\u00bb \u0435\u0433\u043e \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/h2>\n<p>  \u0414\u0430\u0442\u0430\u0441\u0435\u0442 Microsoft COCO \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043f\u043e <a href=\"https:\/\/cocodataset.org\/#download\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>. \u0422\u0430\u043c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 api. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 coco 2017, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438. <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fm\/ls\/oe\/fmlsoemnoj_tyndpm0b-qbaxyfa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fm\/ls\/oe\/fmlsoemnoj_tyndpm0b-qbaxyfa.png\"\/><br \/>  Test \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438\u0437 test \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430.<br \/>  \u0412 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f json \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e instances_train2017.json \u0438 instances_val2017.json.<br \/>  \u0417\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">read_jsons.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> import json from time import sleep  with open('instances_val2017.json') as json_file:     data = json.load(json_file)     for i in data['categories']:         print(i['name'])         #for i in data['annotations']:         #print(i)     #for i in data['images']:         #print(i) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 (\u043a\u043b\u0430\u0441\u0441\u044b), \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a \u043d\u0438\u043c, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a. \u042d\u0442\u0438 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b.<br \/>  \u0410 \u043f\u043e\u043a\u0430 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c Microsoft COCO, \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0432 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<h3>\u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c Microsoft COCO<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b <a href=\"https:\/\/drive.google.com\/file\/d\/1qEvPWGUMBPppcDML-BJWzaDhBzuNGDyO\/view?usp=sharing\" rel=\"nofollow noopener noreferrer\">filter.py<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438:  <\/p>\n<pre><code class=\"python\">python filter.py --input_json \/annotations\/instances_train2017.json --output_json \/annotations\/filtered_train2017.json --categories person dog cat<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 wine glass, \u0442\u043e \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 &#171;&#187;. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e person, dog \u0438 cat \u043a\u043b\u0430\u0441\u0441\u044b. \u041d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b, \u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0443 \u0438\u0437 coco \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">python filter.py --input_json instances_train2017.json --output_json train2017_filtered.json --categories car orange banana \"wine glass\" sandwich bottle vase bicycle fork sofa umbrella toothbrush keyboard book mouse cat bed cup spoon microwave \"cell phone\" \"tv monitor\" carrot \"teddy bear\" \"sports ball\" knife scissors laptop oven remote sink backpack bench dog \"dining table\" chair handbag bowl toilet \"hair drier\" refrigerator \"potted plant\" clock person suitcase apple <\/code><\/pre>\n<p>  *\u041d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u044b sofa tv monitor, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e.  <\/div>\n<\/p><\/div>\n<p>  \u042d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438 \u0434\u043b\u044f instances_val2017.json:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">python filter.py &#8212;input_json instances_val2017.json &#8212;output_json val2017_filtered.json &#8212;categories car orange banana \u00abwine glass\u00bb sandwich bottle vase bicycle fork sofa umbrella toothbrush keyboard book mouse cat bed cup spoon microwave \u00abcell phone\u00bb \u00abtv monitor\u00bb carrot \u00abteddy bear\u00bb \u00absports ball\u00bb knife scissors laptop oven remote sink backpack bench dog \u00abdining table\u00bb chair handbag bowl toilet \u00abhair drier\u00bb refrigerator \u00abpotted plant\u00bb clock person suitcase apple <\/div>\n<\/p><\/div>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e! <br \/>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u043c\u0441\u044f read_jsons.py \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b (\u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445). \u0414\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f 44 \u043a\u043b\u0430\u0441\u0441\u0430 coco \u0438\u0437 80.<\/p>\n<h2>3. \u00ab\u0421\u043a\u043b\u0435\u0438\u043c\u00bb \u0441\u0432\u043e\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 Microsoft COCO.<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043a\u043b\u0435\u0439\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0444\u0430\u0439\u043b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e read_jsons.py  <\/p>\n<pre><code class=\"python\">with open('filtered_val.json') as json_file:     data = json.load(json_file)     for i in data['categories']:         print(i) <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438\u0434\u0443\u0442 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:  <\/p>\n<pre><code class=\"python\"> {'supercategory': 'person', 'id': 1, 'name': 'person'} {'supercategory': 'vehicle', 'id': 2, 'name': 'bicycle'} {'supercategory': 'vehicle', 'id': 3, 'name': 'car'} {'supercategory': 'outdoor', 'id': 4, 'name': 'bench'} <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c json \u0434\u043b\u044f custom dataset \u00ab\u0414\u0432\u0435\u0440\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b\u00bb:  <\/p>\n<pre><code class=\"python\"> {'supercategory': 'none', 'id': 1, 'name': 'door'} {'supercategory': 'none', 'id': 2, 'name': 'Stairs'} <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0435\u0438\u0442\u044c \u0434\u0432\u0430 json, \u0442\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043d\u0430\u043b\u043e\u0436\u0430\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u0430 \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 \u0438 \u0441\u0430\u043c\u0438\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 json custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u00ab\u0441\u0434\u0432\u0438\u043d\u0443\u0432\u00bb id \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<br \/>  \u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043d\u0435 \u043e\u0434\u043d\u043e \u00ab\u043d\u043e\u00bb, \u0442\u043e\u0447\u043d\u043e \u0434\u0432\u0430 \u00ab\u043d\u043e\u00bb.<br \/>  \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, id \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 json \u0444\u0430\u0439\u043b\u0430\u0445 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0438 \u0432\u043e\u0442 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u043a\u0430:  <\/p>\n<pre><code class=\"python\"> ##\"categories\":  #2 \u043a\u043b\u0430\u0441\u0441\u0430 ##{'supercategory': 'none', 'id': 1, 'name': 'doors'} #\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c id 1 \u043d\u0430 id 45 ##{'supercategory': 'none', 'id': 2, 'name': 'Stairs'} #\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c id 1 \u043d\u0430 id 46  ##\"annotations\":  ##{'area': 38280, 'iscrowd': 0, 'bbox': [311, 29, 174, 220], 'category_id': 2, 'ignore': 0, \\ #'segmentation': [], 'image_id': 2, 'id': 1}  #\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c category_id (\u0441\u043c \u0432\u044b\u0448\u0435) \u0438 image_id (image_id*1000000)  #\"images\":  #{'file_name': 'cam_image2.jpg', 'height': 540, 'width': 960, 'id': 2} #\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c id (image_id*1000000)<\/code><\/pre>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0432\u0441\u0435 \u043c\u0435\u043d\u044f\u0435\u0442, \u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 image_id*1000000. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435.<\/p>\n<h3>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 json custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u0435\u0440\u0435\u0434 \u0441\u043a\u043b\u0435\u0439\u043a\u043e\u0439 \u0441 Microsoft COCO.<\/h3>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u00ab\u0414\u0432\u0435\u0440\u0438 \u0438 \u043b\u0435\u0441\u0442\u043d\u0438\u0446\u044b\u00bb:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">convert_jsons.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> import json,os from time import sleep  #\u0441\u0434\u0432\u0438\u0433 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c n=44 # 44- \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 coco \u0441\u0435\u0439\u0447\u0430\u0441 x1,x2,x3=100000,200000,1000000 #\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a  in_file='doors_stairs_train.json' out_file='doors_stairs_train_out.json'  in_file2='doors_stairs_val.json' out_file2='doors_stairs_val_out.json'  def transform(in_file,out_file):     with open(in_file) as json_file, open(out_file,'w') as out_file:     #with open('fromCOCO_cat_dog.json') as json_file:         data = json.load(json_file)         #\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \"categories\"         for i in data['categories']:                     i['id']+=n             #print(i['id'])         #for i in data['categories']:             #print(i)         #\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 id \u0432 \"annotations\"         for i in data['annotations']:              i['category_id']+=n              i['image_id']+=x1 #1000000 \u0432\u0437\u044f\u0442\u043e \u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430, \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0437 COCO, \u0433\u0434\u0435 ~700000 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a              i['id']+=x2 ##100000 \u0432\u0437\u044f\u0442\u043e \u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430, \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0437 COCO         #for i in data['annotations']:             #print(i)         #\u043c\u0435\u043d\u044f\u0435\u043c id \u0432 \"images\"         for i in data['images']:              i['id']+=x3 #1000000 \u0432\u0437\u044f\u0442\u043e \u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430, \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0437 COCO, \u0433\u0434\u0435 ~700000 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a         #for i in data['images']:             #print(i)         json.dump(data, out_file) transform(in_file,out_file) transform(in_file2,out_file2) os.remove(in_file) os.remove(in_file2) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c:  <\/p>\n<pre><code class=\"python\">n=44 # 44- \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 coco \u0441\u0435\u0439\u0447\u0430\u0441 x1,x2,x3=100000,200000,1000000 #\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a  in_file='doors_stairs_train.json' out_file='doors_stairs_train_out.json' in_file2='doors_stairs_val.json' out_file2='doors_stairs_val_out.json' <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043c\u0435\u043d\u044f\u0442\u044c n \u0438 x1,x2,x3, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0430 10 000 (\u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u043b\u0438 id \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a). \u0415\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u043d\u043e\u0432\u043e\u043c custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e x1,x2,x3 \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c\u00bb.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 jsons. \u0411\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c:  <\/p>\n<pre><code class=\"python\"> {'supercategory': 'none', 'id': 45, 'name': 'door'} {'supercategory': 'none', 'id': 46, 'name': 'Stairs'} <\/code><\/pre>\n<h3>\u0421\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u0441 Microsoft COCO.<\/h3>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u041f\u0440\u0438\u043a\u043b\u0435\u0438\u0442\u044c \u043a \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0443 coco \u0441\u0432\u043e\u0439 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<br \/>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">join_jsons.py<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> import json,os from time import sleep  json_one='44_coco_train.json' json_two='doors_stairs_train_out.json' out_file='coco46_train.json'  json_one2='44_coco_val.json' json_two2='doors_stairs_val_out.json' out_file2='coco46_val.json'  def transform(json_one,json_two,out_file):     with open(json_one) as json_one, open(json_two) as json_t:         data1 = json.load(json_one)         data2 = json.load(json_t)         #\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438             data1['categories'].extend(data2['categories'])         data1['annotations'].extend(data2['annotations'])         data1['images'].extend(data2['images'])              with open(out_file, 'w') as out_file:         json.dump(data1, out_file)          transform(json_one,json_two,out_file) transform(json_one2,json_two2,out_file2)  os.remove(json_two) os.remove(json_two2) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0431\u044b\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043a\u043b\u0435\u0438\u0442\u044c val \u0441 train:  <\/p>\n<pre><code class=\"python\"> json_one='44_coco_train.json' json_two='doors_stairs_train_out.json' out_file='coco46_train.json'  json_one2='44_coco_val.json' json_two2='doors_stairs_val_out.json' out_file2='coco46_val.json' <\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 yolox \u0443\u0436\u0435 \u043d\u0430 46 \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0448\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435.<br \/>  \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u2014 <a href=\"https:\/\/drive.google.com\/file\/d\/1azmFqs_Sx51-Mt97MGN9ZbDJk5FQ4xZw\/view?usp=sharing\" rel=\"nofollow noopener noreferrer\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a>.<\/p>\n<p>  \u0418 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.<br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 coco \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. Train custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 train coco, val custom \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 val coco. <br \/>  \u0410 \u043a\u0430\u043a \u0436\u0435 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432?<br \/>  \u0421 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0434\u043e\u043b\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u0410 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c \u043f\u043e id \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438.<\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/62e6d524ab11133472440617\" data-style=\"\" id=\"62e6d524ab11133472440617\" width=\"\"><\/div>\n<\/div>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442.<\/p><\/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\/680116\/\"> https:\/\/habr.com\/ru\/post\/680116\/<\/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\">\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/62e6d39f6bb29b3416f40800\" data-style=\"\" id=\"62e6d39f6bb29b3416f40800\" width=\"\"><\/div>\n<\/div>\n<p>  \u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u043a\u0430\u043a \u043e\u0431\u0443\u0447\u0438\u0442\u044c custom dataset \u043d\u0430 yolo\u00bb. <br \/>  \u0427\u0442\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u044d\u0442\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438? <br \/>  \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0435\u043c \u0435\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c. \u0414\u0430\u043b\u0435\u0435 \u0431\u0435\u0440\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u0440\u0435\u0434\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 yolo, \u043e\u0431\u0443\u0447\u0430\u0435\u043c \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c. <br \/>  \u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0432\u043e\u0438 \u043d\u044e\u0430\u043d\u0441\u044b \u043e\u0442 yolo \u043a yolo (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u0439 \u0436\u0435 yolov5 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0441\u044f\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439), \u043d\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0442\u0430\u043a\u043e\u0439.<br \/>  \u0412\u0441\u0435 \u0442\u0430\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u0435 \u0437\u0430\u043b\u043e\u0436\u0438\u043b\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u044b\u043c \u0438 \u043e\u0433\u043e\u043d\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-336405","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336405","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=336405"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336405\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}