【文本】ICdar2015 文本数据集

一、官网介绍

https://rrc.cvc.uab.es/?ch=4&com=tasks
官网有四个任务
下载地址 链接:https://pan.baidu.com/s/160FzXzWdo8IPyp88XIIsIg 提取码:qdr2 --来自百度网盘超级会员V2的分享

来自 https://blog.csdn.net/weixin_45779880/article/details/105642393 的分享。

二、任务介绍

  • 2.1 文本定位

    每一个图像对应一个 text文件,并且每行按照 x1, y1, x2, y2, x3, y3, x4, y4, transcription 标注
    且每个点是按照顺时针进行标注。“###” 指无需关注文本内容信息

    训练集 1000张
    测试集 500张
    在这里插入图片描述

提供一个python显示的脚本

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""                  
*  * *** *  * *  *      
*  *  *   **  *  *             
****  *   **  *  *                 
*  *  *   **  *  *         
*  * **  *  * ****                

@File    : read_idcar.py
@Date    : 2022/9/21/021
@Require :
@Author  : hjxu
@Funtion : 读取IDCAR2015  文本信息

"""

import cv2
import numpy as np

if __name__ == "__main__":
    img_path = "./train_images/img_2.jpg"
    txt_file_path = "./train_gts/img_2.jpg.txt"

    img = cv2.imread(img_path)

    txt_file = open(txt_file_path, "r", encoding='utf_8_sig')
    for line in txt_file.readlines():
        x1, y1, x2, y2, x3, y3, x4, y4, text = line.strip().split(",")
        # print(int(x1), int(y1), int(x2), int(y2), int(x3), int(y3), int(x4), int(y4), text)
        contours = [np.array([
            [int(x1), int(y1)], [int(x2), int(y2)], [int(x3), int(y3)],[int(x4), int(y4)]])]
        cv2.drawContours(img, contours, -1, (0, 0, 255), 1)
        cv2.putText(img, text,  [int(x1), int(y1)], 1, 1,  (0, 0, 255))
     # #
    cv2.imshow("name", img)
    cv2.waitKey(0)

2.2 单词识别

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值