import os import numpy as np import xml.etree.ElementTree as ET import cv2 from PIL import Image, ImageEnhance import random from box_utils import multi_box_iou_xywh, box_crop import cv2 import matplotlib.pyplot as plt import functools import paddle from utils.data_augment import image_augment from config.config_example import get_cfg cfg = get_cfg() DATASETS_NAMES = cfg.DATASETS_NAMES TEST_SIZE = cfg.TEST_SIZE def get_datasets_names(): """ return a dict, as following, {'Boerner': 0, 'Leconte': 1, 'Linnaeus': 2, 'acuminatus': 3, 'armandi': 4, 'coleoptera': 5, 'linnaeus': 6 }
# -------------------------------------------------------------------------------- # 功能: 加载配置文件 # 加载设置好的配置文件 # 加载好后作为网络的超参数 # 使用import加载配置文件即可 # 如果你喜欢也可以自己写成*.cfg *.txt *.yaml # --------------------------------------------------------------------------------- # 在此处import你自己的配置参数.py文件 from config import config_example # --------------------------------------------------------------------------------- cfg = config_example.get_cfg()