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

Matlab style concatenation is incorrect and causes crashes #574

Open
tadhgmister opened this issue Nov 26, 2020 · 0 comments · May be fixed by #576
Open

Matlab style concatenation is incorrect and causes crashes #574

tadhgmister opened this issue Nov 26, 2020 · 0 comments · May be fixed by #576

Comments

@tadhgmister
Copy link

tadhgmister commented Nov 26, 2020

scores = [scores, scores * maskiou_p]

This line takes what was initially in scores and nests it in a plain python list along with a scaled version of scores. However this variable scores is unconditionally used in eval.py as though it is a numpy array:

yolact/eval.py

Line 155 in 57b8f2d

idx = t[1].argsort(0, descending=True)[:args.top_k]

This means that any case that hits the line in layers/output_utils.py will cause the evaluation to crash with an error claiming AttributeError: 'list' object has no attribute 'argsort'

I tried just replacing this with np.concatenate but that caused a different error so I'm not totally sure what the intent is. How should this be resolved?
I forgot the extra parenthesis when I first used it, works in the PR attached.

This was referenced Nov 26, 2020
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

Successfully merging a pull request may close this issue.

1 participant