yolov7-pip
yolov7-pip copied to clipboard
How to use GPU with yolov7detect?
HI!
I used code from this link https://pypi.org/project/yolov7detect/:
model = yolov7.load('yolov7.pt')
# set model parameters
model.conf = 0.25 # NMS confidence threshold
model.iou = 0.45 # NMS IoU threshold
model.classes = None # (optional list) filter by class
model.device = 0
results = model(cd_frame, size=640, augment=False)
But anyway in Task Manager of Windows 11 I can see that GPU is not using.
I tried python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source yourvideo.mp4 --device 0 - this code load GPU.
How to tackle with this problem?
Best Regards!