Skip to content

Commit f524f1a

Browse files
committed
fix: remove unused local variables in classnet and lap
- Remove unused rows and cols variables in NeuralNetwork.detect() in classnet.py (they are only needed in getBoundingBoxes()) - Remove unused pose3d local variable in Lap.check_threshold() in follow_line/lap.py
1 parent 9c4b6ab commit f524f1a

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

  • common/hal_interfaces/hal_interfaces/general
  • exercises/follow_line/python_template

common/hal_interfaces/hal_interfaces/general/classnet.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ def __init__(self):
220220
self.net = cv2.dnn.readNetFromTensorflow(FROZEN_GRAPH, PB_TXT)
221221

222222
def detect(self, img):
223-
rows = img.shape[0]
224-
cols = img.shape[1]
225223
self.net.setInput(
226224
cv2.dnn.blobFromImage(
227225
img,
@@ -238,8 +236,6 @@ def detect(self, img):
238236

239237
# Get bounding boxes function
240238
def getBoundingBoxes(self, img):
241-
rows = img.shape[0]
242-
cols = img.shape[1]
243239
detections = self.detect(img)
244240
bounding_boxes = []
245241

exercises/follow_line/python_template/lap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ def __init__(self, pose3d):
99
# Function to check for threshold
1010
# And incrementing the running time
1111
def check_threshold(self):
12-
pose3d = self.pose3d.getPose3d()
1312

1413
# Variable for pause
1514
if self.pause_condition == False:

0 commit comments

Comments
 (0)