use objectdetection model predict the image subscribed by kinect topic
I use the tensorflow object detection API train a model, I want to use the image topic in the kinect camera and identify it with the trained model. I found that recognition is much less effective than using image recognition directly. Why is that? Is it caused by predicting the image in rosimage format after converting it to cv::mat? Is there any way to solve it?
image_topic = "/kinect2/qhd/image_color"
self._cv_bridge = CvBridge()
self._sub = rospy.Subscriber(image_topic, Image, self.mycallback, queue_size=1)
def mycallback(self,image):
cv_image = self._cv_bridge.imgmsg_to_cv2(image_msg, "bgr8")
pil_img = Image.fromarray(cv_image)