Real-Time-Action-Recognition icon indicating copy to clipboard operation
Real-Time-Action-Recognition copied to clipboard

ValueError: cannot convert float NaN to integer

Open MasterBrother opened this issue 6 years ago • 4 comments

大神 你好: 我运行 Python run.py的时候 模式一 “当前为人体姿态估计模式” 功能正常

但是,运行功能三的时候 ,相机能够打开,但是一旦检测到人物 就错误提示:

Traceback (most recent call last): File "run.py", line 231, in show_camera xmin = int(d[0]) ValueError: cannot convert float NaN to integer Aborted (core dumped)

我将trackers输出得到:

trackers= [[nan nan nan nan 1.]]

我以为是numpy转换出了问题, 我就手动转换 加了一句:trackers = np.nan_to_num(trackers) 这下相机能够打开,功能三也不卡核,但是也没有结果,我输出了一些参数:

检测到人的情况: trackers= [] show= <type 'numpy.ndarray'> humans= [<pose.estimator.Human instance at 0x7f67df2fa0e0>] bboxes= [[0.0, 0.0, 0.0, 0.0, 0.9999]] trackers= [] show= <type 'numpy.ndarray'> humans= [<pose.estimator.Human instance at 0x7f67df2fa4d0>] bboxes= [[0.0, 0.0, 0.0, 0.0, 0.9999]] trackers= [] show= <type 'numpy.ndarray'> humans= [<pose.estimator.Human instance at 0x7f67df2fa2d8>] bboxes= [[0.0, 0.0, 0.0, 0.0, 0.9999]] trackers= []

没有检测到人的情况: humans= [] bboxes= [] show= <type 'numpy.ndarray'> humans= [] bboxes= [] show= <type 'numpy.ndarray'> humans= [] bboxes= [] show= <type 'numpy.ndarray'> humans= [] bboxes= [] show= <type 'numpy.ndarray'> humans= []

结果就是空值,请大神指点,不胜感激

MasterBrother avatar Aug 03 '18 06:08 MasterBrother

@MasterBrother 没遇到过这个问题,暂时无解,这个项目目前已停止更新

TianzhongSong avatar Aug 14 '18 01:08 TianzhongSong

@MasterBrother 我遇到和你一模一样的问题,请问你最后是怎么解决的?

yurochang avatar Sep 05 '18 16:09 yurochang

在多人跟踪那里也有问题:

show, joints, bboxes, xcenter = TfPoseEstimator.get_skeleton(show, humans, imgcopy=False) ValueError: too many values to unpack`

yurochang avatar Sep 06 '18 01:09 yurochang

@MasterBrother bu sorunla karşılaşmadı, şu an için bir çözüm bulunmuyor, bu proje güncellenmeyi durdurdu.

If you have found the solution I'm having this problem I would appreciate it if you share

SerifeC avatar Sep 28 '19 18:09 SerifeC