Git Product home page Git Product logo

Comments (7)

cbalantic avatar cbalantic commented on May 28, 2024 1

As suggested by @aikibraki, this was indeed a case issue with .wav vs .WAV. Fixed with commit 85a2eac

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

There are lines of code in birdnet_verify that attempt to reconcile the WAV vs wav case, so I hope this is not the problem, but it's possible this is just a new bug! I don't have enough info to diagnose it from this alone and would have to step through with a debugger to figure it out.

From here, https://github.com/nationalparkservice/NSNSDAcoustics/blob/main/R/birdnet_verify.R line 210 is about frequency bins, so I can't quite discern the error source.

A few questions:

Did you run birdnet_format() already? (i.e., do you have csv files with a "verify" column in them?)

After you get this error, what happens when you run traceback()?

What happens if you wrap birdnet_verify in a debugonce() statement, and then step through with the debugger and check outputs line by line while in the debug environment? (This is more labor intensive, but short of being able to dig in and debug it myself, it's what I would do to learn more about the error.)

I'm hopeful we can figure out what is going on!

from nsnsdacoustics.

aikibraki avatar aikibraki commented on May 28, 2024

Thanks for the help!

The data are formatted with birdnet_format() already. It appears that the formatted files with detections use WAV, while the ones without use wav -- not sure if this is important.

In birdnet_verify.R, the line is 393. I had been using view(birdnet_verify) inside RStudio, where it is line 210.

Here's the results of the traceback()

6: utils::write.table(x = new.results, file = finame, row.names = FALSE, 
       col.names = TRUE, sep = ",", dec = ".", qmethod = "double")
5: eval(expr, p)
4: eval(expr, p)
3: eval.parent(Call)
2: write.csv(x = new.results, file = finame, row.names = FALSE)
1: birdnet_verify(data = to.verify, verification.library = ver.lib, 
       audio.directory = "[audio directory]", 
       results.directory = "[results directory]", 
       overwrite = FALSE, play = TRUE, frq.lim = c(0, 12), buffer = 1, 
       box.col = "blue", spec.col = monitoR::gray.3())

Running debugonce(birdnet_verify), watching the environment I found that:
this.wav is "character (empty)" and so is finame, which relies on this.wav
correct.ids is "integer (empty)"
these are empty from the point that they are created all the way through the end of the function.

I hope this is helpful!

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

It's not clear to me what's going on yet. I'm not able to reproduce this error on my end, and it's hard to diagnose without knowing whether your call to birdnet_verify() is pointing to valid files/folders.

A few more questions:

(1) When you run the example in the birdnet_verify helpfile, does it run correctly?

(2) Could you run the following and show me an example of some of the outputs?

list.files(
      path = 'path/to/your/results/directory/', 
      full.names = TRUE,
      recursive = TRUE
)

(3) Can you verify that your recordings follow the name convention SITEID_YYYYMMDD_HHMMSS, and/or provide an example of what your recording names look like?

Thanks!

from nsnsdacoustics.

aikibraki avatar aikibraki commented on May 28, 2024
  1. The example in the helpfile runs correctly for me.
  2. list.files() outputs each file in the directory like this:

[1] "C:/Users/MyName/OneDrive - Institution/Documents/R/Project/NSNSDACoustics/pilot_data/pilot_data_results2/SERC_20231004_164000.BirdNET_formatted_results.csv"

  1. My recordings follow the same naming convention (e.g. "SERC_20231004_164000.WAV")

Thanks!

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

If you are willing, could you contact me by email (cathleen_balantic [at] nps.gov) and send me a few of your formatted csv files? I don't think I can solve this otherwise! Thank you for considering.

from nsnsdacoustics.

aikibraki avatar aikibraki commented on May 28, 2024

Sent!

from nsnsdacoustics.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.