paddle detection 怎么解析配置文件

import os.path
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import yaml
from ppdet.core.workspace import merge_config
# from ppdet.core.workspace import load_config
class ArgsParser(ArgumentParser):
    def __init__(self):
        super(ArgsParser, self).__init__(
            formatter_class=RawDescriptionHelpFormatter)
        self.add_argument("-c", "--config", help="configuration file to use")
        self.add_argument(
            "-o", "--opt", nargs='*', help="set configuration options")

    def parse_args(self, argv=None):
        args = super(ArgsParser, self).parse_args(argv)
        assert args.config is not None, \
            "Please specify --config=configure_file_path."
        args.opt = self._parse_opt(args.opt)
        return args

    def _parse_opt(self, opts):
        config = {}
        if not opts:
            re

相关推荐

  1. paddle detection 怎么解析配置文件

    2023-12-10 14:04:04       29 阅读
  2. PaddleDetection安装文档

    2023-12-10 14:04:04       7 阅读
  3. configparser --- 配置文件解析

    2023-12-10 14:04:04       34 阅读
  4. Nginx配置文件解释

    2023-12-10 14:04:04       13 阅读
  5. 解析Nginx配置文件conf中的常用块

    2023-12-10 14:04:04       32 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-10 14:04:04       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-10 14:04:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-10 14:04:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-10 14:04:04       18 阅读

热门阅读

  1. postgresql设置免密登录

    2023-12-10 14:04:04       33 阅读
  2. nodejs流

    nodejs流

    2023-12-10 14:04:04      30 阅读
  3. Linux环境FFTW源码编译 | WSL编译报错解决

    2023-12-10 14:04:04       32 阅读
  4. Electron:白话Electron开发桌面端应用

    2023-12-10 14:04:04       31 阅读
  5. K8S学习指南(4)-minikube的使用

    2023-12-10 14:04:04       37 阅读
  6. 【数据结构和算法】交替合并字符串

    2023-12-10 14:04:04       39 阅读
  7. 配置vue3+vite+eslint+prettierrc项目

    2023-12-10 14:04:04       29 阅读
  8. Android 样式与主题背景学习

    2023-12-10 14:04:04       35 阅读
  9. 华为机试真题 C++ 实现【字符串重新排列】

    2023-12-10 14:04:04       37 阅读
  10. react

    react

    2023-12-10 14:04:04      37 阅读
  11. 软考 系统架构设计师系列知识点之大数据(3)

    2023-12-10 14:04:04       41 阅读