Exemplo n.º 1
0
def main():
    args = build_argparser().parse_args()
    test_image = './data/test/person1.jpg'
    im = mpimg.imread(test_image)
    plt.imshow(im)
    frame = cv2.imread(test_image)

    model = Model(args.task)
    model = HumanPoseDetector()
    results = model.compute(frame)

    new_frame = results['frame']
    new_frame = np.asarray(cv2pil(new_frame))
    print(results['preds'])

    cv2.imwrite('test_humanpose.jpg', new_frame)
    print('Save to test_humanpose.jpg')
Exemplo n.º 2
0
def main():
    args = build_argparser().parse_args()
    test_image = './data/test/person1.jpg'
    im = mpimg.imread(test_image)
    plt.imshow(im)
    frame = cv2.imread(test_image)

    model = Model(args.task)
    # new_frame = model.compute(frame)

    model = BodyDetector()
    new_frame = model.compute(frame)

    new_frame = new_frame['frame']
    new_frame = np.asarray(cv2pil(new_frame))
    new_frame

    cv2.imwrite('test_body.jpg', new_frame)
    print('Save to test_body.jpg')