Segformer Semantic Segmentation #315
GitHub Actions / Autopep8
failed
Jul 19, 2024 in 0s
4 errors
Autopep8 found 4 errors
Annotations
github-actions / Autopep8
src/perception/semantic_segmentation/launch/semantic_segmentation.launch.py#L11-L18
'config',
'params.yaml'
)
-
+
resource_path = os.path.join(
get_package_share_directory('semantic_segmentation'),
'resource'
github-actions / Autopep8
src/perception/semantic_segmentation/launch/semantic_segmentation.launch.py#L22-L29
executable='semantic_segmentation_node',
name='semantic_segmentation_node',
parameters=[config,
- {'resource_path': resource_path}]
+ {'resource_path': resource_path}]
)
# finalize
github-actions / Autopep8
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L24-L36
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
-
+
self.image_subscription = self.create_subscription(
Image if not self.compressed else CompressedImage,
"/CAM_FRONT/image_rect_compressed",
github-actions / Autopep8
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L47-L54
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):
Loading