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

Warning and low performance when using lrp continuously to analyze video stream #14

Open
mlewelt opened this issue Sep 10, 2024 · 0 comments

Comments

@mlewelt
Copy link

mlewelt commented Sep 10, 2024

I am using YOLOv8LRP to show real-time LRP of a videostream, captured with a webcam.

The first call works normal, from the second iteration forward i receive this warnings:

Warning: Replacing previous fwd hook registered for <class 'ultralytics.nn.modules.conv.Concat'>
Warning: Replacing previous fwd hook registered for <class 'ultralytics.nn.modules.block.SPPF'>

Warnings are thrown when this code is called:
lrp = YOLOv8LRP(model, power=2, eps=1, device='cpu')
explanation_lrp = lrp.explain(lrpImage, cls=lrpClass, contrastive=False).cpu()

Also, performance of the application is very slow (below 1 fps), without LRP i get ~20 fps.

Full code is supplied.
webcamDetectWithLRP.txt

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