-
Notifications
You must be signed in to change notification settings - Fork 11
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
Poetry Environment #159
Poetry Environment #159
Conversation
Added print for error in detection If this is error by zero, it didn't detect any species in the audio data, try tweetynet instead
One thing to consider is how well does |
Again, this is currently demonstrated across linux, windows, and macos on the github actions. |
* Replaced .append with pd.concat for pandas upgrade * Added resampy to poetry to fix librosa dependencies * Fixed return type mismatches for Microfaune and BirdNET --------- Co-authored-by: TQ Zhang <tianqiz04@gmail.com>
@@ -83,13 +83,14 @@ def splitSignal(sig, rate, overlap, seconds=3.0, minlen=1.5): | |||
def readAudioData(path, overlap, sample_rate=48000): | |||
|
|||
print('READING AUDIO DATA...', end=' ', flush=True) | |||
|
|||
# Open file with librosa (uses ffmpeg or libav) | |||
print("Path: ", path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use python format strings (https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals)
except Exception as e: | ||
print(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E4E pylint disallows e
as a variable name. Use exp
or exc
.
E4E pylint discourages broad-except. Please reconsider catching builtins.Exception
@@ -124,7 +124,7 @@ def create_spec(data, fs, n_mels=32, n_fft=2048, hop_len=1024): | |||
""" | |||
# Calculate spectrogram | |||
S = librosa.feature.melspectrogram( | |||
data, sr=fs, n_fft=n_fft, hop_length=hop_len, n_mels=n_mels) | |||
y=data, sr=fs, n_fft=n_fft, hop_length=hop_len, n_mels=n_mels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend each kwarg on a separate line
elif stats_type == "IoU": | ||
IoU_Matrix = clip_IoU(clip_automated_df, clip_manual_df) | ||
clip_stats_df = matrix_IoU_Scores( | ||
IoU_Matrix, clip_manual_df, threshold) | ||
if statistics_df.empty: | ||
statistics_df = clip_stats_df | ||
else: | ||
statistics_df = statistics_df.append(clip_stats_df) | ||
statistics_df = pd.concat([statistics_df, clip_stats_df]) | ||
except BaseException as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E4E pylint discourages broad-except. Please consider not catching builtins.BaseException
E4E pylint does not allow e
as a variable name. Please consider exc
or exp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should put some of the raised concerns into github issues before submitting this PR. I do agree with changing the error handling but that I think can safely be its own PR.
Other than that code changes lgtm
Adds Poetry for package/environment management