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

Fixed a bug in running eval.py: TypeError: only size-1 arrays can be converted to Python scalars #9

Open
yihshe opened this issue Nov 18, 2024 · 0 comments

Comments

@yihshe
Copy link

yihshe commented Nov 18, 2024

To calculate the semantic segmentation oAcc, the denominator at ForAINet/PointCloudSegmentation/torch_points3d/datasets/panoptic/treeins_set1.py(204)final_eval() is originally written as sum(true_positive_classes[sem_classcount_final])/float(sum(positive_classes[[sem_classcount_final]])), however, this will raise the error: TypeError: only size-1 arrays can be converted to Python scalars. The bug is fixed by removing the brackets of [sem_classcount_final] in the denominator, which I suspect is a typo. The corrected line should be: sum(true_positive_classes[sem_classcount_final])/float(sum(positive_classes[sem_classcount_final])).

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

1 participant