mod to labels.jl on mac

[?]
AEj8dahVWy718uSSFPe9VSRJ5qX5G8pC2zvFzJJ8yzBd
Nov 28, 2024, 12:10 AM
QOHOQELCT63KX6JOOUCD5HIMRIBM2EWD6YTBKGEAKD5NXVA6KUSAC

Dependencies

  • [2] 5M7JW5OV new functiont in Labels.jl
  • [3] YXAKJSDT added check_change_avianz_species! function to Labels.jl
  • [4] YODTMMPT added a whole bunch of functions to Labels.jl for working with raven and avians labels
  • [5] 7KO4BAOG Tidy up
  • [6] 2UBDFCJH new files tracked

Change contents

  • edit in src/Labels.jl at line 8
    [2.73]
    [3.1116]
    avianz_of_scores,
  • replacement in src/Labels.jl at line 17
    [3.54][3.88:159]()
    using CSV, DataFrames, Glob, Random, DBInterface, DuckDB, JSON3, Dates
    [3.54]
    [3.111]
    using CSV, DataFrames, Glob, Random, DBInterface, DuckDB, JSON3, Dates, WAV
  • edit in src/Labels.jl at line 415
    [2.2317]
    #using DataFrames, CSV, WAV
    function avianz_of_scores(scores::String) #scores.csv
    df = CSV.read(scores, DataFrame)
    sort!(df, [:file, :start_time, :end_time])
    gdf = groupby(df, :file)
    for group in gdf
    filename = 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)
    end
    end
    append!(data, labels)
    avianzf = filename * ".data"
    length(data) > 1 && avianz_file_of_dict(avianzf, data)
    end
    end