{"id":352000,"date":"2024-05-20T22:00:04","date_gmt":"2024-05-20T22:00:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=352000"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=352000","title":{"rendered":"<span>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 YOLOv8s \u043d\u0430 Google Colab: \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u043c \u0434\u043e\u0440\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0420\u0435\u0448\u0438\u043b\u0430 \u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440 \u0441 \u043d\u043e\u0432\u044b\u043c \u043c\u0438\u043d\u0438-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f YOLOv8. \u0427\u0442\u043e \u0436, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<h3>1: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Google Colab<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"https:\/\/colab.google\/\" rel=\"noopener noreferrer nofollow\">Google colab<\/a> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c New Notebook. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0451 \u0441\u043e\u0437\u0434\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0438\u0449\u0435\u043c &lt;\u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f>. \u0414\u0430\u043b\u044c\u0448\u0435 \u0442\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u0421\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f -> T4 GPU -> \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. (\u041f\u043e \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u044e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 2 \u0440\u0430\u0437\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u044f\u043b\u0430 \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f CPU, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435). <\/p>\n<p>P.s. \u043c\u0435\u043d\u044f \u0437\u0430\u0431\u0430\u043d\u0438\u043b\u0438 \u043f\u043e\u043a\u0430 \u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 (\u044f \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0435\u0449\u0451 \u043d\u0438 \u0440\u0430\u0437\u0443 \u0441 Google Colab, \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043f\u043a\u0430\u043c\u0438):<br \/><strong>1:<\/strong> \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 GPU \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e. <br \/><strong>2:<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0431\u043b\u043e\u043a\u043d\u043e\u0442 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 GPU, \u043a\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434.<br \/><strong>\u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u044d\u0442\u043e:<\/strong> \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044e (GPU) \u0438\u0437-\u0437\u0430 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Colab.<\/p>\n<p>\u0422\u0430\u043a-\u0441, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0441\u0451 \u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043b\u043e\u0441\u044c: <\/p>\n<pre><code class=\"python\">!nvcc --version<\/code><\/pre>\n<p><code>nvcc: NVIDIA (R) Cuda compiler driver <br \/>Copyright (c) 2005-2022 NVIDIA Corporation <br \/>Built on Wed_Sep_21_10:33:58_PDT_2022 <br \/>Cuda compilation tools, release 11.8, V11.8.89 <br \/>Build cuda_11.8.r11.8\/compiler.31833905_0<\/code>  <\/p>\n<pre><code class=\"python\">!nvidia-smi<\/code><\/pre>\n<p><code>Sat Aug 12 08:27:04 2023      <br \/>NVIDIA-SMI 525.105.17   Driver Version: 525.105.17   CUDA Version: 12.0 <br \/>...<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b, \u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \ud83d\ude42<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u0441\u0440\u0430\u0437\u0443 \u0443\u0434\u0430\u043b\u0438\u043c \u043f\u0430\u043f\u043a\u0443 sample_data, \u0430 \u0442\u043e \u043e\u043d\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c \u043c\u0435\u0448\u0430\u0442\u044c\u0441\u044f.<\/p>\n<pre><code class=\"python\">!rm -rf .\/sample_data<\/code><\/pre>\n<h3>2: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442<\/h3>\n<p><strong>2.1: \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/strong><\/p>\n<pre><code class=\"python\">!git clone https:\/\/github.com\/ultralytics\/JSON2YOLO<\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438:<br \/><strong>1:<\/strong> \u0412 \u0444\u0430\u0439\u043b\u0435 general_json2yolo.py \u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 274 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0430 <code>h, w, f = img['height'], img['width'], img['file_name'].split('\/')[1]<\/code> . <\/p>\n<p><strong>2:<\/strong> \u0412 general_json2yolo.py \u0438 labelbox_json2yolo.py, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c utils \u0442\u043e\u0447\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0442\u0430\u043a <code>from .utils import ...<\/code>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044e:<br \/><strong>1:<\/strong> \u041c\u0435\u0442\u043e\u0434 <code>.split('\/')<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 <code>img['file_name']<\/code> \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443 <code>\/<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a. \u0417\u0430\u0442\u0435\u043c <code>[1]<\/code> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f <code>\/<\/code>. \u0421\u0442\u0440\u043e\u043a\u0430 <code>img['file_name']<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043b\u0435\u0448\u0430\u043c\u0438 <code>\/<\/code>, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0431\u0435\u0437 \u043f\u0443\u0442\u0438.  <\/p>\n<p><strong>2:<\/strong> \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0430, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043b\u0435\u0437\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0441\u0442\u044c. \u041d\u0430 \u0441\u0432\u043e\u0435\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0442\u0430\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e, \u043d\u043e \u0432 Google Colab \u043e\u043d\u0430 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432\u044b\u043b\u0435\u0437\u043b\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u0430 \ud83d\ude42<\/p>\n<p>\u0422\u0430\u043a-\u0441, \u0438\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435!<\/p>\n<p><strong>2.2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/strong><\/p>\n<pre><code class=\"python\">%pip install -r \/content\/JSON2YOLO\/requirements.txt<\/code><\/pre>\n<pre><code class=\"python\">%pip install kaggle ipywidgets widgetsnbextension<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 successfully installed, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0443!<\/p>\n<h3>3: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c<\/h3>\n<p><strong>3.1: \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442<\/strong><\/p>\n<pre><code class=\"python\">import os<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.kaggle.com\/\" rel=\"noopener noreferrer nofollow\">Kaggle<\/a>. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 -> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0433\u043e, \u0430 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Settings -> API -> Create New Token. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f json \u0444\u0430\u0439\u043b, \u0442\u0430\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">os.environ['KAGGLE_USERNAME'] = \"\u0441\u044e\u0434\u0430 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0437 json username\" os.environ['KAGGLE_KEY'] = \"\u0430 \u0441\u044e\u0434\u0430 key\" !kaggle datasets download -d watchman\/rtsd-dataset<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u0430\u043c\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u043f\u043e\u043a\u0430 \u043e\u043d \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<a href=\"https:\/\/www.kaggle.com\/datasets\/watchman\/rtsd-dataset\" rel=\"noopener noreferrer nofollow\"> RTSD<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0430\u0434\u0440\u044b, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439\u00a0<a href=\"http:\/\/geocenter-consulting.ru\/\" rel=\"noopener noreferrer nofollow\"><u>&#171;\u0413\u0435\u043e\u0446\u0435\u043d\u0442\u0440 \u041a\u043e\u043d\u0441\u0430\u043b\u0442\u0438\u043d\u0433&#187;<\/u><\/a>. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441 \u0448\u0438\u0440\u043e\u043a\u043e\u0444\u043e\u0440\u043c\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 5 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 1280\u00d7720 \u0434\u043e 1920\u00d71080. \u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430, \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0433\u043e\u0434\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 . \u0412 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 155 \u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 &#8212; COCO.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8d4\/db0\/ee6\/8d4db0ee6d3642a745cd11a5180efda7.jpg\" alt=\"\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\" title=\"\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d4\/db0\/ee6\/8d4db0ee6d3642a745cd11a5180efda7.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>3.2: \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/strong><\/p>\n<pre><code class=\"python\">import zipfile<\/code><\/pre>\n<pre><code class=\"python\">archive = zipfile.ZipFile('rtsd-dataset.zip', 'r') archive.extractall('.')<\/code><\/pre>\n<p><strong>3.3: \u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0441\u044f, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c<\/strong><\/p>\n<pre><code class=\"python\">os.remove('rtsd-dataset.zip')<\/code><\/pre>\n<h4>4: \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 YOLO-\u0444\u043e\u0440\u043c\u0430\u0442<\/h4>\n<p><strong>4.1: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd from tqdm.notebook import tqdm from shutil import copyfile, move import sys import json from ipywidgets import FloatProgress<\/code><\/pre>\n<p><strong>4.2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u00a0<a href=\"https:\/\/ultralytics.com\/\" rel=\"noopener noreferrer nofollow\"><u>Ultralytics<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u042d\u0442\u043e \u043f\u0430\u043f\u043a\u0430 JSON2YOLO. \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0421OCO-\u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 YOLO-\u0444\u043e\u0440\u043c\u0430\u0442. \u0421\u043e\u0432\u0435\u0442\u0443\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Google Colab. \u0423 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u043a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. <\/p>\n<pre><code class=\"python\">from JSON2YOLO.general_json2yolo import convert_coco_json sys.path.append('.\/JSON2YOLO')  test_path = 'test_annotation' train_path = 'train_annotation'  os.makedirs(train_path, exist_ok=True) os.makedirs(test_path, exist_ok=True)<\/code><\/pre>\n<pre><code class=\"python\">move('train_anno.json', os.path.join(train_path, 'train_anno.json')) move('val_anno.json', os.path.join(test_path, 'val_anno.json'))<\/code><\/pre>\n<pre><code class=\"python\">for folder in ['labels', 'images']:     for path in [test_path, train_path]:         os.makedirs(os.path.join(path, folder), exist_ok=True)<\/code><\/pre>\n<pre><code class=\"python\">convert_coco_json(train_path) for file in tqdm(os.listdir(os.path.join('new_dir\/labels\/train_anno'))):     move(os.path.join('new_dir\/labels\/train_anno', file), os.path.join(train_path, 'labels', file))  convert_coco_json('.\/test_annotation\/') for file in tqdm(os.listdir(os.path.join('new_dir\/labels\/val_anno'))):     move(os.path.join('new_dir\/labels\/val_anno', file), os.path.join(test_path, 'labels', file))<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445 \ud83d\ude42<\/p>\n<pre><code class=\"python\">test_labels = os.listdir(os.path.join(test_path, 'labels')) train_labels = os.listdir(os.path.join(train_path, 'labels'))  test_labels = set(map(lambda x: x.split('.')[0], test_labels)) train_labels = set(map(lambda x: x.split('.')[0], train_labels))<\/code><\/pre>\n<pre><code class=\"python\">images = 'rtsd-frames\/rtsd-frames' for file in os.listdir(images):     name = file.split('.')[0]     if name in train_labels:         move(os.path.join(images, file), os.path.join(train_path,'images', file))     if name in test_labels:         move(os.path.join(images, file), os.path.join(test_path,'images', file))<\/code><\/pre>\n<h3>5: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 YAML \u0444\u0430\u0439\u043b\u043e\u043c<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b &#171;trafic_signs.yaml&#187; \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0443\u0442\u0435\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f YOLOv8.  <\/p>\n<p><strong>5.1: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 yaml \u0432 \u0444\u0430\u0439\u043b.<\/strong><\/p>\n<pre><code class=\"python\">%pip install PyYAML==5.1<\/code><\/pre>\n<p><strong>5.2: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0443<\/strong><\/p>\n<pre><code class=\"python\">import yaml<\/code><\/pre>\n<p><strong>5.3: \u041e\u043f\u0438\u0448\u0435\u043c \u043f\u0443\u0442\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<pre><code class=\"python\">data = [{     'train': '\/content\/train_annotation\/images',     'val': '\/content\/test_annotation\/images',     'nc': 155,     'names': ['2_1', '1_23', '1_17', '3_24', '8_2_1', '5_20', '5_19_1', '5_16', '3_25',               '6_16', '7_15', '2_2', '2_4', '8_13_1', '4_2_1', '1_20_3', '1_25', '3_4', '8_3_2',               '3_4_1', '4_1_6', '4_2_3', '4_1_1', '1_33', '5_15_5', '3_27', '1_15', '4_1_2_1',               '6_3_1', '8_1_1', '6_7', '5_15_3', '7_3', '1_19', '6_4', '8_1_4', '8_8', '1_16',               '1_11_1', '6_6', '5_15_1', '7_2', '5_15_2', '7_12', '3_18', '5_6', '5_5', '7_4',               '4_1_2', '8_2_2', '7_11', '1_22', '1_27', '2_3_2', '5_15_2_2', '1_8', '3_13',               '2_3', '8_3_3', '2_3_3', '7_7', '1_11', '8_13', '1_12_2', '1_20', '1_12', '3_32',               '2_5', '3_1', '4_8_2', '3_20', '3_2', '2_3_6', '5_22', '5_18', '2_3_5', '7_5',               '8_4_1', '3_14', '1_2', '1_20_2', '4_1_4', '7_6', '8_1_3', '8_3_1', '4_3', '4_1_5',               '8_2_3', '8_2_4', '1_31', '3_10', '4_2_2', '7_1', '3_28', '4_1_3', '5_4', '5_3',               '6_8_2', '3_31', '6_2', '1_21', '3_21', '1_13', '1_14', '2_3_4', '4_8_3', '6_15_2',               '2_6', '3_18_2', '4_1_2_2', '1_7', '3_19', '1_18', '2_7', '8_5_4', '5_15_7', '5_14',               '5_21', '1_1', '6_15_1', '8_6_4', '8_15', '4_5', '3_11', '8_18', '8_4_4', '3_30',               '5_7_1', '5_7_2', '1_5', '3_29', '6_15_3', '5_12', '3_16', '1_30', '5_11', '1_6',               '8_6_2', '6_8_3', '3_12', '3_33', '8_4_3', '5_8', '8_14', '8_17', '3_6', '1_26',               '8_5_2', '6_8_1', '5_17', '1_10', '8_16', '7_18', '7_14', '8_23'] }]<\/code><\/pre>\n<pre><code class=\"python\">def write_yaml_to_file(py_obj, filename) :     with open(f'{filename}.yaml', 'w+',) as f:         yaml.dump_all(py_obj, f, sort_keys=False) write_yaml_to_file(data, 'trafic_signs')<\/code><\/pre>\n<h3>6: \u0414\u043e\u043f. \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h3>\n<p><strong>6.1: \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">%pip install ultralytics<\/code><\/pre>\n<h3>7: \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \ud83d\ude42<\/p>\n<p><strong>7.1: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">from ultralytics import YOLO import torch import gc<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0437\u0430\u0447\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0442\u044c torch \u0438 gc, \u0442\u043e \u0434\u0430\u043c \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442. \u041e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435:<\/p>\n<pre><code class=\"python\">gc.collect() torch.cuda.empty_cache()<\/code><\/pre>\n<p><strong>7.2: \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c<\/strong><\/p>\n<pre><code class=\"python\">model = YOLO('yolov8s.pt')  results = model.train(    data='\/content\/trafic_signs.yaml',    imgsz=1280,    epochs=5,    batch=6,    device=0,    name='YOLOv8s' )<\/code><\/pre>\n<p>P.s. \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u043e\u043b\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0434 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u0430\u0442\u0447\u0435\u0439, \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u0438\u0442 5 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 colab, \u0442.\u043a. \u0442\u0430\u043c \u0432\u0441\u0435\u0433\u043e 15\u0433\u0431 GPU_mem. \u041d\u0443 \u0438\u043b\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 <a href=\"https:\/\/docs.ultralytics.com\/models\/yolov8\/#supported-modes\" rel=\"noopener noreferrer nofollow\">YOLOv8<\/a>, \u0430 \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u043f\u043e\u0445 \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0443\u0442 \u0443\u0436\u0435 \u0432\u0441\u0451 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \ud83d\ude42<\/p>\n<h3>8: \u0418\u0442\u043e\u0433\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443 \ud83d\ude42<\/p>\n<pre><code class=\"python\">model = YOLO(\"\u043f\u0443\u0442\u044c \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443 \u0432\u0435\u0441\u0443 -> best.pt\")<\/code><\/pre>\n<pre><code class=\"python\">pre = model.predict(     source=\"\u043f\u0443\u0442\u044c \u043a \u0444\u043e\u0442\u043e \/ \u0432\u0438\u0434\u0435\u043e, \u0433\u0434\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c\",      show=True,                                                       imgsz=1280,                                                      hide_labels=True,                                                save=True,                                                       name=\"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432\",                                                      conf=0.1,                                                        )<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc1\/0d8\/4e1\/cc10d84e1b64ea9a47ab2fa749ef4b73.png\" alt=\"\u0442\u0435\u0441\u0442 1\" title=\"\u0442\u0435\u0441\u0442 1\" width=\"1280\" height=\"853\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cc1\/0d8\/4e1\/cc10d84e1b64ea9a47ab2fa749ef4b73.png\"\/><\/p>\n<div><figcaption>\u0442\u0435\u0441\u0442 1<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/006\/34d\/6d9\/00634d6d9eee67bf1bbfdc6ca5cb3aee.png\" alt=\"\u0442\u0435\u0441\u0442 2\" title=\"\u0442\u0435\u0441\u0442 2\" width=\"1500\" height=\"1000\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/006\/34d\/6d9\/00634d6d9eee67bf1bbfdc6ca5cb3aee.png\"\/><\/p>\n<div><figcaption>\u0442\u0435\u0441\u0442 2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1bd\/a6d\/e74\/1bda6de7429e8ec9bc2f4976e54f8dd4.png\" alt=\"\u0442\u0435\u0441\u0442 3\" title=\"\u0442\u0435\u0441\u0442 3\" width=\"1524\" height=\"821\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bd\/a6d\/e74\/1bda6de7429e8ec9bc2f4976e54f8dd4.png\"\/><\/p>\n<div><figcaption>\u0442\u0435\u0441\u0442 3<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443 \u043c\u0435\u043d\u044f \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443 \u0432\u0441\u0435\u0433\u043e 4 \u044d\u043f\u043e\u0445\u0438 (\u0432\u044b\u0448\u043b\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 6 \u0447\u0430\u0441\u043e\u0432), \u043d\u0430 5 \u044d\u043f\u043e\u0445\u0435 Google colab \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u044f \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u0430 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u0430\u0432 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0438 \u0443\u0434\u0430\u043b\u0438\u0432 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u043e\u0432\u0435\u0442 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043d\u0430 colab, \u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0439\u0442\u0435 \u0432\u0435\u0441\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u044d\u043f\u043e\u0445\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0430 \u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443 \u0438 \u0432\u0441\u0451. \u0414\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044f \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u044e \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 2 \u0444\u043e\u0442\u043a\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u043a\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u0441\u0442\u043e\u043b\u0431\u0430, \u043d\u043e \u0434\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c. \u041d\u0430 3 \u0442\u0435\u0441\u0442\u0435 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0432\u0430\u043a\u0443\u0430\u0442\u043e\u0440\u0430, \u0445\u043e\u0442\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 2 \u0435\u0439 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438. \u0418\u0442\u043e\u0433\u0438 \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439!<\/p>\n<p>\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0438\u0437\u0443\u0447\u0430\u0442\u044c CV \u0438 ML, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\/\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u0442\u043e \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0439\u0442\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c, \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u0430 \ud83d\ude42<\/p>\n<p><strong>\u041d\u0443 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043e\u0447\u043a\u0438:<\/strong>\u00a0<a href=\"https:\/\/github.com\/E-Kozyreva\/traffic_sign_detection_yolov8s\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>,\u00a0<a href=\"https:\/\/t.me\/katapp_code\" rel=\"noopener noreferrer nofollow\">Telegram<\/a>  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/754206\/\"> https:\/\/habr.com\/ru\/articles\/754206\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0420\u0435\u0448\u0438\u043b\u0430 \u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440 \u0441 \u043d\u043e\u0432\u044b\u043c \u043c\u0438\u043d\u0438-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f YOLOv8. \u0427\u0442\u043e \u0436, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<h3>1: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Google Colab<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"https:\/\/colab.google\/\" rel=\"noopener noreferrer nofollow\">Google colab<\/a> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c New Notebook. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0451 \u0441\u043e\u0437\u0434\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0438\u0449\u0435\u043c &lt;\u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f>. \u0414\u0430\u043b\u044c\u0448\u0435 \u0442\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u0421\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f -> T4 GPU -> \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. (\u041f\u043e \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u044e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 2 \u0440\u0430\u0437\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u044f\u043b\u0430 \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f CPU, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435). <\/p>\n<p>P.s. \u043c\u0435\u043d\u044f \u0437\u0430\u0431\u0430\u043d\u0438\u043b\u0438 \u043f\u043e\u043a\u0430 \u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 (\u044f \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0435\u0449\u0451 \u043d\u0438 \u0440\u0430\u0437\u0443 \u0441 Google Colab, \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043f\u043a\u0430\u043c\u0438):<br \/><strong>1:<\/strong> \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 GPU \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e. <br \/><strong>2:<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0431\u043b\u043e\u043a\u043d\u043e\u0442 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 GPU, \u043a\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434.<br \/><strong>\u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u044d\u0442\u043e:<\/strong> \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044e (GPU) \u0438\u0437-\u0437\u0430 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Colab.<\/p>\n<p>\u0422\u0430\u043a-\u0441, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0441\u0451 \u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043b\u043e\u0441\u044c: <\/p>\n<pre><code class=\"python\">!nvcc --version<\/code><\/pre>\n<p><code>nvcc: NVIDIA (R) Cuda compiler driver <br \/>Copyright (c) 2005-2022 NVIDIA Corporation <br \/>Built on Wed_Sep_21_10:33:58_PDT_2022 <br \/>Cuda compilation tools, release 11.8, V11.8.89 <br \/>Build cuda_11.8.r11.8\/compiler.31833905_0<\/code>  <\/p>\n<pre><code class=\"python\">!nvidia-smi<\/code><\/pre>\n<p><code>Sat Aug 12 08:27:04 2023      <br \/>NVIDIA-SMI 525.105.17   Driver Version: 525.105.17   CUDA Version: 12.0 <br \/>...<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b, \u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \ud83d\ude42<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u0441\u0440\u0430\u0437\u0443 \u0443\u0434\u0430\u043b\u0438\u043c \u043f\u0430\u043f\u043a\u0443 sample_data, \u0430 \u0442\u043e \u043e\u043d\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c \u043c\u0435\u0448\u0430\u0442\u044c\u0441\u044f.<\/p>\n<pre><code class=\"python\">!rm -rf .\/sample_data<\/code><\/pre>\n<h3>2: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0442\u0438\u043b\u0438\u0442<\/h3>\n<p><strong>2.1: \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/strong><\/p>\n<pre><code class=\"python\">!git clone https:\/\/github.com\/ultralytics\/JSON2YOLO<\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438:<br \/><strong>1:<\/strong> \u0412 \u0444\u0430\u0439\u043b\u0435 general_json2yolo.py \u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 274 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0430 <code>h, w, f = img['height'], img['width'], img['file_name'].split('\/')[1]<\/code> . <\/p>\n<p><strong>2:<\/strong> \u0412 general_json2yolo.py \u0438 labelbox_json2yolo.py, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c utils \u0442\u043e\u0447\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0442\u0430\u043a <code>from .utils import ...<\/code>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044e:<br \/><strong>1:<\/strong> \u041c\u0435\u0442\u043e\u0434 <code>.split('\/')<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 <code>img['file_name']<\/code> \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443 <code>\/<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a. \u0417\u0430\u0442\u0435\u043c <code>[1]<\/code> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f <code>\/<\/code>. \u0421\u0442\u0440\u043e\u043a\u0430 <code>img['file_name']<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043b\u0435\u0448\u0430\u043c\u0438 <code>\/<\/code>, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0431\u0435\u0437 \u043f\u0443\u0442\u0438.  <\/p>\n<p><strong>2:<\/strong> \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0430, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043b\u0435\u0437\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0441\u0442\u044c. \u041d\u0430 \u0441\u0432\u043e\u0435\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0442\u0430\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e, \u043d\u043e \u0432 Google Colab \u043e\u043d\u0430 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432\u044b\u043b\u0435\u0437\u043b\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u0430 \ud83d\ude42<\/p>\n<p>\u0422\u0430\u043a-\u0441, \u0438\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435!<\/p>\n<p><strong>2.2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/strong><\/p>\n<pre><code class=\"python\">%pip install -r \/content\/JSON2YOLO\/requirements.txt<\/code><\/pre>\n<pre><code class=\"python\">%pip install kaggle ipywidgets widgetsnbextension<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 successfully installed, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0443!<\/p>\n<h3>3: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c<\/h3>\n<p><strong>3.1: \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442<\/strong><\/p>\n<pre><code class=\"python\">import os<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.kaggle.com\/\" rel=\"noopener noreferrer nofollow\">Kaggle<\/a>. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 -> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0433\u043e, \u0430 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Settings -> API -> Create New Token. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f json \u0444\u0430\u0439\u043b, \u0442\u0430\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">os.environ['KAGGLE_USERNAME'] = \"\u0441\u044e\u0434\u0430 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0437 json username\" os.environ['KAGGLE_KEY'] = \"\u0430 \u0441\u044e\u0434\u0430 key\" !kaggle datasets download -d watchman\/rtsd-dataset<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u0430\u043c\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u043f\u043e\u043a\u0430 \u043e\u043d \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<a href=\"https:\/\/www.kaggle.com\/datasets\/watchman\/rtsd-dataset\" rel=\"noopener noreferrer nofollow\"> RTSD<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0430\u0434\u0440\u044b, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439\u00a0<a href=\"http:\/\/geocenter-consulting.ru\/\" rel=\"noopener noreferrer nofollow\"><u>&#171;\u0413\u0435\u043e\u0446\u0435\u043d\u0442\u0440 \u041a\u043e\u043d\u0441\u0430\u043b\u0442\u0438\u043d\u0433&#187;<\/u><\/a>. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441 \u0448\u0438\u0440\u043e\u043a\u043e\u0444\u043e\u0440\u043c\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 5 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 1280\u00d7720 \u0434\u043e 1920\u00d71080. \u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430, \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0433\u043e\u0434\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 . \u0412 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 155 \u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 &#8212; COCO.  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p><strong>3.2: \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/strong><\/p>\n<pre><code class=\"python\">import zipfile<\/code><\/pre>\n<pre><code class=\"python\">archive = zipfile.ZipFile('rtsd-dataset.zip', 'r') archive.extractall('.')<\/code><\/pre>\n<p><strong>3.3: \u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0441\u044f, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c<\/strong><\/p>\n<pre><code class=\"python\">os.remove('rtsd-dataset.zip')<\/code><\/pre>\n<h4>4: \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 YOLO-\u0444\u043e\u0440\u043c\u0430\u0442<\/h4>\n<p><strong>4.1: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">import pandas as pd from tqdm.notebook import tqdm from shutil import copyfile, move import sys import json from ipywidgets import FloatProgress<\/code><\/pre>\n<p><strong>4.2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u00a0<a href=\"https:\/\/ultralytics.com\/\" rel=\"noopener noreferrer nofollow\"><u>Ultralytics<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u042d\u0442\u043e \u043f\u0430\u043f\u043a\u0430 JSON2YOLO. \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0421OCO-\u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 YOLO-\u0444\u043e\u0440\u043c\u0430\u0442. \u0421\u043e\u0432\u0435\u0442\u0443\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Google Colab. \u0423 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u0435\u0441\u043b\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u043a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. <\/p>\n<pre><code class=\"python\">from JSON2YOLO.general_json2yolo import convert_coco_json sys.path.append('.\/JSON2YOLO')  test_path = 'test_annotation' train_path = 'train_annotation'  os.makedirs(train_path, exist_ok=True) os.makedirs(test_path, exist_ok=True)<\/code><\/pre>\n<pre><code class=\"python\">move('train_anno.json', os.path.join(train_path, 'train_anno.json')) move('val_anno.json', os.path.join(test_path, 'val_anno.json'))<\/code><\/pre>\n<pre><code class=\"python\">for folder in ['labels', 'images']:     for path in [test_path, train_path]:         os.makedirs(os.path.join(path, folder), exist_ok=True)<\/code><\/pre>\n<pre><code class=\"python\">convert_coco_json(train_path) for file in tqdm(os.listdir(os.path.join('new_dir\/labels\/train_anno'))):     move(os.path.join('new_dir\/labels\/train_anno', file), os.path.join(train_path, 'labels', file))  convert_coco_json('.\/test_annotation\/') for file in tqdm(os.listdir(os.path.join('new_dir\/labels\/val_anno'))):     move(os.path.join('new_dir\/labels\/val_anno', file), os.path.join(test_path, 'labels', file))<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445 \ud83d\ude42<\/p>\n<pre><code class=\"python\">test_labels = os.listdir(os.path.join(test_path, 'labels')) train_labels = os.listdir(os.path.join(train_path, 'labels'))  test_labels = set(map(lambda x: x.split('.')[0], test_labels)) train_labels = set(map(lambda x: x.split('.')[0], train_labels))<\/code><\/pre>\n<pre><code class=\"python\">images = 'rtsd-frames\/rtsd-frames' for file in os.listdir(images):     name = file.split('.')[0]     if name in train_labels:         move(os.path.join(images, file), os.path.join(train_path,'images', file))     if name in test_labels:         move(os.path.join(images, file), os.path.join(test_path,'images', file))<\/code><\/pre>\n<h3>5: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 YAML \u0444\u0430\u0439\u043b\u043e\u043c<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b &#171;trafic_signs.yaml&#187; \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0443\u0442\u0435\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f YOLOv8.  <\/p>\n<p><strong>5.1: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 yaml \u0432 \u0444\u0430\u0439\u043b.<\/strong><\/p>\n<pre><code class=\"python\">%pip install PyYAML==5.1<\/code><\/pre>\n<p><strong>5.2: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0443<\/strong><\/p>\n<pre><code class=\"python\">import yaml<\/code><\/pre>\n<p><strong>5.3: \u041e\u043f\u0438\u0448\u0435\u043c \u043f\u0443\u0442\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<pre><code class=\"python\">data = [{     'train': '\/content\/train_annotation\/images',     'val': '\/content\/test_annotation\/images',     'nc': 155,     'names': ['2_1', '1_23', '1_17', '3_24', '8_2_1', '5_20', '5_19_1', '5_16', '3_25',               '6_16', '7_15', '2_2', '2_4', '8_13_1', '4_2_1', '1_20_3', '1_25', '3_4', '8_3_2',               '3_4_1', '4_1_6', '4_2_3', '4_1_1', '1_33', '5_15_5', '3_27', '1_15', '4_1_2_1',               '6_3_1', '8_1_1', '6_7', '5_15_3', '7_3', '1_19', '6_4', '8_1_4', '8_8', '1_16',               '1_11_1', '6_6', '5_15_1', '7_2', '5_15_2', '7_12', '3_18', '5_6', '5_5', '7_4',               '4_1_2', '8_2_2', '7_11', '1_22', '1_27', '2_3_2', '5_15_2_2', '1_8', '3_13',               '2_3', '8_3_3', '2_3_3', '7_7', '1_11', '8_13', '1_12_2', '1_20', '1_12', '3_32',               '2_5', '3_1', '4_8_2', '3_20', '3_2', '2_3_6', '5_22', '5_18', '2_3_5', '7_5',               '8_4_1', '3_14', '1_2', '1_20_2', '4_1_4', '7_6', '8_1_3', '8_3_1', '4_3', '4_1_5',               '8_2_3', '8_2_4', '1_31', '3_10', '4_2_2', '7_1', '3_28', '4_1_3', '5_4', '5_3',               '6_8_2', '3_31', '6_2', '1_21', '3_21', '1_13', '1_14', '2_3_4', '4_8_3', '6_15_2',               '2_6', '3_18_2', '4_1_2_2', '1_7', '3_19', '1_18', '2_7', '8_5_4', '5_15_7', '5_14',               '5_21', '1_1', '6_15_1', '8_6_4', '8_15', '4_5', '3_11', '8_18', '8_4_4', '3_30',               '5_7_1', '5_7_2', '1_5', '3_29', '6_15_3', '5_12', '3_16', '1_30', '5_11', '1_6',               '8_6_2', '6_8_3', '3_12', '3_33', '8_4_3', '5_8', '8_14', '8_17', '3_6', '1_26',               '8_5_2', '6_8_1', '5_17', '1_10', '8_16', '7_18', '7_14', '8_23'] }]<\/code><\/pre>\n<pre><code class=\"python\">def write_yaml_to_file(py_obj, filename) :     with open(f'{filename}.yaml', 'w+',) as f:         yaml.dump_all(py_obj, f, sort_keys=False) write_yaml_to_file(data, 'trafic_signs')<\/code><\/pre>\n<h3>6: \u0414\u043e\u043f. \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h3>\n<p><strong>6.1: \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">%pip install ultralytics<\/code><\/pre>\n<h3>7: \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \ud83d\ude42<\/p>\n<p><strong>7.1: \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong><\/p>\n<pre><code class=\"python\">from ultralytics import YOLO import torch import gc<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0437\u0430\u0447\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0442\u044c torch \u0438 gc, \u0442\u043e \u0434\u0430\u043c \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442. \u041e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435:<\/p>\n<pre><code class=\"python\">gc.collect() torch.cuda.empty_cache()<\/code><\/pre>\n<p><strong>7.2: \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c<\/strong><\/p>\n<pre><code class=\"python\">model = YOLO('yolov8s.pt')  results = model.train(    data='\/content\/trafic_signs.yaml',    imgsz=1280,    epochs=5,    batch=6,    device=0,    name='YOLOv8s' )<\/code><\/pre>\n<p>P.s. \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043a\u043e\u043b\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0434 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u0430\u0442\u0447\u0435\u0439, \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u0438\u0442 5 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 colab, \u0442.\u043a. \u0442\u0430\u043c \u0432\u0441\u0435\u0433\u043e 15\u0433\u0431 GPU_mem. \u041d\u0443 \u0438\u043b\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 <a href=\"https:\/\/docs.ultralytics.com\/models\/yolov8\/#supported-modes\" rel=\"noopener noreferrer nofollow\">YOLOv8<\/a>, \u0430 \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u043f\u043e\u0445 \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0443\u0442 \u0443\u0436\u0435 \u0432\u0441\u0451 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \ud83d\ude42<\/p>\n<h3>8: \u0418\u0442\u043e\u0433\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443 \ud83d\ude42<\/p>\n<pre><code class=\"python\">model = YOLO(\"\u043f\u0443\u0442\u044c \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443 \u0432\u0435\u0441\u0443 -> best.pt\")<\/code><\/pre>\n<pre><code class=\"python\">pre = model.predict(     source=\"\u043f\u0443\u0442\u044c \u043a \u0444\u043e\u0442\u043e \/ \u0432\u0438\u0434\u0435\u043e, \u0433\u0434\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c\",      show=True,                                                       imgsz=1280,                                                      hide_labels=True,                                                save=True,                                                       name=\"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043f\u043a\u0438 \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432\",                                                      conf=0.1,                                                        )<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0442\u0435\u0441\u0442 1<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0442\u0435\u0441\u0442 2<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0442\u0435\u0441\u0442 3<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443 \u043c\u0435\u043d\u044f \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0443 \u0432\u0441\u0435\u0433\u043e 4 \u044d\u043f\u043e\u0445\u0438 (\u0432\u044b\u0448\u043b\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 6 \u0447\u0430\u0441\u043e\u0432), \u043d\u0430 5 \u044d\u043f\u043e\u0445\u0435<\/p>\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-352000","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352000","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=352000"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352000\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=352000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=352000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=352000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}