Skip to content

Commit

Permalink
Made changes to Task 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dfwihand5150 committed Sep 27, 2024
1 parent 4d727e0 commit bed2b72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/bootcamp/detect_landing_pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, class_private_create_key: object, model: ultralytics.YOLO) ->
"""
assert class_private_create_key is DetectLandingPad.__create_key, "Use create() method"

self._model = model
self.__model = model

def run(self, image: np.ndarray) -> "tuple[list[bounding_box.BoundingBox], np.ndarray]":
"""
Expand All @@ -95,7 +95,7 @@ def run(self, image: np.ndarray) -> "tuple[list[bounding_box.BoundingBox], np.nd
# * device
# * verbose

predictions = self._model.predict(image, conf=0.75, device=self.__DEVICE, verbose=False)
predictions = self.__model.predict(image, conf=0.75, device=self.__DEVICE, verbose=False)
# Get the Result object
prediction = predictions[0]

Expand All @@ -118,7 +118,7 @@ def run(self, image: np.ndarray) -> "tuple[list[bounding_box.BoundingBox], np.nd
for i in range(0, boxes_cpu.shape[0]):
# Hint: .shape gets the dimensions of the numpy array
# for i in range(0, ...):
# # Create BoundingBox object and append to l xist
# # Create BoundingBox object and append to list
box_coordinates = np.array(
[boxes_cpu[i][0], boxes_cpu[i][1], boxes_cpu[i][2], boxes_cpu[i][3]]
)
Expand Down

0 comments on commit bed2b72

Please sign in to comment.