Skip to content

Commit

Permalink
sublabel score
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmerza committed Mar 10, 2024
1 parent b876ecd commit fe45130
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ frigate:
mqtt_username: username
mqtt_password: password
main_topic: frigate
sublabel_score: true
camera:
- birdcam
bird_classification:
Expand Down
6 changes: 5 additions & 1 deletion index.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
firstmessage = True
_LOGGER = None

VERSION = '1.0.4'
VERSION = '1.0.5'

CONFIG_PATH = './config/config.yml'
DB_PATH = './config/classifier.db'
Expand Down Expand Up @@ -273,6 +273,10 @@ def on_message(client, userdata, message):
_LOGGER.error(f"Unknown label: {after_data['label']}")
return

# add score to sublabel
if config['frigate'].get('sublabel_score'):
sublabel = f'{sublabel} ({int(score * 100)}%)'

if result is None:
# Insert a new record if it doesn't exist
_LOGGER.info("No record yet for this event. Storing.")
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ paho_mqtt==1.6.1
PyYAML==6.0.1
tflite-support==0.4.4
requests==2.31.0
Pillow==10.0.0
tf-nightly==2.15.0.dev20230803
scipy==1.11.1
Pillow==10.0.0

0 comments on commit fe45130

Please sign in to comment.