455 Star 3.5K Fork 865

PaddlePaddle / PaddleOCR

 / 详情

你好,文字检测训练一直卡在__getitem__这里,请问可能是什么情况?

待办的
创建于  
2023-08-08 15:26
暂无描述。

评论 (2)

依诺 创建了任务

--------------------------------------------------配置文件
Global:
use_gpu: false
epoch_num: 500
log_smooth_window: 20
print_batch_step: 10
save_model_dir: ./trained_res
save_epoch_step: 3

evaluation is run every 5000 iterations after the 4000th iteration

eval_batch_step: [0, 2000]
cal_metric_during_train: True
pretrained_model:
checkpoints:
save_inference_dir:
use_visualdl: False
infer_img: doc/imgs_words/ch/word_1.jpg

for data or label process

character_dict_path: D:/hsq/tools/ocr/PaddleOCR/ppocr/utils/ppocr_keys_v1.txt
max_text_length: 25
infer_mode: False
use_space_char: True
save_res_path: ./trained_res

Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.001
warmup_epoch: 5
regularizer:
name: 'L2'
factor: 0.00004

Architecture:
model_type: rec
algorithm: CRNN
Transform:
Backbone:
name: ResNet
layers: 34
Neck:
name: SequenceEncoder
encoder_type: rnn
hidden_size: 256
Head:
name: CTCHead
fc_decay: 0.00004

Loss:
name: CTCLoss

PostProcess:
name: CTCLabelDecode

Metric:
name: RecMetric
main_indicator: acc

Train:
dataset:
name: SimpleDataSet
data_dir: D:/hsq/tools/ocr/PaddleOCR/train_data/
label_file_list: ["D:/hsq/tools/ocr/PaddleOCR/train_data/train/Label.txt"]
transforms:
- DecodeImage: # load image
img_mode: BGR
channel_first: False
- RecAug:
- CTCLabelEncode: # Class handling label
- RecResizeImg:
image_shape: [3, 32, 320]
- KeepKeys:
keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
loader:
shuffle: True
batch_size_per_card: 4 #每次传入训练的image数目
drop_last: True
num_workers: 4

Eval:
dataset:
name: SimpleDataSet
data_dir: D:/hsq/tools/ocr/PaddleOCR/train_data/
label_file_list: ["D:/hsq/tools/ocr/PaddleOCR/train_data/train/Label.txt"]
transforms:
- DecodeImage: # load image
img_mode: BGR
channel_first: False
- CTCLabelEncode: # Class handling label
- RecResizeImg:
image_shape: [3, 32, 320]
- KeepKeys:
keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
loader:
shuffle: False
drop_last: False
batch_size_per_card: 4
num_workers: 4

--------------------------------------------------标签文件
train/03.jpg [{"transcription": "项目5", "points": [[36, 168], [125, 166], [125, 190], [36, 193]], "difficult": false}, {"transcription": "文字的标注与编辑", "points": [[150, 168], [414, 169], [414, 192], [150, 191]], "difficult": false}, {"transcription": "单行文字与多行文字", "points": [[149, 206], [445, 208], [445, 231], [149, 229]], "difficult": false}]
train/04.jpg [{"transcription": "第五讲", "points": [[48, 57], [133, 57], [133, 82], [48, 82]], "difficult": false}, {"transcription": "文字与尺寸标注", "points": [[144, 58], [346, 58], [346, 82], [144, 82]], "difficult": false}, {"transcription": "文字的使用", "points": [[53, 153], [180, 153], [180, 177], [53, 177]], "difficult": false}, {"transcription": "尺寸标注", "points": [[51, 186], [158, 186], [158, 209], [51, 209]], "difficult": false}]
train/05.jpg [{"transcription": "第11讲:文字及标注", "points": [[160, 176], [554, 176], [554, 224], [160, 224]], "difficult": false}, {"transcription": "任务1:文字", "points": [[192, 269], [382, 269], [382, 306], [192, 306]], "difficult": false}, {"transcription": "任务2:标注", "points": [[194, 312], [382, 312], [382, 346], [194, 346]], "difficult": false}]
train/07.jpg [{"transcription": "创建单行文字", "points": [[137, 98], [334, 98], [334, 128], [137, 128]], "difficult": false}, {"transcription": "命令调用方式", "points": [[86, 180], [248, 180], [248, 206], [86, 206]], "difficult": false}, {"transcription": "命令:TEXT或DTEXT", "points": [[70, 218], [323, 218], [323, 241], [70, 241]], "difficult": false}, {"transcription": "命令快捷方式:DT", "points": [[70, 255], [282, 255], [282, 278], [70, 278]], "difficult": false}, {"transcription": "菜单:绘图一文字一单行文字", "points": [[69, 293], [408, 293], [408, 316], [69, 316]], "difficult": false}]

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Python
1
https://gitee.com/paddlepaddle/PaddleOCR.git
git@gitee.com:paddlepaddle/PaddleOCR.git
paddlepaddle
PaddleOCR
PaddleOCR

搜索帮助

53164aa7 5694891 3bd8fe86 5694891