In both of below approaches, I am getting blank image but yolo is printing the prediction results.
import torch
import cv2
model = torch.hub.load('ultralytics/yolov5', 'yolov5m')
img = cv2.imread("assets/images.jpeg")
results = model(img)
# im_rgb = results.render()
# img_boxes = im_rgb[0]
im_rgb = cv2.cvtColor(results.ims[0], cv2.COLOR_BGR2RGB)
print(results.pandas().xyxy[0])
cv2.imshow("Result",im_rgb)