From a074945394e86d4f6b99b1c9e0f37d70a8a7efbf Mon Sep 17 00:00:00 2001 From: blakeblackshear Date: Wed, 27 Mar 2019 06:55:32 -0500 Subject: [PATCH] missing param and updated readme --- README.md | 13 ++++++++++--- detect_objects.py | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ff06c9fb9..255865ea7 100644 --- a/README.md +++ b/README.md @@ -108,19 +108,26 @@ sensor: - Use SSDLite models to reduce CPU usage ## Future improvements -- [ ] Build tensorflow from source for CPU optimizations +- [x] Remove motion detection for now +- [ ] Try running object detection in a thread rather than a process +- [x] Implement min person size again +- [ ] Switch to a config file +- [ ] Handle multiple cameras in the same container +- [ ] Simplify motion detection (check entire image against mask) +- [ ] See if motion detection is even worth running +- [ ] Scan for people across entire image rather than specfic regions +- [ ] Dynamically resize detection area and follow people - [ ] Add ability to turn detection on and off via MQTT - [ ] MQTT motion occasionally gets stuck ON - [ ] Output movie clips of people for notifications, etc. - [ ] Integrate with homeassistant push camera - [ ] Merge bounding boxes that span multiple regions -- [ ] Switch to a config file - [ ] Allow motion regions to be different than object detection regions - [ ] Implement mode to save labeled objects for training - [ ] Try and reduce CPU usage by simplifying the tensorflow model to just include the objects we care about - [ ] Look into GPU accelerated decoding of RTSP stream - [ ] Send video over a socket and use JSMPEG -- [ ] Look into neural compute stick +- [x] Look into neural compute stick ## Building Tensorflow from source for CPU optimizations https://www.tensorflow.org/install/source#docker_linux_builds diff --git a/detect_objects.py b/detect_objects.py index 5ac5f5299..cd1da04cf 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -29,9 +29,9 @@ MQTT_USER = os.getenv('MQTT_USER') MQTT_PASS = os.getenv('MQTT_PASS') MQTT_TOPIC_PREFIX = os.getenv('MQTT_TOPIC_PREFIX') -REGIONS = "300,0,0,2000,200,no-mask-300.bmp:300,300,0,2000,200,no-mask-300.bmp:300,600,0,2000,200,no-mask-300.bmp:300,900,0,2000,200,no-mask-300.bmp" +# REGIONS = "300,0,0,2000,200,no-mask-300.bmp:300,300,0,2000,200,no-mask-300.bmp:300,600,0,2000,200,no-mask-300.bmp:300,900,0,2000,200,no-mask-300.bmp:300,0,300,2000,200,no-mask-300.bmp:300,300,300,2000,200,no-mask-300.bmp:300,600,300,2000,200,no-mask-300.bmp:300,900,300,2000,200,no-mask-300.bmp" # REGIONS = "400,350,250,50" -# REGIONS = os.getenv('REGIONS') +REGIONS = os.getenv('REGIONS') DEBUG = (os.getenv('DEBUG') == '1') @@ -145,7 +145,7 @@ def main(): best_person_frame.start() # start a thread to parse objects from the queue - object_parser = ObjectParser(object_queue, objects_parsed, DETECTED_OBJECTS) + object_parser = ObjectParser(object_queue, objects_parsed, DETECTED_OBJECTS, regions) object_parser.start() # start a thread to expire objects from the detected objects list object_cleaner = ObjectCleaner(objects_parsed, DETECTED_OBJECTS)