facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.46k stars 1.43k forks source link

getting error #205

Open thespuzzy opened 5 months ago

thespuzzy commented 5 months ago

so im getting this error please help!!!!


AttributeError Traceback (most recent call last) in <cell line: 5>() 3 load_state(net, checkpoint) 4 ----> 5 get_rect(net.cuda(), [image_path], 512)

1 frames /usr/local/lib/python3.10/dist-packages/numpy/init.py in getattr(attr) 317 318 if attr in former_attrs: --> 319 raise AttributeError(former_attrs[attr]) 320 321 if attr == 'testing':

AttributeError: module 'numpy' has no attribute 'int'. np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

dhruvish20 commented 4 months ago

After replacing np.int withint, the program started working, but it still didn't output the OBJ file.

also make the same changes in lib/sdf.py file. That will give you the OBJ file output.

Mandarava1989 commented 4 months ago

Hey. I have the same issue, but i am not familiar with python, so no idea how or where exactly to change this or that. Any idea how can this issue be solved by someon who does not have a clue about coding?

thespuzzy commented 3 months ago

So idk why all of a sudden this started happening but it used to work just fine now i get all these random error codes.......... so after replacing net.int to int i now get this error code.

net = PoseEstimationWithMobileNet() checkpoint = torch.load('checkpoint_iter_370000.pth', map_location='cpu') load_state(net, checkpoint)

get_rect(net.cuda(), [image_path], 512)

NameError Traceback (most recent call last) in <cell line: 5>() 3 load_state(net, checkpoint) 4 ----> 5 get_rect(net.cuda(), [image_path], 512)

in get_rect(net, images, height_size) 38 if len(pose_entries[n]) == 0: 39 continue ---> 40 pose_keypoints = np.ones((num_keypoints, 2), dtype=int32) * -1 41 valid_keypoints = [] 42 for kpt_id in range(num_keypoints):

NameError: name 'int32' is not defined