Skip to content

Commit

Permalink
First speed testing commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MoodyMusicMan committed Jan 3, 2018
1 parent e64a8f6 commit 40a032f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ros/src/tl_detector/tl_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ def image_cb(self, msg):

# Perform Detection
time1 = time.time()
(boxes, scores, classes, num) = sess.run(
[detection_boxes, detection_scores, detection_classes, num_detections],
feed_dict={image_tensor: image_np_expanded})
#(boxes, scores, classes, num) = sess.run(
# [detection_boxes, detection_scores, detection_classes, num_detections],
# feed_dict={image_tensor: image_np_expanded})
#rospy.logerr('Number of detections: {}'.format(num))
#rospy.logerr('Classes:')
#rospy.logerr(classes)
Expand All @@ -147,7 +147,8 @@ def image_cb(self, msg):

# Grab the class with the heighest prediction score
# 1 = Undefined, 2 = Red, 3 = Yellow, 4 = Green
tl_state_prediction = classes[0][np.argmax(scores)]
#tl_state_prediction = classes[0][np.argmax(scores)]
tl_state_prediction = 4
tl_state_dict = {1:'Undefined', 2:'Red', 3:'Yellow', 4:'Green'}
rospy.logwarn("Traffic State Prediction: {}".format(tl_state_dict[tl_state_prediction]))

Expand Down

0 comments on commit 40a032f

Please sign in to comment.