Tobias-Fischer / rt_gene

RT-GENE: Real-Time Eye Gaze and Blink Estimation in Natural Environments
http://www.imperial.ac.uk/personal-robotics
Other
366 stars 68 forks source link

Error with multiple subjects #8

Closed ahmed-alhindawi closed 5 years ago

ahmed-alhindawi commented 5 years ago

The following error is produced when multiple people are looking at the camera which is then recovered when there is only one person.

[ERROR] [1550842837.937656]: bad callback: <bound method LandmarkMethod.callback of <rt_gene.extract_landmarks_method.LandmarkMethod object at 0x7f9a51898910>>
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/ahmed/catkin_ws/src/rt_gene/rt_gene/src/rt_gene/extract_landmarks_method.py", line 392, in callback
    self.process_image(color_msg)
  File "/home/ahmed/catkin_ws/src/rt_gene/rt_gene/src/rt_gene/extract_landmarks_method.py", line 270, in process_image
    self.publish_subject_list(timestamp, self.subjects)
  File "/home/ahmed/catkin_ws/src/rt_gene/rt_gene/src/rt_gene/extract_landmarks_method.py", line 337, in publish_subject_list
    subject_list_message = self.__subject_bridge.images_to_msg(subjects, timestamp)
  File "/home/ahmed/catkin_ws/src/rt_gene/rt_gene/src/rt_gene/subject_ros_bridge.py", line 70, in images_to_msg
    msg.subjects.append(self.__subject_bridge.images_to_msg(subject_id, s))
  File "/home/ahmed/catkin_ws/src/rt_gene/rt_gene/src/rt_gene/subject_ros_bridge.py", line 51, in images_to_msg
    msg.right_eye_img = self.__cv_bridge.cv2_to_imgmsg(subject.right_eye_color, "rgb8")
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/cv_bridge/core.py", line 246, in cv2_to_imgmsg
    raise TypeError('Your input type is not a numpy array')
TypeError: Your input type is not a numpy array
ahmed-alhindawi commented 5 years ago

Issue re-appears occasionally but not as frequently as before. Will likely require a fix to drop the frame from calculation if bounding boxes are outside of the image (i.e. face is on edge of image leading to the eye patch extending the buffer outside of the image boundry)