Skip to content

Commit

Permalink
Fix warning at startup due to uninitilized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova authored Oct 27, 2023
1 parent 5f18491 commit 3bd4c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yoeo/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def detect_image(model, image, img_size=416, conf_thres=0.5, nms_thres=0.5, robo
DEFAULT_TRANSFORMS,
Resize(img_size)])((
image,
np.empty((1, 5)),
np.empty((img_size, img_size), dtype=np.uint8)))[0].unsqueeze(0)
np.zeros((1, 5)),
np.zeros((img_size, img_size), dtype=np.uint8)))[0].unsqueeze(0)

if torch.cuda.is_available():
input_img = input_img.to("cuda")
Expand Down

0 comments on commit 3bd4c6f

Please sign in to comment.