Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Tensor' object has no attribute 'numpy' when i run pose_estimation.py #10

Open
irojasc opened this issue Feb 22, 2021 · 2 comments
Open

Comments

@irojasc
Copy link

irojasc commented Feb 22, 2021

hello guys, i want to run pose_estimation.py file . But, when code enter to method predict() of class PoseEstimation:
def predict(self, img:np.ndarray, output_path:str, debug=True):
(more code here)

    joint_heatmap = np.squeeze(joint_heatmap.numpy())
    joint_locations = np.squeeze(joint_locations.numpy())
    joint_offsets = np.squeeze(joint_offsets.numpy())
    heatmap = np.squeeze(heatmap.numpy())
    offsets = np.squeeze(offsets.numpy())
    whs = np.squeeze(whs.numpy())```

this message apears : 'Tensor' object has no attribute 'numpy' . I suppose this trouble because numpy() work with eager mode enable. i´ve tried to enable eager mode but it didnt work yet with the followings commands:
tf.compat.v1.enable_eager_execution() and self.model.run_eagerly = True **but tf.executing_eagerly() prints False
Finally, I´m using these dependencies:

  • Tensor flow 2.4.1
  • keras 2.4.3
  • opencv-python 4.5.1
  • numpy 1.19.5
  • pillow 8.1.0
  • matplotlib 3.3.4
  • pandas 1.2.2
  • sckit-learn 0.24.1
  • sckit-image 0.18.1
  • imgaug 0.4.0
    I would appreciate very much help me to solve this issue. thanks
@Adeel-Intizar
Copy link
Owner

I will look into it, till then you can use CDCL Model for pose estimation

@shersoni610
Copy link

Hello,

I face the same issue with the CenterNet model. Any update on the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants