Skip to content

Commit

Permalink
[gpt4v_vqa] bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
sktometometo committed Jan 9, 2024
1 parent bb4b28e commit 1383e36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpt4v_vqa/node_scripts/gpt4v_vqa_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def resize_image(self, image: np.ndarray) -> np.ndarray:

def _image_cb(self, msg: Image):
image = ros_numpy.numpify(msg)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
self.default_img = image

def _ac_cb(self, goal: VQATaskGoal):
Expand All @@ -87,6 +88,7 @@ def _ac_cb(self, goal: VQATaskGoal):

if len(goal.image.data) > 0:
image = ros_numpy.numpify(goal.image)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
elif len(goal.compressed_image.data) > 0:
rospy.logerr(f"Compressed image is not supported.")
self.ac.set_aborted(result)
Expand Down

0 comments on commit 1383e36

Please sign in to comment.