{"id":346593,"date":"2023-03-11T21:00:59","date_gmt":"2023-03-11T21:00:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346593"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-03-11T21:00:59","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346593","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u044e OCR \u2014 \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/717862\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435 <\/a>\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/59a\/f0c\/609\/59af0c6098e99e0652fe7148b33c2bac.jpg\" width=\"618\" height=\"415\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/59a\/f0c\/609\/59af0c6098e99e0652fe7148b33c2bac.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a>.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u0438\u0441\u043a \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Google<\/p>\n<p><code>from\u00a0google.colab\u00a0import\u00a0drive<\/code><\/p>\n<p><code>drive.mount('\/content\/drive',\u00a0force_remount=True)<\/code><\/p>\n<p>\u0412 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0430\u0440\u0445\u0438\u0432 \u0441 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/github.com\/DonkeySmall\/TextDetectionDataset\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0444\u0430\u0439\u043b\u044b <a href=\"https:\/\/drive.google.com\/file\/d\/1DhWIAiY_ErJpeMYd2h0zhLxZsNM8KCit\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">last.pt<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1CbJLc0WoGF0UwltBs3W8tD34PqzgSEiP\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">text_segment.yaml<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1JfSizIJ1huz9BHte1W_8raxvSlslYlZD\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">hyp.scratch-low.yaml<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1WcCFKtpHgS9TWPLGH1JN5ofND3bUKL5C\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">labels_yolo.zip<\/a><\/p>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0437 GitHub <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a> \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <\/p>\n<p><code>!git\u00a0clone\u00a0https:\/\/github.com\/ultralytics\/yolov5<\/code><\/p>\n<p><code>!pip\u00a0install\u00a0-r\u00a0\/content\/yolov5\/requirements.txt<\/code><\/p>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u0443\u044e \u043b\u0451\u0433\u043a\u0443\u044e \u0438 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c yolov5n-seg \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 yolov5n-seg.yaml \u0447\u0442\u043e \u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \/content\/yolov5\/datasets\/text_detection<\/p>\n<p><code>from\u00a0zipfile\u00a0import\u00a0ZipFile<\/code><\/p>\n<p><code>with\u00a0ZipFile('\/content\/drive\/MyDrive\/sd_text_detection_train.zip',\u00a0'r')\u00a0as\u00a0zipObj:<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0zipObj.extractall('\/content\/yolov5\/datasets\/text_detection')<\/code><\/p>\n<p><code>with\u00a0ZipFile('\/content\/drive\/MyDrive\/labels_yolo.zip',\u00a0'r')\u00a0as\u00a0zipObj:<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0zipObj.extractall('\/content\/yolov5\/datasets\/text_detection\/labels')<\/code>\u00a0\u00a0\u00a0<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/944\/a59\/091\/944a59091ad7743f53f1d568ea29b32d.jpg\" width=\"343\" height=\"263\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/944\/a59\/091\/944a59091ad7743f53f1d568ea29b32d.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0435\u0442\u0438, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c<\/p>\n<p><code>%cd\u00a0\/content\/yolov5<\/code><\/p>\n<p><code>!python\u00a0\"\/content\/yolov5\/segment\/train.py\"\u00a0--img\u00a0800\u00a0--batch\u00a012\u00a0--epochs\u00a01200\u00a0--data\u00a0\"\/content\/drive\/MyDrive\/text_segment.yaml\"\u00a0\\<\/code><\/p>\n<p><code>--hyp\u00a0\"\/content\/drive\/MyDrive\/hyp.scratch-low.yaml\"\u00a0--project\u00a0'\/content\/drive\/MyDrive\/text_detect\/'\u00a0--name\u00a0'weights'\u00a0\\<\/code><\/p>\n<p><code>--weights\u00a0\"\/content\/drive\/MyDrive\/last.pt\"<\/code><\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c 300 \u044d\u043f\u043e\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435, \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u0434\u043d\u043e\u0439 \u044d\u043f\u043e\u0445\u0438 \u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a> \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 1 \u0447\u0430\u0441.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ada\/da0\/3a1\/adada03a185d8573aa07a5cb279cfe02.jpg\" width=\"886\" height=\"116\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ada\/da0\/3a1\/adada03a185d8573aa07a5cb279cfe02.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430 \u043c\u043e\u0451\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0432 Windows 10 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 1 \u044d\u043f\u043e\u0445\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0435 RTX 2060 \u0441 12 \u0413\u0411 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 6 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 SSD \u0434\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u043f\u0443\u0441\u0442\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0434\u043e\u0444\u0438\u0433\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 Google Colab, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<p><code>!python\u00a0\"segment\/predict.py\"\u00a0--imgsz\u00a0800\u00a0--iou-thres\u00a00.25\u00a0--conf-thres\u00a00.5\u00a0--hide-labels\u00a0--hide-conf\u00a0--line-thickness\u00a02\u00a0--device\u00a0\"cpu\"\u00a0--weights\u00a0\"\/content\/drive\/MyDrive\/text_detect\/weights\/weights\/last.pt\"\u00a0--source\u00a0\"\/content\/yolov5\/test\"<\/code>\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/21f\/763\/688\/21f763688b58dbcffeaff04bf19222e8.jpg\" width=\"565\" height=\"683\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21f\/763\/688\/21f763688b58dbcffeaff04bf19222e8.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u043b\u0451\u0433\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432 \u0434\u0432\u043e\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432 TensorFlow Lite \u0432\u0435\u0441 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 \u041c\u0411, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 Redmi Note 10 \u0438\u043f\u043e\u043b\u044c\u0437\u0443\u044f GPU \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 300 \u043c\u0441.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/721758\/\"> https:\/\/habr.com\/ru\/post\/721758\/<\/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 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/717862\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435 <\/a>\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a>.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u0438\u0441\u043a \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Google<\/p>\n<p><code>from\u00a0google.colab\u00a0import\u00a0drive<\/code><\/p>\n<p><code>drive.mount('\/content\/drive',\u00a0force_remount=True)<\/code><\/p>\n<p>\u0412 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0430\u0440\u0445\u0438\u0432 \u0441 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c <a href=\"https:\/\/github.com\/DonkeySmall\/TextDetectionDataset\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0444\u0430\u0439\u043b\u044b <a href=\"https:\/\/drive.google.com\/file\/d\/1DhWIAiY_ErJpeMYd2h0zhLxZsNM8KCit\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">last.pt<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1CbJLc0WoGF0UwltBs3W8tD34PqzgSEiP\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">text_segment.yaml<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1JfSizIJ1huz9BHte1W_8raxvSlslYlZD\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">hyp.scratch-low.yaml<\/a>, <a href=\"https:\/\/drive.google.com\/file\/d\/1WcCFKtpHgS9TWPLGH1JN5ofND3bUKL5C\/view?usp=share_link\" rel=\"noopener noreferrer nofollow\">labels_yolo.zip<\/a><\/p>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0437 GitHub <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a> \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <\/p>\n<p><code>!git\u00a0clone\u00a0https:\/\/github.com\/ultralytics\/yolov5<\/code><\/p>\n<p><code>!pip\u00a0install\u00a0-r\u00a0\/content\/yolov5\/requirements.txt<\/code><\/p>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u0443\u044e \u043b\u0451\u0433\u043a\u0443\u044e \u0438 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c yolov5n-seg \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 yolov5n-seg.yaml \u0447\u0442\u043e \u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \/content\/yolov5\/datasets\/text_detection<\/p>\n<p><code>from\u00a0zipfile\u00a0import\u00a0ZipFile<\/code><\/p>\n<p><code>with\u00a0ZipFile('\/content\/drive\/MyDrive\/sd_text_detection_train.zip',\u00a0'r')\u00a0as\u00a0zipObj:<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0zipObj.extractall('\/content\/yolov5\/datasets\/text_detection')<\/code><\/p>\n<p><code>with\u00a0ZipFile('\/content\/drive\/MyDrive\/labels_yolo.zip',\u00a0'r')\u00a0as\u00a0zipObj:<\/code><\/p>\n<p><code>\u00a0\u00a0\u00a0zipObj.extractall('\/content\/yolov5\/datasets\/text_detection\/labels')<\/code>\u00a0\u00a0\u00a0<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0435\u0442\u0438, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c<\/p>\n<p><code>%cd\u00a0\/content\/yolov5<\/code><\/p>\n<p><code>!python\u00a0\"\/content\/yolov5\/segment\/train.py\"\u00a0--img\u00a0800\u00a0--batch\u00a012\u00a0--epochs\u00a01200\u00a0--data\u00a0\"\/content\/drive\/MyDrive\/text_segment.yaml\"\u00a0\\<\/code><\/p>\n<p><code>--hyp\u00a0\"\/content\/drive\/MyDrive\/hyp.scratch-low.yaml\"\u00a0--project\u00a0'\/content\/drive\/MyDrive\/text_detect\/'\u00a0--name\u00a0'weights'\u00a0\\<\/code><\/p>\n<p><code>--weights\u00a0\"\/content\/drive\/MyDrive\/last.pt\"<\/code><\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/github.com\/ultralytics\/yolov5\" rel=\"noopener noreferrer nofollow\">YOLOv5<\/a> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u044c 300 \u044d\u043f\u043e\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435, \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u0434\u043d\u043e\u0439 \u044d\u043f\u043e\u0445\u0438 \u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a> \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 1 \u0447\u0430\u0441.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u043c\u043e\u0451\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0432 Windows 10 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430 1 \u044d\u043f\u043e\u0445\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0435 RTX 2060 \u0441 12 \u0413\u0411 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 6 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/research.google.com\/colaboratory\/faq.html\" rel=\"noopener noreferrer nofollow\">Google Colab<\/a> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 SSD \u0434\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u043f\u0443\u0441\u0442\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0434\u043e\u0444\u0438\u0433\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 Google Colab, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<p><code>!python\u00a0\"segment\/predict.py\"\u00a0--imgsz\u00a0800\u00a0--iou-thres\u00a00.25\u00a0--conf-thres\u00a00.5\u00a0--hide-labels\u00a0--hide-conf\u00a0--line-thickness\u00a02\u00a0--device\u00a0\"cpu\"\u00a0--weights\u00a0\"\/content\/drive\/MyDrive\/text_detect\/weights\/weights\/last.pt\"\u00a0--source\u00a0\"\/content\/yolov5\/test\"<\/code>\u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u043b\u0451\u0433\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432 \u0434\u0432\u043e\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0432 TensorFlow Lite \u0432\u0435\u0441 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 \u041c\u0411, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 Redmi Note 10 \u0438\u043f\u043e\u043b\u044c\u0437\u0443\u044f GPU \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 300 \u043c\u0441.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/721758\/\"> https:\/\/habr.com\/ru\/post\/721758\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-346593","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346593","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=346593"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346593\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}