Skip to content

Segformer Semantic Segmentation #286

Segformer Semantic Segmentation

Segformer Semantic Segmentation #286

Triggered via pull request June 14, 2024 02:37
Status Success
Total duration 18s
Artifacts

linting_auto.yml

on: pull_request
Run C++/Python linters
8s
Run C++/Python linters
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 2 warnings
src/perception/semantic_segmentation/launch/semantic_segmentation.launch.py#L16
executable='semantic_segmentation_node', name='semantic_segmentation_node', parameters=[config] - ) + ) # finalize ld.add_action(semantic_segmentation_node)
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L24
package_name = 'semantic_segmentation' package_share_directory = get_package_share_directory(package_name) CONFIG = os.path.join(package_share_directory, 'resource', 'model', - 'segformer_mit-b2_8xb1-160k_cityscapes-1024x1024.py') -CHECKPOINT = os.path.join(package_share_directory, 'resource', 'model', + 'segformer_mit-b2_8xb1-160k_cityscapes-1024x1024.py') +CHECKPOINT = os.path.join(package_share_directory, 'resource', 'model', 'segformer_mit-b2_8x1_1024x1024_160k_cityscapes_20211207_134205-6096669a.pth') IMAGE_H = 900
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L69
self.declare_parameter('config', "model/segformer_mit-b2_8xb1-160k_cityscapes-1024x1024.py") self.declare_parameter( 'checkpoint', "model/segformer_mit-b2_8x1_1024x1024_160k_cityscapes_20211207_134205-6096669a.pth") - + self.compressed = self.get_parameter('compressed').value self.image_subscription = self.create_subscription( Image if not self.compressed else CompressedImage,
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L106
except CvBridgeError as e: self.get_logger().error(str(e)) return - + with torch.no_grad(): out_img = self.model(image, show=False, )['predictions'] - + # logits = torch.tensor(out_img, dtype=torch.float32).unsqueeze(0).unsqueeze(0) # Add batch and channel dimensions # upsampled_logits = torch.nn.functional.interpolate(logits, # size=(IMAGE_H, IMAGE_W), # (height, width)
src/perception/semantic_segmentation/semantic_segmentation/segmentation_node.py#L128
self.image_publisher.publish(mask_output) - def main(args=None): rclpy.init(args=args)
Run C++/Python linters
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v1, WATonomous/wato-lint-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Run C++/Python linters
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-python@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/