Comments (10)
你打印一下网络结构看看对不对
from pytorchocr.
@hhhhhhogan 抱歉,才看到这个issue。能烦请你上传一下你的对应的图片,以及你的onehot的结果么?
from pytorchocr.
你好,我这里使用icdar 2017数据集训练,发现准确率一直为0,使用的配置项为rec_train_config.py,没有做什么太大的修改,只是修改了batch_size,alphabet的路径,dataset的路径,训练时log的打印如下:
期间进入到RecMetric.py中查看模型的输出值predictions,发现里面预测的结果都为0,0,0...0的tensor训练数据的标注如下(图片路径与文字内容中间以\t进行分割):
E:\DataSets\icdar2017rctw\icdar2017rctw\recognition\train\image_0_0.jpg 金氏眼镜
E:\DataSets\icdar2017rctw\icdar2017rctw\recognition\train\image_0_1.jpg 创于1989
E:\DataSets\icdar2017rctw\icdar2017rctw\recognition\train\image_0_2.jpg 城建店alphabet中的信息如下,一共5529个字符,加上blank的话那么最后的类别数n_class设置为5530:
另外config中的设置项:
2020-11-05 15:10:33,337 - torchocr - INFO - {'exp_name': 'CRNN', 'train_options': {'resume_from': '', 'third_party_name': '', 'checkpoint_save_dir': './output/CRNN/checkpoint', 'device': 'cuda:0', 'epochs': 200, 'fine_tune_stage': ['backbone', 'neck', 'head'], 'print_interval': 20, 'val_interval': 3000, 'ckpt_save_type': 'HighestAcc', 'ckpt_save_epoch': 4}, 'SEED': 927, 'optimizer': {'type': 'Adam', 'lr': 0.001, 'weight_decay': 0.0001}, 'lr_scheduler': {'type': 'StepLR', 'step_size': 60, 'gamma': 0.1}, 'model': {'type': 'RecModel', 'backbone': {'type': 'ResNet', 'layers': 18}, 'neck': {'type': 'PPaddleRNN'}, 'head': {'type': 'CTC', 'n_class': 5530}, 'in_channels': 3}, 'loss': {'type': 'CTCLoss', 'blank_idx': 0}, 'dataset': {'alphabet': 'E:/pro/ncnn_ocr/models/keys.txt', 'train': {'dataset': {'type': 'RecTextLineDataset', 'file': 'E:/pro/chineseocr-master/train/ocr/txt/icdar2017Backup.txt', 'input_h': 32, 'mean': 0.5, 'std': 0.5, 'augmentation': False}, 'loader': {'type': 'DataLoader', 'batch_size': 4, 'shuffle': True, 'num_workers': 1, 'collate_fn': {'type': 'RecCollateFn', 'img_w': 120}}}, 'eval': {'dataset': {'type': 'RecTextLineDataset', 'file': 'E:/pro/chineseocr-master/train/ocr/txt/2017valBackup.txt', 'input_h': 32, 'mean': 0.5, 'std': 0.5, 'augmentation': False}, 'loader': {'type': 'RecDataLoader', 'batch_size': 4, 'shuffle': False, 'num_workers': 1, 'collate_fn': {'type': 'RecCollateFn', 'img_w': 120}}}}}希望得到回复,谢谢!
你好,,请问你解决这个问题了吗?我也遇到了这个问题
from pytorchocr.
您好,我也遇到了这个问题,请问您是怎么解决的
from pytorchocr.
我也是这个问题
from pytorchocr.
重新拉取代码,并升级下pytorch的版本,到1.7试试。
@wzl639
from pytorchocr.
重新拉取代码,并升级下pytorch的版本,到1.7试试。
@wzl639
感谢解答 但是我的torch是1.7
from pytorchocr.
重新拉取代码,并升级下pytorch的版本,到1.7试试。
@wzl639
感谢解答 但是我的torch是1.7
博主我还有一个问题 单独发出来 能帮我看看吗
from pytorchocr.
我做过实验 你要训练到很后面才会开始有效果
from pytorchocr.
我做过实验 你要训练到很后面才会开始有效果
请问一般要多久才开始有效果?@luotianhang
from pytorchocr.
Related Issues (20)
- CRNN根本跑不通 HOT 2
- 只有“百度网盘pytorchocr/det/imagenet”里的预训练模型能用吗? HOT 2
- 为何训练时精度高,对训练集推理就全错? HOT 1
- det_infer 推理没转成rgb, 训练验证都是rgb 会导致结果不一致。。 HOT 1
- 使用提供的预训练模型进行文本检测出错
- 训练识别网络的问题验证准确率只有0.3 HOT 1
- 识别网络大家用的多大的数据集呀? 准确率能够达到多少呀? 我训练mjsynth,只能够到83左右
- CRNN中文训练不收敛,只有lr=0.005才勉强能慢慢收敛,非常慢 HOT 1
- MobileNetV3 small CRNN训练跑不满GPU HOT 1
- 如何使用convnext swintransformer的预训练模型
- 启动训练报这个错误怎么解决?图片的label txt文件里,相对路径在哪里设置? HOT 2
- 没看到保存的pth文件 HOT 1
- loss:nan怎么解决? HOT 1
- 同样的数据,代码,在colab训练没有nan错误,在win10上就会出现nan错误,是怎么解决? HOT 1
- 有没有本项目crnn pth训练结果 转onnx的代码?
- 大佬们你们训练的时候速度是多少?为什么我这里这么👨
- 文本识别: RecLmdbDataset数据集存在严重bug
- 您好,作者,请问可以加载paddle的检测模型进行微调训练吗? HOT 4
- 识别模型训练时如何开启数据增强 HOT 2
- pytorchOCR中的DBNet与文幕纯DBNet精度差别大
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorchocr.