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

different image shape #2

Closed
luoww1992 opened this issue Sep 8, 2022 · 3 comments
Closed

different image shape #2

luoww1992 opened this issue Sep 8, 2022 · 3 comments

Comments

@luoww1992
Copy link

when i change the test type with RealSense_pipeline by device name to test mp4 with opencv, the input frame size to h.estimate() is 640*480,
but when i run hpe.py , it show me :

    Traceback (most recent call last):
      File "D:/ISBFSAR/modules/hpe/demo.py", line 259, in <module>
        res = h.estimate(img)
      File "D:/ISBFSAR/modules/hpe/demo.py", line 109, in estimate
        bbone_in = self.image_transformation([frame.astype(int), H.astype(np.float32)])
      File "D:\ISBFSAR\utils\tensorrt_runner.py", line 60, in __call__
        np.copyto(inp.host, elem)
      File "<__array_function__ internals>", line 180, in copyto
    ValueError: could not broadcast input array from shape (9,) into shape (45,)

why ?

@steb6
Copy link
Owner

steb6 commented Sep 8, 2022

Hi, did you rename hpe.py to demo.py?
Try to clone my latest push and run modules/hpe/hpe.py.
The system works both with rgb or skeleton input data and the input data type can be changed in utils/params/py.
Since this is a work in development some scripts may not work anymore, you may want to check main.py that is the most updated one.

@luoww1992
Copy link
Author

luoww1992 commented Sep 8, 2022

Hi, did you rename hpe.py to demo.py? Try to clone my latest push and run modules/hpe/hpe.py. The system works both with rgb or skeleton input data and the input data type can be changed in utils/params/py. Since this is a work in development some scripts may not work anymore, you may want to check main.py that is the most updated one.

yes, i copy the file hpe.py and rename it with demo.py to edit it , i am chenking the code,
i find that maybe i need to change the batch_size=5 to batch_size=1, i think it is the error place, now i am trying to run the setup again.

@steb6
Copy link
Owner

steb6 commented Sep 8, 2022

You are right, I have created 2 TRT engines: one with batch_size=1 and one with batch_size=5 for test time augmentation.

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

2 participants