Comments (11)
你打印一下网络结构看看对不对
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.
我做过实验 你要训练到很后面才会开始有效果
请问一般要多久才开始有效果?@luotianhang
我尝试了icdar2015,基本上要train到第20-30个epoch才有效果
from pytorchocr.
Related Issues (20)
- python tools/infer_rec.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml HOT 6
- 请问目前转换成onnx格式推理的功能可以使用了吗 HOT 3
- 请问cls的模型有开源参数吗 HOT 2
- 在det模型中,如何调节检测框之间合并的间距阈值
- use the comand to run the train report the warning,any one have the same warning? HOT 1
- 训练ch_PP-OCRv3_rec不收敛,CTCLOSS到50就不降了 HOT 1
- ch_ppocr_mobile_v2.0_cls_train 的 config文件是不是没上传? HOT 3
- cls_mv3 模型权重是不是忘了上传了? 链接里没有 HOT 2
- 为什么新样本首次推理速度都会慢? HOT 4
- 文字识别模型的训练数据来源 HOT 3
- predict部分需要三个模型是什么情况? HOT 2
- 检测模型pth转换为onnx报错,configs\det\ch_PP-OCRv3\ch_PP-OCRv3_det_student.yml,
- 训练好的paddle模型,迁移到torch,又转onnx,进行推理为什么都识别不出来东西 HOT 1
- 大佬你好 ,想问个关于模型大小的问题 HOT 1
- 转trt HOT 1
- onnx2trt HOT 1
- 关于paddleocr库代码中使用这个配置ch_PP-OCRv4_rec_distill.yml进行文本识别训练代码bug HOT 1
- predicts = predicts['res'] HOT 2
- Train HOT 3
- 训练报错,求救大佬 HOT 1
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.