cnnyzm icon indicating copy to clipboard operation
cnnyzm copied to clipboard

修改了图片的长宽,貌似获取的图片生成的验证码里面没有,这个是随机生成的吗

Open remberi opened this issue 4 years ago • 7 comments

64 9965 XkOt.jp 8250 Traceback (most recent call last): File "/Users/rember_i/学习/chinaunicom/train.py", line 214, in train() File "/Users/rember_i/学习/chinaunicom/train.py", line 182, in train batch_x, batch_y = next_batch(64) File "/Users/rember_i/学习/chinaunicom/process.py", line 70, in next_batch batch_y[i, :] = text2vec(text_a) File "/Users/rember_i/学习/chinaunicom/process.py", line 21, in text2vec raise ValueError("验证码超过4位啦!") ValueError: 验证码超过4位啦!

remberi avatar Apr 12 '21 03:04 remberi

# 返回特定shape图片
def wrap_gen_captcha_text_and_image(shape=(CAPTCHA_HEIGHT, CAPTCHA_WIDTH, 3)):
    t_list = []
    t = file_name("./yzm")
    for i in t:
        index = i.rfind('-')
        name = i[:index]
        t_list.append(name)
    # print(t_list)
    im = load_allimg()

    im_list = []
    for i in range(0, len(im)):
        if im[i].shape == shape:
            im_list.append(im[i])
    # print(len(im_list))
    # print(len(t_list))
    return t_list, im_list

能解释这个函数的意思的吗

remberi avatar Apr 12 '21 03:04 remberi

确认是读取图片地址的问题,还有请问下这个训练得多久呀

remberi avatar Apr 12 '21 05:04 remberi

确认是读取图片地址的问题,还有请问下这个训练得多久呀

一般推荐训练集越多越好,精准度会更高。

2万图片数量级,大概1-2小时

hellokuls avatar May 18 '21 23:05 hellokuls

为什么我训练的一直都是0.1精度

lsz92cyn avatar May 19 '21 12:05 lsz92cyn

为什么我训练的一直都是0.1精度

多少训练集

hellokuls avatar May 20 '21 10:05 hellokuls

好了,我以为出错了,在1500多次遍历才上升,最后到0.99,但是1万的数据训练了6个小时

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年5月20日(星期四) 晚上6:29 收件人: @.>; 抄送: "风随@@.>; @.>; 主题: Re: [hellokuls/cnnyzm] 修改了图片的长宽,貌似获取的图片生成的验证码里面没有,这个是随机生成的吗 (#3)

为什么我训练的一直都是0.1精度

多少训练集

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

lsz92cyn avatar May 20 '21 10:05 lsz92cyn

好了,我以为出错了,在1500多次遍历才上升,最后到0.99,但是1万的数据训练了6个小时 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年5月20日(星期四) 晚上6:29 收件人: @.>; 抄送: "风随@@.>; @.>; 主题: Re: [hellokuls/cnnyzm] 修改了图片的长宽,貌似获取的图片生成的验证码里面没有,这个是随机生成的吗 (#3) 为什么我训练的一直都是0.1精度 多少训练集 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

训练集要大,最好2万,训练时间跟机器也有关系的

hellokuls avatar May 20 '21 10:05 hellokuls