Code Monkey home page Code Monkey logo

Comments (3)

chibohe avatar chibohe commented on June 14, 2024

RuntimeError: Error(s) in loading state_dict for DAN:
Missing key(s) in state_dict: "feature_extractor.conv1.weight", "feature_extractor.bn1.weight", "

DAN设置如下:
TrainReader:
dataloader: dataset,BatchBalancedDataset
select_data: '/'
batch_ratio: '1.0'
total_data_usage_ratio: 1.0
padding: True
augment: False
batch_size: 64
shuffle: True
num_workers: 0
lmdb_sets_dir: train_set###百度网盘下载的训练文件夹

EvalReader:
dataloader: dataset,evaldataloader
select_data: '/'
batch_size: 2
padding: True
shuffle: True
num_workers: 0
lmdb_sets_dir: test_set ###百度网盘下载的测试文件夹

TestReader:
dataloader: dataset,evaldataloader
select_data: '/'
batch_size: 64
padding: True
shuffle: True
num_workers: 0
lmdb_sets_dir:

Global:
algorithm: DAN
use_gpu: True
gpu_num: '0'
device: cuda:0
num_iters: 800000
highest_acc_save_type: False
data_filtering_off: False
resumed_optimizer: False
batch_max_length: 50
print_batch_step: 10
save_model_dir: output/DAN
eval_batch_step: 2000
image_shape: [1, 32, 256]
character_type: ch
loss_type: attn
use_space_char: false
character_dict_path: keys.txt
seed: 1234
pretrain_weights: models/DAN.pth ####百度下载的模型文件
save_inference_dir: results
infer_img: test_pic ###存放测试图片的文件夹

Architecture:
function: networks.DAN,DAN
compress_layer: False
layers: [3, 4, 6, 6, 3]

CAM:
depth: 8
num_channel: 512

Loss:
function: loss,AttnLoss
blank_idx: 0

Optimizer:
function: adam
base_lr: 0.001
momentum: 0.9
weight_decay: 1.0e-4
lr_decay_epoch: 10
max_epoch: 1000

pytorch版本1.3
python3.7

抱歉才看到,等我定位到问题回复你。

from text_recognition_toolbox.

chibohe avatar chibohe commented on June 14, 2024

DAN目前还没实现inference的部分,我会尽快更新的,感谢关注。

from text_recognition_toolbox.

chibohe avatar chibohe commented on June 14, 2024

RuntimeError: Error(s) in loading state_dict for DAN:
Missing key(s) in state_dict: "feature_extractor.conv1.weight", "feature_extractor.bn1.weight", "

DAN设置如下:
TrainReader:
dataloader: dataset,BatchBalancedDataset
select_data: '/'
batch_ratio: '1.0'
total_data_usage_ratio: 1.0
padding: True
augment: False
batch_size: 64
shuffle: True
num_workers: 0
lmdb_sets_dir: train_set###百度网盘下载的训练文件夹

EvalReader:
dataloader: dataset,evaldataloader
select_data: '/'
batch_size: 2
padding: True
shuffle: True
num_workers: 0
lmdb_sets_dir: test_set ###百度网盘下载的测试文件夹

TestReader:
dataloader: dataset,evaldataloader
select_data: '/'
batch_size: 64
padding: True
shuffle: True
num_workers: 0
lmdb_sets_dir:

Global:
algorithm: DAN
use_gpu: True
gpu_num: '0'
device: cuda:0
num_iters: 800000
highest_acc_save_type: False
data_filtering_off: False
resumed_optimizer: False
batch_max_length: 50
print_batch_step: 10
save_model_dir: output/DAN
eval_batch_step: 2000
image_shape: [1, 32, 256]
character_type: ch
loss_type: attn
use_space_char: false
character_dict_path: keys.txt
seed: 1234
pretrain_weights: models/DAN.pth ####百度下载的模型文件
save_inference_dir: results
infer_img: test_pic ###存放测试图片的文件夹

Architecture:
function: networks.DAN,DAN
compress_layer: False
layers: [3, 4, 6, 6, 3]

CAM:
depth: 8
num_channel: 512

Loss:
function: loss,AttnLoss
blank_idx: 0

Optimizer:
function: adam
base_lr: 0.001
momentum: 0.9
weight_decay: 1.0e-4
lr_decay_epoch: 10
max_epoch: 1000

pytorch版本1.3
python3.7

DAN的预测脚本更新了,可以再试试。

from text_recognition_toolbox.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.