当前位置: 首页 > news >正文

石家庄网站营销网页设计地址

石家庄网站营销,网页设计地址,丽水 网站建设,做网站的开发环境git:https://github.com/ultralytics/ultralytics/blob/main/examples/YOLOv8-Region-Counter/readme.md 很长时间没有做yolov的项目了,最近一看yolov8有一个区域计数的功能,不得不说很实用啊。 b站:https://www.bilibili.com/vid…

git:https://github.com/ultralytics/ultralytics/blob/main/examples/YOLOv8-Region-Counter/readme.md
很长时间没有做yolov的项目了,最近一看yolov8有一个区域计数的功能,不得不说很实用啊。
b站:https://www.bilibili.com/video/BV1Ng4y1d7Yr/?spm_id_from=333.999.0.0

1. 开干

照着 git整就行;
pipe install ultralytics
1.安装库

# Clone ultralytics repo
git clone https://github.com/ultralytics/ultralytics# cd to local directory
cd ultralytics/examples/YOLOv8-Region-Counter
  1. Run the Region Counting Using Ultralytics Yolov8
# If you want to save results
python yolov8_region_counter.py --source "path/to/video.mp4" --save-img --view-img# If you want to run model on CPU
python yolov8_region_counter.py --source "path/to/video.mp4" --save-img --view-img --device cpu# If you want to change model file
python yolov8_region_counter.py --source "path/to/video.mp4" --save-img --weights "path/to/model.pt"# If you dont want to save results
python yolov8_region_counter.py --source "path/to/video.mp4" --view-img

Usage Options

--source: Specifies the path to the video file you want to run inference on.
--device: Specifies the device cpu or 0
--save-img: Flag to save the detection results as images.
--weights: Specifies a different YOLOv8 model file (e.g., yolov8n.pt, yolov8s.pt, yolov8m.pt, yolov8l.pt, yolov8x.pt).
--line-thickness: Specifies the bounding box thickness
--region-thickness: Specifies the region boxes thickness
--track-thickness: Specifies the track line thickness
counting_regions = [{"name": "YOLOv8 Polygon Region","polygon": Polygon([(50, 80), (250, 20), (450, 80), (400, 350), (100, 350)]),  # Polygon with five points (Pentagon)"counts": 0,"dragging": False,"region_color": (255, 42, 4),  # BGR Value"text_color": (255, 255, 255),  # Region Text Color},{"name": "YOLOv8 Rectangle Region","polygon": Polygon([(200, 250), (440, 250), (440, 550), (200, 550)]),  # Rectangle with four points"counts": 0,"dragging": False,"region_color": (37, 255, 225),  # BGR Value"text_color": (0, 0, 0),  # Region Text Color},
]
  1. 业务化改造,因为原仓库代码有问题
  2. python yolov8_region_counter.py --weights yolov8n.pt --device 0 --source D:\code\python_project\ultralytics\examples\YOLOv8-Region-Counter\test_person.mp4 --view-img --track-thickness 5
    –track-thickness参数 就是那几根线,我不清楚这几根线有啥意思。
    代码运行:

问题:1 有追踪的线
在这里插入图片描述
把线去掉
屏蔽这行代码,156行

cv2.polylines(frame, [points], isClosed=False, color=bbox_color, thickness=track_thickness)

在这里插入图片描述
问题2:生成的结果mp4 无法播放
不是bug,是我的运行命令没用对。
python yolov8_region_counter.py --weights yolov8n.pt --device 0 --source test_person.mp
4 --view-img --save-img

改进

可以自定义框的位置,
在这里插入图片描述

所使用命令:

python yolov8_region_counter.py --weights yolov8n.pt --device 0 --source test_person.mp
4 --view-img --save-img

http://www.yayakq.cn/news/761278/

相关文章:

  • wap蓝天建站wordpress 图片采集器
  • 建设网站的价格是多少钱不会被和谐的手机浏览器
  • 潍坊网站建设(首选聚搜网络)昆山网站优化公司
  • 杭州化工网站建设个人网站怎么做扫码支付
  • wordpress做的网站PHP网站开发技术期末作品
  • 淘宝店铺如何和别的网站做链接wordpress视频代码
  • lol网站模板营销推广方式
  • 小型 网站 源码购物网站商城
  • 做网站公司怎么找南昌seo排名收费
  • 合肥企业网站制作天津建设工程信息网渤海油田
  • 国内专业做网站网站建设公司公司介绍
  • 网站开发费用的会计分录怎么做推广比较成功
  • 怎么找网站站长企业名录搜索软件哪个好
  • 宁夏水利厅建设管理处网站通辽做网站制作
  • 网站的域名做邮箱wordpress主题php破解
  • 自建销售网站辽宁建设网站
  • 招聘网站大全58同城北京市建设部网站
  • 印度网站后缀wordpress域名修改后
  • 网站服务器 502宿州网站制作公司
  • 做商业网站的服务费维护费如何制作微信链接
  • 宁波网站建设工作怎么完整下载网站模板
  • 通化好的网站建设的公司秀洲区住房和城乡建设局网站
  • hexo框架做网站泉州seo网络优化公司
  • vue做的个人网站seo优化交流
  • 门户网站的案例分析wordpress翻页插件下载
  • 自己做网站步骤建网站投放广告赚钱
  • 无锡网站建设网怎么给网站做301
  • 婚恋网站建设项目创业计划书网站建设mingxinsh
  • 网站名重复商丘网站设计
  • 深圳 网站制作个人免费网站申请注册