Skip to content

Commit

Permalink
don't use mid for past detections if mid is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Jun 28, 2019
1 parent b61645a commit 36cd1ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hook/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def append_suffix(filename, token):
g.logger.error('Could not write image to ZoneMinder as eventpath not present')
# Now create prediction string

if g.config['match_past_detections'] == 'yes':
if g.config['match_past_detections'] == 'yes' and args['monitorid']:
# point detections to post processed data set
g.logger.debug ('Removing matches to past detections')
bbox_t, label_t, conf_t = img.processPastDetection(bbox, label, conf, args['monitorid'])
Expand Down
2 changes: 1 addition & 1 deletion hook/zmes_hook_helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "3.3.0"
__version__ = "3.3.1"
VERSION=__version__
3 changes: 3 additions & 0 deletions hook/zmes_hook_helpers/image_manip.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def processPastDetection (bbox, label, conf,mid):
except NameError:
FileNotFoundError = IOError

if not mid:
g.logger.debug ('Monitor ID not specified, cannot match past detections')
return bbox, label, conf
mon_file = g.config['image_path'] + '/monitor-'+mid +'-data.pkl'
g.logger.debug ('trying to load '+mon_file)
try:
Expand Down

0 comments on commit 36cd1ea

Please sign in to comment.