提交 9964b7ad 编写于 作者: F FlyingQianMM

change dict to OrderedDict in voc

上级 888ea8a2
......@@ -17,6 +17,7 @@ import copy
import os.path as osp
import random
import numpy as np
from collections import OrderedDict
import xml.etree.ElementTree as ET
import paddlex.utils.logging as logging
from .dataset import Dataset
......@@ -66,7 +67,7 @@ class VOCDetection(Dataset):
annotations['categories'] = []
annotations['annotations'] = []
cname2cid = {}
cname2cid = OrderedDict()
label_id = 1
with open(label_list, 'r', encoding=get_encoding(label_list)) as fr:
for line in fr.readlines():
......
......@@ -16,6 +16,8 @@ import os
import cv2
import colorsys
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.figure as mplfigure
......@@ -333,7 +335,6 @@ def draw_pr_curve(eval_details_file=None,
return mean_s
def cal_pr(coco_gt, coco_dt, iou_thresh, save_dir, style='bbox'):
import matplotlib.pyplot as plt
from pycocotools.cocoeval import COCOeval
coco_dt = loadRes(coco_gt, coco_dt)
np.linspace = fixed_linspace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册