Skip to content

Commit

Permalink
Set tolerance to 0 and fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan118 committed Feb 9, 2024
1 parent 3080db0 commit 6b00c7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion modules/detect_target/detect_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def run(self, data: image_and_time.ImageAndTime) -> "tuple[bool, detections_and_
"""
Returns annotated image.
"""
print(self.__enable_half_precision)
image = data.image
predictions = self.__model.predict(
source=image,
Expand Down
4 changes: 3 additions & 1 deletion tests/test_detect_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
IMAGE_ZIDANE_PATH = pathlib.Path("tests", "model_example", "zidane.jpg")
BOUNDING_BOX_ZIDANE_PATH = pathlib.Path("tests", "model_example", "bounding_box_zidane.txt")

BOUNDING_BOX_DECIMAL_TOLERANCE = -1
BOUNDING_BOX_DECIMAL_TOLERANCE = 0
CONFIDENCE_DECIMAL_TOLERANCE = 2


Expand Down Expand Up @@ -51,8 +51,10 @@ def create_detections(detections_from_file: np.ndarray) -> detections_and_time.D
Format: [confidence, label, x1, y1, x2, y2]
"""
assert detections_from_file.shape[1] == 6

result, detections = detections_and_time.DetectionsAndTime.create(0)
assert result
assert detections is not None

for i in range(0, detections_from_file.shape[0]):
result, detection = detections_and_time.Detection.create(detections_from_file[i][2:], int(detections_from_file[i][1]), detections_from_file[i][0])
Expand Down

0 comments on commit 6b00c7e

Please sign in to comment.