predict.py 287 字节
Newer Older
H
haoyuying 已提交
1 2 3 4 5 6
import paddle
import paddlehub as hub

if __name__ == '__main__':
    place = paddle.CUDAPlace(0)
    paddle.disable_static()
H
haoyuying 已提交
7
    model = hub.Module(name='yolov3_darknet53_pascalvoc', is_train=False)
H
haoyuying 已提交
8
    model.eval()
9
    model.predict(imgpath="4026.jpeg", filelist="/PATH/TO/JSON/FILE")