-
Notifications
You must be signed in to change notification settings - Fork 10
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
IndexError: list index out of range #10
Comments
fix: the case of no detections is now handled better
Hi @NoxTheXelor! Thanks for filing this issue. I have looked into it, and it seems that the problem was caused by the code not handling situations where the model did not produce any detections. I have fixed this issue and released a new version, 1.0.5. Please upgrade to the latest version and let me know if the issue has been resolved. In my testing, I tried creating scenarios where the model did not output any detections by running it on random noise and silent recordings, but the model was still able to find bat calls (albeit with a low probability). However, the only way I was able to replicate the issue you reported was by running the API on an empty WAV file with zero samples. This suggests that there may be an issue with the recordings made on your device. Thought it might be useful info. Again, thanks for your interest in batdetect2, happy to hear what you are using it for. Cheers, Santiago |
Thanks for the quick reply, I'll run a new instance soon and update you. |
Hello,
I was using the batdetect2 api (the 1.0.4) on a raspberry pi with high frequence microphone.
It worked very well (thanks to your work) few hours, but I encountered this error
I only used this line
results = api.process_file(file_path) ["pred_dict"]
in my code
I have not dived in the concerned code yet so I don't have any other info but don't hesitate to ask.
Could you give it a look ?
I joind a picture of the error as the code above is the result of a image to text and may contains error.
Thanks in advance
The text was updated successfully, but these errors were encountered: