Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
c22fb053
P
PaddleX
项目概览
PaddlePaddle
/
PaddleX
通知
138
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
43
列表
看板
标记
里程碑
合并请求
5
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
43
Issue
43
列表
看板
标记
里程碑
合并请求
5
合并请求
5
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c22fb053
编写于
5月 08, 2020
作者:
J
jiangjiajun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove pycocotools dependency
上级
ece29fe5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
7 deletion
+16
-7
paddlex/__init__.py
paddlex/__init__.py
+6
-0
paddlex/cv/datasets/coco.py
paddlex/cv/datasets/coco.py
+2
-1
paddlex/cv/datasets/voc.py
paddlex/cv/datasets/voc.py
+1
-1
paddlex/cv/models/slim/visualize.py
paddlex/cv/models/slim/visualize.py
+4
-3
paddlex/cv/models/utils/visualize.py
paddlex/cv/models/utils/visualize.py
+1
-1
setup.py
setup.py
+2
-1
未找到文件。
paddlex/__init__.py
浏览文件 @
c22fb053
...
...
@@ -20,6 +20,12 @@ from . import seg
from
.
import
cls
from
.
import
slim
try
:
import
pycocotools
except
:
print
(
"[WARNING] pycocotools is not installed, detection model is not available now."
)
print
(
"[WARNING] pycocotools install: https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/install.md"
)
env_info
=
get_environ_info
()
load_model
=
cv
.
models
.
load_model
datasets
=
cv
.
datasets
...
...
paddlex/cv/datasets/coco.py
浏览文件 @
c22fb053
...
...
@@ -19,7 +19,6 @@ import random
import
numpy
as
np
import
paddlex.utils.logging
as
logging
import
paddlex
as
pst
from
pycocotools.coco
import
COCO
from
.voc
import
VOCDetection
from
.dataset
import
is_pic
...
...
@@ -47,6 +46,8 @@ class CocoDetection(VOCDetection):
buffer_size
=
100
,
parallel_method
=
'process'
,
shuffle
=
False
):
from
pycocotools.coco
import
COCO
super
(
VOCDetection
,
self
).
__init__
(
transforms
=
transforms
,
num_workers
=
num_workers
,
...
...
paddlex/cv/datasets/voc.py
浏览文件 @
c22fb053
...
...
@@ -18,7 +18,6 @@ import os.path as osp
import
random
import
numpy
as
np
import
xml.etree.ElementTree
as
ET
from
pycocotools.coco
import
COCO
import
paddlex.utils.logging
as
logging
from
.dataset
import
Dataset
from
.dataset
import
is_pic
...
...
@@ -51,6 +50,7 @@ class VOCDetection(Dataset):
buffer_size
=
100
,
parallel_method
=
'process'
,
shuffle
=
False
):
from
pycocotools.coco
import
COCO
super
(
VOCDetection
,
self
).
__init__
(
transforms
=
transforms
,
num_workers
=
num_workers
,
...
...
paddlex/cv/models/slim/visualize.py
浏览文件 @
c22fb053
...
...
@@ -15,9 +15,6 @@
import
os.path
as
osp
import
tqdm
import
numpy
as
np
import
matplotlib
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
as
plt
from
.prune
import
cal_model_size
from
paddleslim.prune
import
load_sensitivities
...
...
@@ -30,6 +27,10 @@ def visualize(model, sensitivities_file, save_dir='./'):
model (paddlex.cv.models): paddlex中的模型。
sensitivities_file (str): 敏感度文件存储路径。
"""
import
matplotlib
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
as
plt
program
=
model
.
test_prog
place
=
model
.
places
[
0
]
fig
=
plt
.
figure
()
...
...
paddlex/cv/models/utils/visualize.py
浏览文件 @
c22fb053
...
...
@@ -15,7 +15,6 @@
import
os
import
cv2
import
numpy
as
np
import
matplotlib.pyplot
as
plt
from
PIL
import
Image
,
ImageDraw
import
paddlex.utils.logging
as
logging
...
...
@@ -222,6 +221,7 @@ 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
...
...
setup.py
浏览文件 @
c22fb053
...
...
@@ -29,7 +29,8 @@ setuptools.setup(
packages
=
setuptools
.
find_packages
(),
setup_requires
=
[
'cython'
,
'numpy'
,
'sklearn'
],
install_requires
=
[
'pycocotools'
,
'pyyaml'
,
'colorama'
,
'tqdm'
,
'visualdl==1.3.0'
,
"pycocotools;platform_system!='Windows'"
,
'pyyaml'
,
'colorama'
,
'tqdm'
,
'visualdl==1.3.0'
,
'paddleslim==1.0.1'
,
'paddlehub>=1.6.2'
],
classifiers
=
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录