convert-the-model-to-rknn/011加载识别字典.py

7 lines
143 B
Python

import yaml
with open('dict.yaml', 'r', encoding='utf-8') as f:
dict_rec = yaml.safe_load(f)
print(len(dict_rec['character_dict']))