DavidFernandezChaves / Detectron2_ros

A ROS Node for detecting objects using Detectron2.
MIT License
51 stars 23 forks source link

result of panoramic segmentation to ros msg #9

Closed ferry1997 closed 1 month ago

ferry1997 commented 2 years ago

Thank you very much for your open source. I want to use the panoramic segmentation model, but I don't know whether I can switch to MSG. Does the MSG of this project support this idea?

ferry1997 commented 2 years ago

I want to convert the mask obtained by panoramic segmentation into ROS MSG. What should I do?

                panoptic_seg, segments_info =self.predictor(np_image)["panoptic_seg"]
                result = panoptic_seg["panoptic_seg"].to("cpu")
                result_msg = self.getResult(result)
                self._result_pub.publish(result_msg)

Is there any error in this?

josematez commented 1 year ago

Hello, I have modified this repository to make it valid for panoptic segmentation models, you can check it at: https://github.com/josematez/detectron2_ros_probs. The node script https://github.com/josematez/detectron2_ros_probs/blob/master/src/panoptic_detectron2_ros.py includes an adaptation that obtains panoptic segmentation results but filtering just to "wall" category, so you can remove that part to get all object categories. Also, check the new ros msgs that I included in that repository.

DavidFernandezChaves commented 1 month ago

Thank you Jose.