提交 e8fb682f 编写于 作者: H haoyuying

revise transform and pascalvoc dataset

上级 7e6b370f
......@@ -4,6 +4,6 @@ import paddlehub as hub
if __name__ == '__main__':
place = paddle.CUDAPlace(0)
paddle.disable_static()
model = model = hub.Module(name='yolov3_darknet53_pascalvoc', is_train=False)
model = hub.Module(name='yolov3_darknet53_pascalvoc', is_train=False)
model.eval()
model.predict(imgpath="4026.jpeg", filelist="/PATH/TO/JSON/FILE")
......@@ -22,8 +22,6 @@ import numpy as np
from paddlehub.env import DATA_HOME
from pycocotools.coco import COCO
from paddlehub.process.transforms import DetectCatagory, ParseImages
class DetectCatagory:
"""Load label name, id and map from detection dataset.
......@@ -105,7 +103,7 @@ class GTAnotations:
Convert COCO annotations box with format [x1, y1, w, h] to
center mode [center_x, center_y, w, h] and divide image width
and height to get relative value in range[0, 1]
"""
"""
assert len(box) == 4, "box should be a len(4) list or tuple"
x, y, w, h = box
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册