Skip to content

Commit

Permalink
Implement Coderabbit changes to Lanedetecrtion Node #2
Browse files Browse the repository at this point in the history
  • Loading branch information
EyMaxl committed Jan 3, 2025
1 parent becb77a commit d509ded
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import subprocess
import matplotlib.pyplot as plt
from mmdet.apis import init_detector
import numpy as np

# from libs.api.inference import inference_one_image
from libs.utils.visualizer import visualize_lanes
Expand Down Expand Up @@ -226,7 +227,9 @@ def image_handler(self, ImageMsg):
self.lane_publisher.publish(lanedetection_image)
else:
# Only there to see if node is running, if lane_mask returns null -> model not working yet
no_img = np.zeros_like(self.image) # Creates an empty image with the same dimensions
no_img = np.zeros_like(
self.image
) # Creates an empty image with the same dimensions
lanedetection_image = self.bridge.cv2_to_imgmsg(no_img, "bgr8")
self.lane_publisher.publish(lanedetection_image)

Expand Down Expand Up @@ -298,7 +301,6 @@ def detect_lanes(self, image, model):
torch.cuda.empty_cache()
return None


def inference_one_image(self, model, image):
"""Inference on an image with the detector.
Args:
Expand Down

0 comments on commit d509ded

Please sign in to comment.