diff --git a/src/lhw_interfaces/msg_vision/Entity.msg b/src/lhw_interfaces/msg_vision/Entity.msg index 4d0175d1820bbb8c2c0999ddf4cbed6e2a6d26ee..7f4ad0a7bc51d650dcf1a8480121ace198fb551b 100644 --- a/src/lhw_interfaces/msg_vision/Entity.msg +++ b/src/lhw_interfaces/msg_vision/Entity.msg @@ -4,7 +4,7 @@ VisualSources sources_types uint8[] sources # Previous sources uint32[] sources_ids # The id which was originally given to this entity (same order as above) -uint16[4] bbox # [x1, y1, x2, y2] +int32[4] bbox # [x1, y1, x2, y2] float32[3] xyz [0.0,0.0,0.0] string type # Ex. person, apple, book float32 confidence \ No newline at end of file diff --git a/src/lhw_vision/lhw_vision/tracker/reid.py b/src/lhw_vision/lhw_vision/tracker/reid.py index ccb95ea537af209a6f8cce3c7d8a8e8dfcca44c8..fccb425dd3c92701f813280f42561e4ec78bab15 100644 --- a/src/lhw_vision/lhw_vision/tracker/reid.py +++ b/src/lhw_vision/lhw_vision/tracker/reid.py @@ -87,7 +87,6 @@ class ReID: people = detections['person'] for person in people: if 'target_tracked_id' in person: - self.log.info('Already found target') continue #embed the person z = self.embed(person['bbox'],image) diff --git a/src/lhw_vision/lhw_vision/tracker_node.py b/src/lhw_vision/lhw_vision/tracker_node.py index 4f0de398112d3bf0b2d0ac609a7e64955108238e..6cbea49792a632acea5a7ef8278b66f5207c1f6c 100644 --- a/src/lhw_vision/lhw_vision/tracker_node.py +++ b/src/lhw_vision/lhw_vision/tracker_node.py @@ -39,7 +39,6 @@ class Tracker(Node): """ timestamp = image_msg.header.stamp image = self.bridge.imgmsg_to_cv2(image_msg,desired_encoding='rgb8') - self.log.info(str(timestamp)) if timestamp not in self.entities: self.images[timestamp] = image else: @@ -47,8 +46,6 @@ class Tracker(Node): self.track(entities, image, timestamp) def yolo_callback(self,entities_msg): - self.log.info("In yolo callback") - #FIXME: the timestamps dict may grow indefinitely if not all images are turned into yolo entities, should have some way of dealing with it timestamp = entities_msg.time entities = {ent.type:[] for ent in entities_msg.entities} self.log.info(f"Yolo detected {len(entities_msg.entities)} targets") diff --git a/src/lhw_vision/lhw_vision/yolo_node.py b/src/lhw_vision/lhw_vision/yolo_node.py index a30afeaeccb68fd2d4a267da899246ca283f3747..b817a00cee355dc18b3ea905beb895dd778fd68c 100644 --- a/src/lhw_vision/lhw_vision/yolo_node.py +++ b/src/lhw_vision/lhw_vision/yolo_node.py @@ -135,7 +135,7 @@ class YoloDetector(Node): scale_diff = self.original_size/self.rescale_size #Note that original_size and rescale size is height,width while preds are xyxy true_bbox = np.array((det[0]*scale_diff[1], det[1]*scale_diff[0], - det[2]*scale_diff[1], det[3]*scale_diff[0])).astype(np.uint16) + det[2]*scale_diff[1], det[3]*scale_diff[0])).astype(np.int32) entity = Entity() entity.id = i