Skip to content

Commit

Permalink
Auto-format by Ultralytics actions
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Jan 11, 2024
1 parent 9454713 commit 98d6a94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ def write_to_csv(image_name, prediction, confidence):

# Stream results
im0 = annotator.result()
im0 = ((im0.astype(np.float32) * (1 - opt.line_alpha)) + (im0s.astype(np.float32) * opt.line_alpha)).astype(np.uint8)
im0 = ((im0.astype(np.float32) * (1 - opt.line_alpha)) + (im0s.astype(np.float32) * opt.line_alpha)).astype(
np.uint8
)
if view_img:
if platform.system() == "Linux" and p not in windows:
windows.append(p)
Expand Down Expand Up @@ -291,7 +293,9 @@ def parse_opt():
parser.add_argument("--name", default="exp", help="save results to project/name")
parser.add_argument("--exist-ok", action="store_true", help="existing project/name ok, do not increment")
parser.add_argument("--line-thickness", default=3, type=int, help="bounding box thickness (pixels)")
parser.add_argument("--line-alpha", default=0.5, type=float, help="bounding box transparency: 0.0:transparent - 1.0:opaque")
parser.add_argument(
"--line-alpha", default=0.5, type=float, help="bounding box transparency: 0.0:transparent - 1.0:opaque"
)
parser.add_argument("--hide-labels", default=False, action="store_true", help="hide labels")
parser.add_argument("--hide-conf", default=False, action="store_true", help="hide confidences")
parser.add_argument("--half", action="store_true", help="use FP16 half-precision inference")
Expand Down

0 comments on commit 98d6a94

Please sign in to comment.