head-pose-estimation icon indicating copy to clipboard operation
head-pose-estimation copied to clipboard

Issue running estimate_head_pose.py

Open intvo opened this issue 6 years ago • 19 comments

when i run estimate_head_pose.py nothing happing, i can see the camera light is on but there nothing shows screen shot 2018-10-18 at 10 29 49 pm

intvo avatar Oct 19 '18 02:10 intvo

@intvo try to use video file as a frame source instead of a camera

LoopKarma avatar Oct 22 '18 07:10 LoopKarma

how to use video file as a frame source instead of a camera?

ZhongyuMa avatar Apr 03 '19 13:04 ZhongyuMa

how to use video file as a frame source instead of a camera?

 # Video source from webcam or video file.
    video_src = 0
    cam = cv2.VideoCapture(video_src)

change video_src to the path of the video file. Check https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html for more info.

zhouxf53 avatar Apr 03 '19 13:04 zhouxf53

Same problem here, so... finally I can't just use the camera when run the program?

iamzhangyunlu avatar Jun 17 '19 02:06 iamzhangyunlu

@iamzhangyunlu can you post the error message here?

yinguobing avatar Jul 12 '19 03:07 yinguobing

/Users/zyl/PycharmProjects/untitled35/untitled/bin/python /Users/zylProjects/untitled35/estimate_head_pose.py OpenCV version: 4.1.0 /Users/zyl/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Linux is fine! Python multiprocessing works. 2019-07-12 12:29:50.418402: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

iamzhangyunlu avatar Jul 12 '19 04:07 iamzhangyunlu

@iamzhangyunlu can you post the error message here?

No error message, and the camera light is on,but no visual interface.

iamzhangyunlu avatar Jul 12 '19 04:07 iamzhangyunlu

How about video file?

yinguobing avatar Jul 12 '19 08:07 yinguobing

Video file can run

iamzhangyunlu avatar Jul 12 '19 09:07 iamzhangyunlu

Please make sure the camera is working properly, using something like:

import cv2

cap = cv2.VideoCapture(0)
while True:
    _, frame = cap.read()
    cv2.imshow("Preview", frame)
    cv2.waitKey(30)

yinguobing avatar Jul 17 '19 14:07 yinguobing

cap = cv2.VideoCapture(0) while True: _, frame = cap.read() cv2.imshow("Preview", frame) cv2.waitKey(30)

Excellent! But face in the cam can not be recognized now

iamzhangyunlu avatar Jul 18 '19 02:07 iamzhangyunlu

It's hard to tell. Have you modified the code in any way?

yinguobing avatar Jul 18 '19 03:07 yinguobing

It's hard to tell. Have you modified the code in any way?

I will try again, thank you👍

iamzhangyunlu avatar Jul 18 '19 04:07 iamzhangyunlu

I am also having the same issue. I didn't modify the code.

OpenCV: 4.1.0 Python: 3.6.0

Video works fine after commenting out print(tm.getTimeSec()/tm.count())

For camera the debugger goes till
facebox = box_queue.get()

After this statement it doesn't do anything.

Also, my webcam is working fine with the following code.

while True: _, frame = cap.read() cv2.imshow("Preview", frame) cv2.waitKey(30)

hmuha03 avatar Jul 24 '19 22:07 hmuha03

Same here. The problem is at:

facebox = box_queue.get()

LuanBaviloni avatar Sep 19 '19 14:09 LuanBaviloni

Looks like we are having a issue with multiprocessing on macOS. I will look into this later.

Luan Baviloni [email protected]于2019年9月19日 周四下午10:33写道:

Same here. The problem is at:

facebox = box_queue.get()

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/yinguobing/head-pose-estimation/issues/9?email_source=notifications&email_token=ACOK2BSN7FXKFFNOGZNONH3QKOESVA5CNFSM4F56H5TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7DVYFA#issuecomment-533158932, or mute the thread https://github.com/notifications/unsubscribe-auth/ACOK2BSCR4HQ37LVVCDQUKTQKOESVANCNFSM4F56H5TA .

yinguobing avatar Sep 19 '19 23:09 yinguobing

Looks like we are having a issue with multiprocessing on macOS. I will look into this later. Luan Baviloni [email protected]于2019年9月19日 周四下午10:33写道: Same here. The problem is at: facebox = box_queue.get() — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#9?email_source=notifications&email_token=ACOK2BSN7FXKFFNOGZNONH3QKOESVA5CNFSM4F56H5TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7DVYFA#issuecomment-533158932>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACOK2BSCR4HQ37LVVCDQUKTQKOESVANCNFSM4F56H5TA .

Actually I'm using Ubuntu 18.04, with Python 3.7.4

LuanBaviloni avatar Sep 20 '19 01:09 LuanBaviloni

也有可能是camera 的端口被占了,此时的capture()中的数字需要往后调整1,2,3,都可以试试。

yutao007 avatar Dec 13 '19 12:12 yutao007

Hi, same problem here: stuck in line facebox = box_queue.get() using macOS. Any progress on this topic?

dvargasfr avatar Apr 08 '20 15:04 dvargasfr