Tf-pose-estimation: save the estimated video

Created on 12 Apr 2018  路  6Comments  路  Source: ildoonet/tf-pose-estimation

i want to save the estimated video without the original background just the skeleton ,what should i do?

Most helpful comment

In src/estimator.py you have a class TFPoseEstimator with the method draw_humans which takes an image as input. Simply pass an empty image (all zeros) and you get an image with only the skeleton overlaid.

All 6 comments

In src/estimator.py you have a class TFPoseEstimator with the method draw_humans which takes an image as input. Simply pass an empty image (all zeros) and you get an image with only the skeleton overlaid.

@AVCarreiro hello,i want to get the output like this
2018-04-13 9 49 05
and i modify the src/run_video.py like this
2018-04-13 9 53 04
i replace the original input "image" with "test". But i get the wrong output ,may i ask for your help?
2018-04-13 10 03 50

Seems like you have an issue with the image shape, or the dtype. I think opencv expects images as matrices of type 'uint8'.

@AVCarreiro I have solved the problem.Thank you for your help.

@guofuzheng could you provide me please with code for saving the estimated video ?

@rawandeheliah hello, i did not save the estimated video, i saved the estimated pictures. The code can process videos also can process pictures. About how to save the estimated pictures, it is very easy. Let me show you the code.

humans = e.inference(image)
image = TfPoseEstimator.draw_humans(image, humans, imgcopy=True)
# cv2.imshow('tf-pose-estimation result', image)
cv2.imwrite(path_save+tmp.split('.')[0]+'/'+str(i)+'.jpg',image)

'image' is the image you want to estimate. After the second line of the code, and if we use 'cv2.imshow' the code will show us the estimated image, if we use'cv2.imwrite' , the code will save the estimated image. If you have any problem about how to save the estimated image, just let me know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khan958 picture khan958  路  3Comments

tomercohen11 picture tomercohen11  路  6Comments

gavinzhang1995 picture gavinzhang1995  路  6Comments

ildoonet picture ildoonet  路  3Comments

jpizarrom picture jpizarrom  路  6Comments