0
点赞
收藏
分享

微信扫一扫

python——读取yml文件


文章目录

  • ​​环境准备​​
  • ​​yml文件​​
  • ​​读取代码​​

环境准备

pip install yaml

yml文件

python——读取yml文件_yaml

读取代码

我需要读取出label_list项:

import yaml

infer_cfg = open('yolov3_r50vd_dcn_270e_coco/infer_cfg.yml')
data = infer_cfg.read()
yaml_reader = yaml.load(data)

print(yaml_reader['label_list'])

python——读取yml文件_python_02


举报

相关推荐

0 条评论