{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "# OCR 文本检测实战\n", "\n", "本节将介绍如何使用PaddleOCR完成文本检测DB算法的训练与运行,包括:\n", "1. 快速调用paddleocr包体验文本检测\n", "1. 理解文本检测DB算法原理\n", "2. 掌握文本检测模型构建流程\n", "3. 掌握文本检测模型训练流程\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "# 1. 快速开始\n", "\n", "本节以[paddleocr](https://pypi.org/project/paddleocr/)为例,介绍如何三个步骤快速实现文本检测。\n", "1. 安装[paddleocr](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.4/doc/doc_ch/whl.md)\n", "2. 一行命令运行DB算法得到检测结果\n", "3. 可视化文本检测结果\n", "\n", "\n", "\n", "\n", "**安装paddleocr whl包**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "!pip install --upgrade pip\n", "!pip install paddleocr" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "**一行命令实现文本检测**\n", "\n", "初次运行时,paddleocr会自动下载并使用PaddleOCR的[PP-OCRv2轻量级模型](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.4/README.md#pp-ocr-series-model-listupdate-on-september-8th)。\n", "\n", "使用安装好的paddleocr 以./12.jpg为输入图像,将得到以下预测结果:\n", "\n", "