Replies: 1 comment
-
根据你的描述以及日志信息,问题可能出在以下几个方面: 1. 预训练模型权重未完全加载
解决方法:
2. 数据处理问题
解决方法:
3. 版本兼容性问题
解决方法:
4. 训练过程收敛缓慢
解决方法:
5. 其他建议
总结按照以下步骤逐步排查问题:
希望这些建议能帮你解决问题! Response generated by feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我使用检测模型是ch_PP-OCRv4_det_server_train同样使用官方推荐的配置文件ch_PP-OCRv4_det_teacher.yml。训练的时候提示如下错误
[2024/12/22 16:09:35] ppocr WARNING: The pretrained params backbone.last_conv.weight not in model
[2024/12/22 16:09:35] ppocr WARNING: The pretrained params backbone.fc.weight not in model
[2024/12/22 16:09:35] ppocr WARNING: The pretrained params backbone.fc.bias not in model
paddlepalddle使用的是2.6版本cuda12。paddleocr模块是2.8。未加载预训练模型,目前不知道原有出在哪里。也发现很多有同样问题的人,都没有解决。有没有大佬懂得求指教感激不尽。
以下是我得配置文件
Global:
debug: false
use_gpu: true
epoch_num: &epoch_num 500 #
log_smooth_window: 20 #
print_batch_step: 100
save_model_dir: ./output/ch_PP-OCRv4 #
save_epoch_step: 50 #
eval_batch_step: 25 #
cal_metric_during_train: false
checkpoints:
pretrained_model: ./pretrain_models/ch_PP-OCRv4_det_server_train/best_accuracy.pdparams
save_inference_dir: null
use_visualdl: false
infer_img: doc/imgs_en/img_10.jpg
save_res_path: ./checkpoints/det_db/predicts_db.txt
d2s_train_image_shape: [3, 640, 640]
distributed: true
Architecture:
model_type: det
algorithm: DB
Transform: null
Backbone:
name: PPHGNet_small
det: True
Neck:
name: LKPAN
out_channels: 256
intracl: true
Head:
name: PFHeadLocal
k: 50
mode: "large"
fix_nan: True
Loss:
name: DBLoss
balance_loss: true
main_loss_type: DiceLoss
alpha: 5
beta: 10
ohem_ratio: 3
Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.001 #(8*8c)
warmup_epoch: 2
regularizer:
name: L2
factor: 1e-6
PostProcess:
name: DBPostProcess
thresh: 0.3
box_thresh: 0.6
max_candidates: 1000
unclip_ratio: 1.5
Metric:
name: DetMetric
main_indicator: hmean
Train:
dataset:
name: SimpleDataSet
data_dir: ./train_data/ #
label_file_list:
- ./train_data/det/train.txt #
ratio_list: [1.0]
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
- DetLabelEncode: null
- CopyPaste: null
- IaaAugment:
augmenter_args:
- type: Fliplr
args:
p: 0.5
- type: Affine
args:
rotate:
- -10
- 10
- type: Resize
args:
size:
- 0.5
- 3
- EastRandomCropData:
size:
- 640
- 640
max_tries: 50
keep_ratio: true
- MakeBorderMap:
shrink_ratio: 0.4
thresh_min: 0.3
thresh_max: 0.7
total_epoch: *epoch_num
- MakeShrinkMap:
shrink_ratio: 0.4
min_text_size: 8
total_epoch: *epoch_num
- NormalizeImage:
scale: 1./255.
mean:
- 0.485
- 0.456
- 0.406
std:
- 0.229
- 0.224
- 0.225
order: hwc
- ToCHWImage: null
- KeepKeys:
keep_keys:
- image
- threshold_map
- threshold_mask
- shrink_map
- shrink_mask
loader:
shuffle: true
drop_last: false
batch_size_per_card: 8
num_workers: 8
Eval:
dataset:
name: SimpleDataSet
data_dir: ./train_data/ #
label_file_list:
- ./train_data/det/val.txt #
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
- DetLabelEncode: null
- DetResizeForTest:
- NormalizeImage:
scale: 1./255.
mean:
- 0.485
- 0.456
- 0.406
std:
- 0.229
- 0.224
- 0.225
order: hwc
- ToCHWImage: null
- KeepKeys:
keep_keys:
- image
- shape
- polys
- ignore_tags
loader:
shuffle: false
drop_last: false
batch_size_per_card: 1
num_workers: 2
profiler_options: null
Beta Was this translation helpful? Give feedback.
All reactions