Replies: 1 comment
-
The Here’s an analysis of the issue and steps to resolve it: Root Cause Analysis
Solution1. Fix the
|
Beta Was this translation helpful? Give feedback.
-
The Here’s an analysis of the issue and steps to resolve it: Root Cause Analysis
Solution1. Fix the
|
Beta Was this translation helpful? Give feedback.
-
I am training a custom paddleocr model to increase accuracy by training a model. I am currently using Google Colab to have minimal environment interference. I have only been trying a small group of images train: 13, eval: 6 but I am having trouble. These are the commands I have:
I have this config file:
`
Global:
debug: true
use_gpu: false # Change to true if using GPU
is_float16: true
epoch_num: 200
log_smooth_window: 20
print_batch_step: 10
save_model_dir: ./output/det_ppocr_v4 # Default path for saving model
save_epoch_step: 10
eval_batch_step: [0, 2000]
cal_metric_during_train: true
pretrained_model: /content/drive/MyDrive/dataset/pretrained/best_accuracy.pdparams
save_inference_dir: None # Default path for inference saving
use_visualdl: false
infer_img: doc/imgs_words/ch/word_1.jpg # Default path for test image
distributed: false
save_res_path: ./output/det/predicts_ppocrv3.txt # Default path for saving results
Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.001
warmup_epoch: 5
regularizer:
name: L2
factor: 3.0e-05
Architecture:
model_type: det # Text detection model type
algorithm: DB # Use 'DB' for DBNet (common for detection tasks)
Backbone:
name: MobileNetV3
Neck:
name: DBFPN
out_channels: 256
Head:
name: DBHead
out_channels: 2
k: 50
Loss:
name: DBLoss # Change to DBLoss for DBNet
balance_loss: true
main_loss_type: DiceLoss
alpha: 5
beta: 10
ohem_ratio: 3
PostProcess:
name: DBPostProcess
box_thresh: 0.6
unclip_ratio: 1.5
max_candidates: 1000
Metric:
name: DetMetric
main_indicator: hmean
Train:
dataset:
data_dir: /content/drive/MyDrive/dataset/train/test_images
label_file_list: ['/content/drive/MyDrive/dataset/fix_train_list_formatted.txt']
name: SimpleDataSet
transforms:
- DecodeImage: # load image
img_mode: BGR
channel_first: False
- DetLabelEncode: # Class handling label
- 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
- MakeShrinkMap:
shrink_ratio: 0.4
min_text_size: 8
- NormalizeImage:
scale: 1./255.
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
order: 'hwc'
- ToCHWImage:
- KeepKeys:
keep_keys: ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask'] # the order of the dataloader list
loader:
batch_size_per_card: 4
drop_last: False
shuffle: True
num_workers: 4
Eval:
dataset:
data_dir: /content/drive/MyDrive/dataset/eval/images
label_file_list: ['/content/drive/MyDrive/dataset/fix_eval_list_formatted.txt']
name: SimpleDataSet
transforms:
- DecodeImage: # load image
img_mode: BGR
channel_first: False
- DetLabelEncode: # Class handling label
- DetResizeForTest:
image_shape: [736, 1280]
- NormalizeImage:
scale: 1./255.
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
order: 'hwc'
- ToCHWImage:
- KeepKeys:
keep_keys: ['image', 'shape', 'polys', 'ignore_tags']
loader:
batch_size_per_card: 4
drop_last: False
shuffle: False
num_workers: 4
`
I am getting this output:
I will provide more information if needed, haven't been able to get to training a model at all.
Beta Was this translation helpful? Give feedback.
All reactions