mod to labels.jl on mac
[?]
AEj8dahVWy718uSSFPe9VSRJ5qX5G8pC2zvFzJJ8yzBd
Nov 28, 2024, 12:10 AM
QOHOQELCT63KX6JOOUCD5HIMRIBM2EWD6YTBKGEAKD5NXVA6KUSACDependencies
- [2]
5M7JW5OVnew functiont in Labels.jl - [3]
YXAKJSDTadded check_change_avianz_species! function to Labels.jl - [4]
YODTMMPTadded a whole bunch of functions to Labels.jl for working with raven and avians labels - [5]
7KO4BAOGTidy up - [6]
2UBDFCJHnew files tracked
Change contents
- edit in src/Labels.jl at line 8
avianz_of_scores, - replacement in src/Labels.jl at line 17
using CSV, DataFrames, Glob, Random, DBInterface, DuckDB, JSON3, Datesusing CSV, DataFrames, Glob, Random, DBInterface, DuckDB, JSON3, Dates, WAV - edit in src/Labels.jl at line 415[2.2317]
#using DataFrames, CSV, WAVfunction avianz_of_scores(scores::String) #scores.csvdf = CSV.read(scores, DataFrame)sort!(df, [:file, :start_time, :end_time])gdf = groupby(df, :file)for group in gdffilename = first(group.file)audio_data, sample_rate, _, _ = WAV.wavread(filename)duration = Float64(length(audio_data) / sample_rate)data = Any[Dict([("Operator", "D"), ("Reviewer", "D"), ("Duration", duration)])]labels = Any[]for row in eachrow(group)if row.prediction != "nothing"label = [row.start_time,row.end_time,0,8000,[Dict([("filter", "M"),("species", row.prediction),("certainty", 100),]),],]push!(labels, label)endendappend!(data, labels)avianzf = filename * ".data"length(data) > 1 && avianz_file_of_dict(avianzf, data)endend