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

Error running code #14

Open
bwsperry opened this issue Aug 13, 2023 · 2 comments
Open

Error running code #14

bwsperry opened this issue Aug 13, 2023 · 2 comments

Comments

@bwsperry
Copy link

Hi, when I run this from Windows command prompt, I get the following error. Can someone help troubleshoot? Thanks

run_plax_hypertrophy_inference.py ./PLAX ./Inference

Traceback (most recent call last):
File "C:\EchoNET\LVH\run_plax_hypertrophy_inference.py", line 375, in
args.update({k.replace('-', ''): v for k, (v, h) in vars(parser.parse_args()).items()})
File "C:\EchoNET\LVH\run_plax_hypertrophy_inference.py", line 375, in
args.update({k.replace('-', '
'): v for k, (v, h) in vars(parser.parse_args()).items()})
ValueError: too many values to unpack (expected 2)

@bwsperry
Copy link
Author

I see that this was discussed in another issue and have made this change:
args.update({k.replace('-', '_'): v for k, v in vars(parser.parse_args()).items()})
get_args = lambda l: {k: args[k] for k in l}

Unfortunately, now I'm getting this error:
TypeError: () takes 1 positional argument but 2 were given

@musc-zhangru
Copy link

This works for me:

Run inference

engine = PlaxHypertrophyInferenceEngine(**get_args(['device', 'model_path']))
engine.run_on_dir(**get_args(['in_dir', 'out_dir', 'batch_size', 'n_threads', 'verbose', 'save_csv', 'save_avi', 'save_npy']))

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