Skip to content

Commit ff276cb

Browse files
committed
use rescaled polygons
1 parent 8369ba3 commit ff276cb

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

mlapi.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,17 @@ def post(self):
230230
g.log.Debug (1, f'Calling detect streams with {stream} and {stream_options} and ml_overrides={ml_overrides} ml_options={ml_options}')
231231
#print (f'************************ {args}')
232232
matched_data,all_matches = m.detect_stream(stream=stream, options=stream_options, ml_overrides=ml_overrides)
233-
local_polygons = g.polygons
233+
234+
if matched_data['polygons']:
235+
local_polygons = matched_data['polygons']
236+
g.logger.Debug(4,'Using returned polygons from detectSequence as it may have been rescaled')
237+
else:
238+
local_polygons=g.polygons
239+
240+
241+
if matched_data['image_dimensions']:
242+
oldh =matched_data['image_dimensions']['original'][0]
243+
oldw = matched_data['image_dimensions']['original'][1]
234244

235245
if config_copy:
236246
g.log.Debug(4, 'Restoring global config & ml_options')

modules/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "2.2.7"
1+
__version__ = "2.2.8"
22
VERSION=__version__

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ flask ~= 1.1.2
1111
progressbar33
1212
scikit_learn
1313
face_recognition
14-
pyzm>=0.3.36
14+
pyzm>=0.3.37
1515
portalocker
1616
bjoern

0 commit comments

Comments
 (0)