公司网站放哪些内容百度网站建立
2026/4/18 13:42:43 网站建设 项目流程
公司网站放哪些内容,百度网站建立,文字图片制作网站,莱芜征婚吧PaddleOCR#xff0c;github 60K star#xff0c;OCR效果非常好#xff0c;目前是最好的OCR软件。 官网#xff1a;PaddleOCR - 文档解析与智能文字识别 | 支持API调用与MCP服务 - 飞桨星河社区 除了在官网直接提交文档进行文字识别#xff0c;还可以使用api调用官方的a…PaddleOCRgithub 60K starOCR效果非常好目前是最好的OCR软件。官网PaddleOCR - 文档解析与智能文字识别 | 支持API调用与MCP服务 - 飞桨星河社区除了在官网直接提交文档进行文字识别还可以使用api调用官方的api服务尤其是现在免费调用额度已经提高到每个模型每天3000页啦PaddleOCR三个模型的介绍PaddleOCR-VL 介绍PaddleOCR-VL是一款先进、高效的文档解析模型专为文档中的元素识别设计。其核心组件为 PaddleOCR-VL-0.9B这是一种紧凑而强大的视觉语言模型VLM它由 NaViT 风格的动态分辨率视觉编码器与 ERNIE-4.5-0.3B 语言模型组成能够实现精准的元素识别。该模型支持 109 种语言并在识别复杂元素如文本、表格、公式和图表方面表现出色同时保持极低的资源消耗。通过在广泛使用的公开基准与内部基准上的全面评测PaddleOCR-VL 在页级级文档解析与元素级识别均达到 SOTA 表现。它显著优于现有的基于Pipeline方案和文档解析多模态方案以及先进的通用多模态大模型并具备更快的推理速度。这些优势使其非常适合在真实场景中落地部署。PP-OCRv5 介绍OCR光学字符识别Optical Character Recognition是一项将图片中的文字内容转换为可编辑文本的技术广泛应用于文档数字化、信息提取、数据处理等场景。OCR 能够识别印刷体、手写体等多种类型的文本帮助用户高效获取图像中的关键信息。PP-OCRv5是 PP-OCR 系列最新一代的文字识别解决方案专为多场景、多文字类型的识别任务设计。相比前代版本PP-OCRv5 在文字类型支持和应用场景适应性方面实现了全面升级。该方案不仅能够返回文本行的坐标信息还可输出对应文本内容及其置信度有效提升了文字检测与识别的准确性和实用性PP-StructureV3 产线介绍PP-StructureV3是一套高效、全面的文档解析解决方案能够从各类文档图像和PDF文件中提取结构化信息。通过结合光学字符识别OCR、图像处理和深度学习等前沿技术PP-StructureV3能够识别并提取文档中的文本块、标题、段落、图片、表格、公式、图表等多种元素将复杂的文档内容转化为机器可读的数据格式如Markdown、JSON极大提升了文档数据处理的效率和准确性。调用说明每个模型每天3000页额度每次调用为100页额度如果超过100页只会返回前100页的识别结果。超过额度系统会返回 429 (Too Many Requests) 错误码返回的错误码说明错误码说明解决建议403Token 错误检查 Token 是否正确或 URL 是否与 Token 匹配429超出单日解析最大页数请使用其他模型或稍后再试500传参错误请确保参数类型及 fileType 正确503当前请求过多请稍后再试504网关超时请稍后再试python调用api其中的url使用星河社区url每个用户会给一个单独的url和token。比如我的PaddleOCR-VLAPI_URL https://e3vdv522q82encq6.aistudio-app.com/layout-parsing ,PP-OCRv5则是:API_URL https://a35cc4ma17eea0x4.aistudio-app.com/ocr# Please make sure the requests library is installed # pip install requests import base64 import os import requests # API_URL 及 TOKEN 请访问 [PaddleOCR 官网](https://aistudio.baidu.com/paddleocr/task) 在 API 调用示例中获取。 API_URL your url TOKEN access token file_path local file path with open(file_path, rb) as file: file_bytes file.read() file_data base64.b64encode(file_bytes).decode(ascii) headers { Authorization: ftoken {TOKEN}, Content-Type: application/json } required_payload { file: file_data, fileType: file type, # For PDF documents, set fileType to 0; for images, set fileType to 1 } optional_payload { useDocOrientationClassify: False, useDocUnwarping: False, useChartRecognition: False, } payload {**required_payload, **optional_payload} response requests.post(API_URL, jsonpayload, headersheaders) print(response.status_code) assert response.status_code 200 result response.json()[result] output_dir output os.makedirs(output_dir, exist_okTrue) for i, res in enumerate(result[layoutParsingResults]): md_filename os.path.join(output_dir, fdoc_{i}.md) with open(md_filename, w, encodingutf-8) as md_file: md_file.write(res[markdown][text]) print(fMarkdown document saved at {md_filename}) for img_path, img in res[markdown][images].items(): full_img_path os.path.join(output_dir, img_path) os.makedirs(os.path.dirname(full_img_path), exist_okTrue) img_bytes requests.get(img).content with open(full_img_path, wb) as img_file: img_file.write(img_bytes) print(fImage saved to: {full_img_path}) for img_name, img in res[outputImages].items(): img_response requests.get(img) if img_response.status_code 200: # Save image to local filename os.path.join(output_dir, f{img_name}_{i}.jpg) with open(filename, wb) as f: f.write(img_response.content) print(fImage saved to: {filename}) else: print(fFailed to download image, status code: {img_response.status_code})实践api调用url和token获取代码里面的token和url都可以从官网获取登录账户后点击官网首页API按钮给出的代码就已经包含了用户的url和token。api代码中还有两个地方需要填写其一为file_path local file path 即待文字识别的图片或pdf文件。其二为fileType: file type, 如果是 PDF 文档填0如果是图片填1调用代码代码参考如下# Please make sure the requests library is installed # pip install requests import base64 import os import requests API_URL https://e3vdv522q82encq6.aistudio-app.com/layout-parsing TOKEN 6cac** file_path local file path with open(file_path, rb) as file: file_bytes file.read() file_data base64.b64encode(file_bytes).decode(ascii) headers { Authorization: ftoken {TOKEN}, Content-Type: application/json } required_payload { file: file_data, fileType: file type, # For PDF documents, set fileType to 0; for images, set fileType to 1 } optional_payload { useDocOrientationClassify: False, useDocUnwarping: False, useChartRecognition: False, } payload {**required_payload, **optional_payload} response requests.post(API_URL, jsonpayload, headersheaders) print(response.status_code) assert response.status_code 200 result response.json()[result] output_dir output os.makedirs(output_dir, exist_okTrue) for i, res in enumerate(result[layoutParsingResults]): md_filename os.path.join(output_dir, fdoc_{i}.md) with open(md_filename, w, encodingutf-8) as md_file: md_file.write(res[markdown][text]) print(fMarkdown document saved at {md_filename}) for img_path, img in res[markdown][images].items(): full_img_path os.path.join(output_dir, img_path) os.makedirs(os.path.dirname(full_img_path), exist_okTrue) img_bytes requests.get(img).content with open(full_img_path, wb) as img_file: img_file.write(img_bytes) print(fImage saved to: {full_img_path}) for img_name, img in res[outputImages].items(): img_response requests.get(img) if img_response.status_code 200: # Save image to local filename os.path.join(output_dir, f{img_name}_{i}.jpg) with open(filename, wb) as f: f.write(img_response.content) print(fImage saved to: {filename}) else: print(fFailed to download image, status code: {img_response.status_code})输出信息输出901Markdown document saved at output\doc_0.md19307Image saved to: output\imgs/img_in_image_box_112_116_523_426.jpg34806Image saved to: output\imgs/img_in_image_box_790_467_1278_840.jpg313812Image saved to: output\layout_det_res_0.jpg可以看到输出了1个md文件和3个图片是因为图片里面有一部分被识别为图片了。原图执行效果补等边△ABC边长为a div styletext-align: center;img srcimgs/img_in_image_box_112_116_523_426.jpg altImage width32% //div $$ S_{\Delta A B C}\frac{1}{2}a\cdot\frac{\sqrt{3}}{2}a\frac{\sqrt{3}}{4}a^{2} $$ 专题旋转构造、—奔驰模型 已知△ABC为等边△ $ PA6, PB8 PC10 $ ① 求 $ ∠APB150° $ div styletext-align: center;img srcimgs/img_in_image_box_790_467_1278_840.jpg altImage width38% //div $$ \textcircled{2}S_{\Delta}A B C3625\sqrt{3} $$ 解将△ABC绕点A逆时针旋转 $ 60^{\circ} $ 得到△AP连接由旋转得 $ P^{\prime}A PA 6 \cdot 1 $ $ P^{\prime}B PC 10 $ $ \angle PAP^{\prime} 60^{\circ} $ $ \therefore \triangle PAP^{\prime} $ 为等边三角形 $ PP^{\prime} PA 6 $ $ \angle APP^{\prime} 60^{\circ} $ $ PP^{\prime} 6 $ PB 8 $ P^{\prime}B 10 $ $ \therefore PP^{\prime\prime2} PB^{2} P^{\prime}B^{2} $ $ \therefore \angle BPP^{\prime} 90^{\circ} $效果还是可以的我这里看着输出有点乱是因为手里的md渲染软件表现拉胯。

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询