From 122a1666caf887e752152ae2a730a968cc471c53 Mon Sep 17 00:00:00 2001 From: blakeblackshear Date: Sat, 23 Feb 2019 07:43:14 -0600 Subject: [PATCH] just save images when a person is detected --- detect_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_objects.py b/detect_objects.py index 47818ec11..df8c9db54 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -63,7 +63,7 @@ def detect_objects(cropped_frame, sess, detection_graph, region_size, region_x_o feed_dict={image_tensor: image_np_expanded}) if debug: - if len([value for index,value in enumerate(classes[0]) if str(category_index.get(value)) == 'person' and scores[0,index] > 0.5]) > 0: + if len([value for index,value in enumerate(classes[0]) if str(category_index.get(value).get('name')) == 'person' and scores[0,index] > 0.5]) > 0: vis_util.visualize_boxes_and_labels_on_image_array( cropped_frame, np.squeeze(boxes),