Skip to content

Commit

Permalink
Update segmentation_node.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrhuynh authored Jul 26, 2024
1 parent 8ba24c7 commit 80d2572
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ def __init__(self):
self.declare_parameter('MODEL_IMAGE_H', 1024)
self.declare_parameter('MODEL_IMAGE_W', 1024)

self.config = os.path.join(self.get_parameter('resource_path').value, self.get_parameter('config').value)
self.checkpoint = os.path.join(self.get_parameter('resource_path').value, self.get_parameter('checkpoint').value)
self.config = os.path.join(self.get_parameter(
'resource_path').value, self.get_parameter('config').value)
self.checkpoint = os.path.join(self.get_parameter(
'resource_path').value, self.get_parameter('checkpoint').value)
self.compressed = self.get_parameter('compressed').value
self.modelH = self.get_parameter('MODEL_IMAGE_H').value
self.modelW = self.get_parameter('MODEL_IMAGE_W').value
Expand All @@ -47,7 +49,8 @@ def __init__(self):
10
)
# self.palette = np.array(self.palette, dtype=np.uint8)
self.model = MMSegInferencer(self.config, self.checkpoint, dataset_name="cityscapes", device='cuda:0')
self.model = MMSegInferencer(self.config, self.checkpoint,
dataset_name="cityscapes", device='cuda:0')
self.bridge = CvBridge()

def listener_callback(self, msg):
Expand Down

0 comments on commit 80d2572

Please sign in to comment.