ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
An easy to use/extend object recognition API you can locally install. Python+Flask. Also works with ZMES!
Python API, Log, Event Server and Memory wrapper for ZoneMinder