yolov7
yolov7 copied to clipboard
kpt, yolov7-w6-pose.pt, Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
Traceback (most recent call last):
File "E:\Item\Item_done\yolo\yolo5\yolov7\yolov7-main\pose.py", line 27, in
kpts.cpu().numpy() -> kpts.detach().cpu().numpy()
I added PR #333 to solve this problem.
I added PR #333 to solve this problem.
how to export the to onnx?
use export.py
Do you use the latest YOLOv7 code? Take a look at #319
Do you use the latest YOLOv7 code? Take a look at #319
Yes。The latest yolov7 code.But it was the yolov7-w6-pose.pt model.
Do you use the latest YOLOv7 code? Take a look at #319
when i use:
python3 export.py --weights best.pt --grid --end2end --simplify --topk-all 100 --iou-thres 0.65 --img-size 1280 1280 --conf-thres 0.35 --max-wh 1280
error:
when i export the tiny model with nms, but the output have no nms: exported with command: python export.py --weights yolov7-tiny.pt --grid --end2end --simplify --topk-all 100 --iou-thres 0.65 --conf-thres 0.35 --img-size 640 640 --max-wh 640
it shoud be nms result, as const char *OUTPUT_COUNTS = "count"; const char *OUTPUT_BOXES = "box"; const char *OUTPUT_SCORES = "score"; const char *OUTPUT_CLASSES = "class";
It's OK. Output of onnx model has shape of (number_of_detections, 7). Second part consists of (batch_id,x0,y0,x1,y1,cls_id,score)
It's OK. Output of onnx model has shape of (number_of_detections, 7). Second part consists of (batch_id,x0,y0,x1,y1,cls_id,score)
OK。Thank you very much.