ygfrancois / crnn.pytorch.tensorrt.chinese

A Chinese characters recognition repository with tensorrt format supported based on CRNN_Chinese_Characters_Rec and TensorRTx.
16 stars 6 forks source link

CRNN如何处理宽度不同的图片 #5

Open zhong-xin opened 3 years ago

zhong-xin commented 3 years ago

CRNN的输入是把图片的高度放缩到32,如果按照相同的比例将宽放缩,此时不同的图片的宽度是不一样的,这种情况应该如何训练模型?

ygfrancois commented 3 years ago

一般会先设置一个最长长度,例如160,具体可以根据你的数据集来,为了防止文字变形,根据宽高比把长宽缩放到32160内,如果这个时候突然是32140,再在另外20的地方补0,我的代码里面应该是用的这种pad的方式 发自 网易邮箱大师 ---- 回复的原邮件 ---- 发件人 @.> 日期 2021年07月01日 10:26 收件人 @.> 抄送至 @.***> 主题 [ygfrancois/crnn.pytorch.tensorrt.chinese] CRNN如何处理宽度不同的图片 (#5) CRNN的输入是把图片的高度放缩到32,如果按照相同的比例将宽放缩,此时不同的图片的宽度是不一样的,这种情况应该如何训练模型? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.