PaddleDetection模型导出以及推理部署

2021SC@SDUSC
本周分析

#export_model.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if parent_path not in sys.path:
    sys.path.append(parent_path)

# ignore numba warning
import warnings
warnings.filterwarnings('ignore')
import glob
import numpy as np
from PIL import Image

import paddle
import paddle.nn as nn
from paddle.static import InputSpec

from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.check import check_gpu, check_version, check_config
from ppdet.utils.cli import ArgsParser
from ppdet.utils.checkpoint import load_weight
from export_utils import dump_infer_config
from paddle.jit import to_static

from ppdet.utils.logger import setup_logger
logger = setup_logger('eval')

#运行配置参数解析函数
def parse_

你可能感兴趣的:(笔记,pytorch,人工智能,python)