diff --git a/birdnet.conf-defaults b/birdnet.conf-defaults index 21773cc..87f01da 100644 --- a/birdnet.conf-defaults +++ b/birdnet.conf-defaults @@ -126,11 +126,14 @@ CHANNELS=2 FULL_DISK=purge -## PRIVACY_MODE can be set to 'on' or 'off' to configure analysis to be more -## sensitive to human detections. PRIVACY_MODE 'on' will purge any data that -## receives even a low HUMAN_HUMAN confidence score. +## PRIVACY_THRESHOLD can be set to enable sensitivity to Human sounds. This +## setting is an effort to introduce privacy into the data collection. +## The PRIVACY_THRESHOLD value represents a percentage of the entire species +## list used during analysis. If a human sound is predicted anywhere within +## the precentile set below, no data is collected for that audio chunk. +## Valid range: 0-3 -PRIVACY_MODE=off +PRIVACY_THRESHOLD=0 ## RECORDING_LENGTH sets the length of the recording that BirdNET-Lite will ## analyze. diff --git a/homepage/style.css b/homepage/style.css index 6469e1c..ba5e360 100644 --- a/homepage/style.css +++ b/homepage/style.css @@ -349,6 +349,36 @@ button:hover { width: 20%; } +.slider { + -webkit-appearance: none; + width: 33%; + height: 15px; + border-radius: 5px; + background: #d3d3d3; + outline: none; + opacity: 0.7; + -webkit-transition: .2s; + transition: opacity .2s; +} + +.slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 25px; + height: 25px; + border-radius: 50%; + background: #04AA6D; + cursor: pointer; +} + +.slider::-moz-range-thumb { + width: 25px; + height: 25px; + border-radius: 50%; + background: #04AA6D; + cursor: pointer; +} + #body::-webkit-scrollbar { # display:none #} diff --git a/model/labels_l18n.zip b/model/labels_l18n.zip index 9503754..45a20e2 100644 Binary files a/model/labels_l18n.zip and b/model/labels_l18n.zip differ diff --git a/scripts/advanced.php b/scripts/advanced.php index bfcd285..2e766dd 100644 --- a/scripts/advanced.php +++ b/scripts/advanced.php @@ -109,27 +109,12 @@ if(isset($_GET['submit'])) { } } - if(isset($_GET["privacy_mode"])) { - $privacy_mode = $_GET["privacy_mode"]; - if(strcmp($config['PRIVACY_MODE'], "1") == 0 ) { - $pmode = "on"; - }elseif(strcmp($config['PRIVACY_MODE'], "") == 0) { - $pmode = "off"; - } - if(strcmp($privacy_mode,$pmode) !== 0) { - $contents = preg_replace("/PRIVACY_MODE=.*/", "PRIVACY_MODE=$privacy_mode", $contents); - $contents2 = preg_replace("/PRIVACY_MODE=.*/", "PRIVACY_MODE=$privacy_mode", $contents2); - if(strcmp($privacy_mode,"on") == 0) { - exec('sudo sed -i \'s/\/usr\/local\/bin\/server.py/\/usr\/local\/bin\/privacy_server.py/g\' ../../BirdNET-Pi/templates/birdnet_server.service'); - exec('sudo systemctl daemon-reload'); - exec('restart_services.sh'); - header('Location: /log'); - } elseif(strcmp($privacy_mode,"off") == 0) { - exec('sudo sed -i \'s/\/usr\/local\/bin\/privacy_server.py/\/usr\/local\/bin\/server.py/g\' ../../BirdNET-Pi/templates/birdnet_server.service'); - exec('sudo systemctl daemon-reload'); - exec('restart_services.sh'); - header('Location: /log'); - } + if(isset($_GET["privacy_threshold"])) { + $privacy_threshold = $_GET["privacy_threshold"]; + if(strcmp($privacy_threshold,$config['PRIVACY_THRESHOLD']) !== 0) { + $contents = preg_replace("/PRIVACY_THRESHOLD=.*/", "PRIVACY_THRESHOLD=$privacy_threshold", $contents); + $contents2 = preg_replace("/PRIVACY_THRESHOLD=.*/", "PRIVACY_THRESHOLD=$privacy_threshold", $contents2); + exec('restart_services.sh'); } } @@ -178,6 +163,9 @@ if(isset($_GET['submit'])) { fwrite($fh, $contents); fwrite($fh2, $contents2); } + +$count_labels = count(file("./scripts/labels.txt")); +$count = $count_labels; ?>