ZoneMinder / mlapi

An easy to use/extend object recognition API you can locally install. Python+Flask. Also works with ZMES!
Other
58 stars 35 forks source link

TypeError: 'float' object is not subscriptable #40

Open hqhoang opened 3 years ago

hqhoang commented 3 years ago

I put object_min_confidence=0.38 into one of the monitor sections in mlapiconfig.ini, and mlapi.py crashed with a TypeError on line 132, where it formats the debugging information.

g.logger.Debug(2, 'Overriding global {} with {}...'.format(key, g.monitor_config[mid][key][:30]))

pliablepixels commented 3 years ago

Please post your full mlapiconfig

hqhoang commented 3 years ago

Please post your full mlapiconfig

mlapiconfig.ini.txt

I commented out line #132 of mlapi.py, and it works fine, overriding object_min_confidence correctly. Somehow OpenCV saw a person from the texture of my freshly recoated driveway with a confidence of 0.369, bumping min_confidence to 0.38 to overcome that false positive.