Hi,
I noticed that I cannot define the --area flag as 'EU'. It was possible "before" (but before when I cannot tell).
I looked inside bat_ident.py:
def set_analysis_location(kHz = 256):
if args.classifier is not None:
set_custom_classifier()
return
if args.area not in ["Bavaria", "South-Wales", "Sweden", "UK", "USA","USA-EAST","USA-WEST"]:
exit(code="Unknown location option or disabled during classifier improvement.")
else:
args.lat = -1
args.lon = -1
if args.kHz == 144:
cfg.SAMPLE_RATE = 144000
cfg.SIG_LENGTH = 1
cfg.SIG_OVERLAP = cfg.SIG_LENGTH / 4.0
cfg.SIG_MINLEN = cfg.SIG_LENGTH / 3.0
# args.locale = "en"
if args.area == "Bavaria":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Bavaria-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Bavaria-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Bavaria-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Bavaria-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
# args.locale = "en"
elif args.area == "EU":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-EU-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-EU-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-EU-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-EU-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "Sweden":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Sweden-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Sweden-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Sweden-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Sweden-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
args.locale = "se"
elif args.area == "Scotland":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Scotland-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Scotland-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Scotland-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-Scotland-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "South-Wales":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-SouthWales-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-SouthWales-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-SouthWales-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-SouthWales-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "UK":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-UK-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-UK-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-UK-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-UK-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "USA":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "USA-EAST":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-EAST-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-EAST-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-EAST-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-EAST-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "USA-WEST":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-WEST-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-WEST-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-WEST-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-USA-WEST-256kHz_Labels.txt"
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
elif args.area == "MarinCounty":
if args.no_noise == "on":
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-MarinCounty-256kHz-high.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-MarinCounty-256kHz-high_Labels.txt"
else:
cfg.CUSTOM_CLASSIFIER = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-MarinCounty-256kHz.tflite"
cfg.LABELS_FILE = cfg.BAT_CLASSIFIER_LOCATION + "/BattyBirdNET-MarinCounty-256kHz_Labels.txt"
print("Marin County currently only on 256kHz")
cfg.LABELS = utils.readLines(cfg.LABELS_FILE)
else:
cfg.CUSTOM_CLASSIFIER = None
When I add the value "EU" in:
if args.area not in ["Bavaria", "EU", "South-Wales", "Sweden", "UK", "USA","USA-EAST","USA-WEST"]: # Ajouté , "EU" !
it works, the classificator actually uses the EU model that I want.
Was it excluded intentionally (because unreliability?) or is it a typo?
The reason why I want to use this model is that it detects (quite well!) the social calls of Vespertilio murinus. AFAIK BattyBirdNET is the only classificator that includes this feature!.
Thanks for your feed-back.
JFG
Hi,
I noticed that I cannot define the --area flag as 'EU'. It was possible "before" (but before when I cannot tell).
I looked inside bat_ident.py:
When I add the value "EU" in:
if args.area not in ["Bavaria", "EU", "South-Wales", "Sweden", "UK", "USA","USA-EAST","USA-WEST"]: # Ajouté , "EU" !it works, the classificator actually uses the EU model that I want.
Was it excluded intentionally (because unreliability?) or is it a typo?
The reason why I want to use this model is that it detects (quite well!) the social calls of Vespertilio murinus. AFAIK BattyBirdNET is the only classificator that includes this feature!.
Thanks for your feed-back.
JFG