-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用infer_rec时出现问题 #71
Comments
The following changes to the configuration file are required for svtrv2 to perform inference: ...
Decoder:
name: GTCDecoder
infer_gtc: False # True to False
detach: False
gtc_decoder:
...
Loss:
name: CTCLoss # GTCLoss to CTCLoss
# ctc_weight: 0.1 # delete
# gtc_loss: # delete
# name: SMTRLoss # delete
PostProcess:
name: CTCLabelDecode # GTCLabelDecode to CTCLabelDecode
# gtc_label_decode: # delete
# name: SMTRLabelDecode # delete
# next_mode: *next # delete
character_dict_path: *character_dict_path
use_space_char: *use_space_char
Metric:
name: RecMetric # RecGTCMetric to RecMetric
main_indicator: acc
# is_filter: True
...
Eval:
dataset:
name: RatioDataSetTVResize
ds_width: True
padding: False
data_dir_list: ['../benchmark_bctr/benchmark_bctr_test/scene_test']
transforms:
- DecodeImagePIL: # load image
img_mode: RGB
- CTCLabelEncode: # GTCLabelEncode to CTCLabelEncode
# gtc_label_encode: # delete
# name: ARLabelEncode # delete
character_dict_path: *character_dict_path
use_space_char: *use_space_char
max_text_length: *max_text_length
- KeepKeys:
# keep_keys: ['image', 'label', 'length', 'ctc_label', 'ctc_length'] to
keep_keys: ['image', 'label', 'length']
sampler:
name: RatioSampler
scales: [[128, 32]] # w, h
# divide_factor: to ensure the width and height dimensions can be devided by downsampling multiple
first_bs: *bs
fix_bs: false
divided_factor: [4, 16] # w, h
is_training: False
loader:
shuffle: False
drop_last: False
batch_size_per_card: *bs
max_ratio: *max_ratio
num_workers: 4 |
感谢回复,推理问题已解决;在训练中碰到了新的问题,具体如下:系统环境: Ubuntu 20.04.6 LTSpython 3.11.7CUDA Device Count: 2Device 0: Tesla V100-SXM2-32GBDevice 1: Tesla V100-SXM2-32GBtorch: 2.1.1cudnn: 8700推理代码: 出现了下方的异常,
|
Are there more error logs When running training commands, the information provided so far is not able to determine the error. |
The above are all the running logs, but I checked the issue records of Torch and found that it may be a version issue. I solved the problem by replacing the Torch version,now,my torch version is 2.0.1 |
使用infer_rec + svtrv2推理单张图片时,出现问题:
推理代码:
推测是因为使用了ctc + gtc 解码,但是没进行融合或加权,一个图片推理出现了两个结果;最后输出的部分也出现了问题:
The text was updated successfully, but these errors were encountered: