yolov7 + 跟踪 python

GitHub - WongKinYiu/yolov7: Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

github下载yolov7,并解压

下载yolov7.pt

配置好需要的python环境

测试下

python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source yourvideo.mp4

笔记本GeForce RTX 3050 Mobile环境下,大概35fps

https://github.com/haroonshakeel/yolov7-object-tracking

下载代码并解压到yolov7-main目录下

运行测试

python detect_or_track.py --weights yolov7.pt --source video1.mp4 --view-img --track --show-fps

Pytorch to tenrrt

wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-tiny.pt
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
git clone https://github.com/Linaom1214/tensorrt-python.git
python ./tensorrt-python/export.py -o yolov7-tiny.onnx -e yolov7-tiny-nms.trt -p fp16

运行起来大概100fps,需要安装tensorrt环境

注意,生成 engine 模型的过程必须在做推理的设备上运行。

python trt.py -e yolov7-tiny-nms.trt -o result.mp4 -v video1.mp4 --end2end

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值