def __init__(self, box_features, camera_channel='/camera_crop/image_rect_color',
bbox_channel='/objectattention/bbox', feat_channel='/objectattention/features',
similarity_channel='/objectattention/similarity'):
""" weights should be a dictionary with variable names as keys and weights as values
"""
print "start"
self._camera_channel = camera_channel
self.curr_img = None
self.fps = None
print "session"
self.init_model(box_features)
self.temp = 1
self.bbox_publisher =rospy.Publisher(bbox_channel, Float64MultiArray, queue_size =1)
self.feat_publisher =rospy.Publisher(feat_channel, Float64MultiArray, queue_size =1)
self.similarity_publisher =rospy.Publisher(similarity_channel, Float64MultiArray, queue_size =1)
self.image_subscriber = rospy.Subscriber(camera_channel, Image, self._process_image)
self.msg = None
rospy.init_node('image_proc',anonymous=True)
评论列表
文章目录