Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

how to solve this problem? #243

Open
Hadener opened this issue May 11, 2023 · 3 comments
Open

how to solve this problem? #243

Hadener opened this issue May 11, 2023 · 3 comments

Comments

@Hadener
Copy link

Hadener commented May 11, 2023

inferring 2D keypoints with Detectron:Using Detectron2 (new):setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (129, 2) + inhomogeneous part.

@leedujin
Copy link

I want to know too

@minsuuuj
Copy link

https://velog.io/@setxty/numpy-array-%EB%B3%80%ED%99%98-%EC%8B%9C-Error

solution)
Change code
before:

np.savez_compressed(out_name, boxes=boxes, segments=segments, keypoints=keypoints, metadata=metadata)

after:

datas = {
            'boxes': boxes,
            'segments': segments,
            'keypoints': keypoints,
            'metadata': metadata
        }
for key, value in datas.items():
    datas[key] = np.array(value, dtype=object)

np.savez_compressed(out_name, **datas)

@hunminkim98
Copy link

https://velog.io/@setxty/numpy-array-%EB%B3%80%ED%99%98-%EC%8B%9C-Error

solution)

Change code

before:

np.savez_compressed(out_name, boxes=boxes, segments=segments, keypoints=keypoints, metadata=metadata)

after:

datas = {

            'boxes': boxes,

            'segments': segments,

            'keypoints': keypoints,

            'metadata': metadata

        }

for key, value in datas.items():

    datas[key] = np.array(value, dtype=object)



np.savez_compressed(out_name, **datas)

Thank you sharing your edited code! I'll tell you after try this code. 😊😊

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

No branches or pull requests

4 participants