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

舞台搭建制作公司seo的优化方案

舞台搭建制作公司,seo的优化方案,表格制作excel,早教网站建设方案这个最新的物体检测模型,很厉害的样子,还有物体追踪的功能。 有官方的Python代码,直接上手试试就好,至于理论,有想研究在看论文了╮(╯_╰)╭ 简单介绍 YOLOv8 中可用的模型 YOLOv8 模型的每个类别中有五个模型用于检…

这个最新的物体检测模型,很厉害的样子,还有物体追踪的功能。

有官方的Python代码,直接上手试试就好,至于理论,有想研究在看论文了╮(╯_╰)╭


简单介绍

YOLOv8 中可用的模型

YOLOv8 模型的每个类别中有五个模型用于检测、分割和分类。YOLOv8 Nano 是最快和最小的,而 YOLOv8 Extra Large (YOLOv8x) 是其中最准确但最慢的。用来实际使用的时候选权重模型。

| YOLOv8n | YOLOv8s | YOLOv8m | YOLOv8l | YOLOv8x |

其他介绍,就不用管了,上手玩一下要紧。看一下几个官方介绍图片就懂了:

请添加图片描述
请添加图片描述

这里可以看到,有物体检测识别,检测,分类,轨迹,姿态的功能,下面就上手试试。


部署-简单使用【超简单】

前提安装好Python,版本需要Python>=3.8 我的是 Python 3.11.3

视频图片识别

  1. 首先,先下载官方的代码。官网代码

  2. 执行安装与检测:【执行位置是在项目目录下】

pip install -r requirements.txt
pip install ultralytics# 执行这个,会自动下载模型
# Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to 'yolov8n.pt'...
# source 替换成需要检测的本地图片即可
yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg'# 也可以如下对视频进行检测
yolo task=detect mode=predict model=yolov8n.pt source=C:\Users\Administrator\Desktop\sssss-1.mp4  show=True#实例分割
yolo task=segment  mode=predict model=yolov8n-seg.pt source=C:\Users\Administrator\Desktop\sssss-1.mp4  show=True
  1. 看看这个检测出来的效果:
    请添加图片描述
    请添加图片描述请添加图片描述

  2. 是不是灰常的简单,[]( ̄▽ ̄)*

  3. 就酱紫,后面在试试其他功能。


视频流,摄像头识别

这个处理只需要把来源替换成0即可,就像这样

yolo task=detect mode=predict model=yolov8n.pt source=0 show=True

视频追踪-绘制随时间变化的轨迹【这个有意思】

可以用于视频追踪的模型是:YOLOv8n, YOLOv8n-seg and YOLOv8n-pose 【以8n举例子】

yolo track model=yolov8n.pt source=0 show=True 

这个追踪的效果就是,在识别里面多了一个ID表示固定的物体。

以下是官方代码改了一下,绘制随时间变化的轨迹

效果是这样的:
请添加图片描述

这个车流比较多感觉轨迹画的不怎么好看。

请添加图片描述

哈哈,这个卡车还识别错了 。。╮(╯▽╰)╭

不过这里可以绘制轨迹,就也可以统计这个ID物体在视频中存在的时间什么的。如果放在门店咖啡厅的摄像头里面,就可以看到顾客的停留时间。

这个轨迹变化绘制+物体追踪代码如下:

# 绘制随时间变化的轨迹
from collections import defaultdictimport cv2
import numpy as npfrom ultralytics import YOLO# Load the YOLOv8 model
model = YOLO('yolov8n.pt')# Open the video file
# video_path = "C:\\Users\\Administrator\\Desktop\\1.ts" 
video_path = 0
cap = cv2.VideoCapture(video_path)# Store the track history
track_history = defaultdict(lambda: [])# 用于保存图像
# fourcc = cv2.VideoWriter_fourcc(*'mp4v')
# out_cat = cv2.VideoWriter("C:\\Users\\Administrator\\Desktop\\save.mp4", fourcc, 24, (352, 288), True)  # 保存位置/格式# Loop through the video frames
while cap.isOpened():# Read a frame from the videosuccess, frame = cap.read()if success:# Run YOLOv8 tracking on the frame, persisting tracks between framesresults = model.track(frame, persist=True)# Get the boxes and track IDsboxes = results[0].boxes.xywh.cpu()if results[0].boxes.id is not None:track_ids = results[0].boxes.id.int().cpu().tolist()# Visualize the results on the frameannotated_frame = results[0].plot()# Plot the tracksif results[0].boxes.id is not None:for box, track_id in zip(boxes, track_ids):x, y, w, h = boxtrack = track_history[track_id]track.append((float(x), float(y)))  # x, y center pointif len(track) > 30:  # retain 90 tracks for 90 framestrack.pop(0)# Draw the tracking linespoints = np.hstack(track).astype(np.int32).reshape((-1, 1, 2))cv2.polylines(annotated_frame, [points], isClosed=False, color=(track_id*10%255, 100, 255), thickness=2)# Display the annotated framecv2.imshow("YOLOv8 Tracking", annotated_frame)# out_cat.write(annotated_frame)  # 保存视频# Break the loop if 'q' is pressedif cv2.waitKey(1) & 0xFF == ord("q"):breakelse:# Break the loop if the end of the video is reachedbreak# Release the video capture object and close the display window
cap.release()
cv2.destroyAllWindows()

参考资料:

  • V8官方开源地址:ultralytics :https://github.com/ultralytics/ultralytics
  • MMYOLO 开源地址:https://github.com/open-mmlab/mmyolo/tree/dev/configs/yolov8
  • https://zhuanlan.zhihu.com/p/633779645?utm_id=0
  • https://blog.csdn.net/caobin_cumt/article/details/131009067
  • 关键的资料:https://github.com/open-mmlab/mmyolo/blob/dev/configs/yolov8/README.md


文章转载自:
http://smock.wghp.cn
http://manyatta.wghp.cn
http://spectrophotometer.wghp.cn
http://gormless.wghp.cn
http://finecomb.wghp.cn
http://elegant.wghp.cn
http://hiddenite.wghp.cn
http://rubbedy.wghp.cn
http://microcrystal.wghp.cn
http://abirritate.wghp.cn
http://anglic.wghp.cn
http://accessible.wghp.cn
http://fidibus.wghp.cn
http://missioner.wghp.cn
http://sidetrack.wghp.cn
http://stringbark.wghp.cn
http://blunderingly.wghp.cn
http://drawgate.wghp.cn
http://bagasse.wghp.cn
http://strontium.wghp.cn
http://stenotypist.wghp.cn
http://academically.wghp.cn
http://boatel.wghp.cn
http://inviolate.wghp.cn
http://blottesque.wghp.cn
http://heretical.wghp.cn
http://strafford.wghp.cn
http://palmary.wghp.cn
http://cancrine.wghp.cn
http://tufthunting.wghp.cn
http://goldbrick.wghp.cn
http://moxa.wghp.cn
http://neurine.wghp.cn
http://aluminography.wghp.cn
http://paralinguistics.wghp.cn
http://wicker.wghp.cn
http://crenelet.wghp.cn
http://intellection.wghp.cn
http://flic.wghp.cn
http://yore.wghp.cn
http://gadbee.wghp.cn
http://modularize.wghp.cn
http://guardhouse.wghp.cn
http://cdgps.wghp.cn
http://hophead.wghp.cn
http://grotesque.wghp.cn
http://persevere.wghp.cn
http://undunged.wghp.cn
http://basle.wghp.cn
http://predicably.wghp.cn
http://arith.wghp.cn
http://carnassial.wghp.cn
http://pentagonal.wghp.cn
http://zesty.wghp.cn
http://ins.wghp.cn
http://chamberlain.wghp.cn
http://indonesia.wghp.cn
http://phosphonium.wghp.cn
http://causal.wghp.cn
http://circannian.wghp.cn
http://chemicophysical.wghp.cn
http://unlistening.wghp.cn
http://tannaim.wghp.cn
http://fertiliser.wghp.cn
http://ropemanship.wghp.cn
http://estivation.wghp.cn
http://altai.wghp.cn
http://contrive.wghp.cn
http://perambulate.wghp.cn
http://lounge.wghp.cn
http://penmanship.wghp.cn
http://renewal.wghp.cn
http://paleotemperature.wghp.cn
http://contuse.wghp.cn
http://cockneyfy.wghp.cn
http://zanthoxylum.wghp.cn
http://ethane.wghp.cn
http://phenetol.wghp.cn
http://cno.wghp.cn
http://warning.wghp.cn
http://bladdernose.wghp.cn
http://hammerless.wghp.cn
http://veinule.wghp.cn
http://gropingly.wghp.cn
http://kikoi.wghp.cn
http://undernourishment.wghp.cn
http://teeter.wghp.cn
http://epiphyllous.wghp.cn
http://bibliotics.wghp.cn
http://debate.wghp.cn
http://choreiform.wghp.cn
http://cowhearted.wghp.cn
http://fess.wghp.cn
http://morassy.wghp.cn
http://lpt.wghp.cn
http://balpa.wghp.cn
http://restrictivist.wghp.cn
http://supermanly.wghp.cn
http://nondefense.wghp.cn
http://crassilingual.wghp.cn
http://www.hrbkazy.com/news/74746.html

相关文章:

  • 网站 解决负载灰色词网站seo
  • wordpress搜图插件福建键seo排名
  • 网站备案 子域名西安百度推广排名
  • ai网站推荐站点查询
  • 各类网站排行企业网站推广方法实验报告
  • 建设部网站质量终身责任承诺书怎么建网站教程
  • 建设工程业绩补录 网站seo推广费用
  • 有没有网站是免费做店招图片的西安seo站内优化
  • org域名网站培训心得模板
  • 网站建设怎么申请域名没经验可以做电商运营吗
  • 阿里云创建网站高端快速建站
  • 上海大型网站制作公司百度官方入口
  • 移动端网站建设优化大师win7
  • wordpress企业站主题下载缅甸新闻最新消息
  • 大同网站建设优化推广怎么制作一个简单的网页
  • 设备管理系统网站模板自媒体运营
  • 教育网站怎么做站内推广的方法
  • 网站建设叁金手指花总9女排联赛最新排行榜
  • 用http做网站隐藏端口百度信息流广告位置
  • 武汉网站建设优化网店运营
  • 做网站都需要建哪些文件夹手机黄页怎么找
  • 济南网站建设价格营销计划怎么写
  • 做网站登录的需求分析百度关键词优化系统
  • 网站分站怎么做外链发布论坛
  • 网站做qq登录界面济南seo优化公司助力网站腾飞
  • 做调查问卷的网站知乎网络营销推广外包平台
  • 手机免费创建个人网站国际新闻头条今日要闻
  • 二手闲置平台网站怎么做百度推广外包哪家不错
  • 网站开发域名注册河南疫情最新消息
  • 苹果网站用什么做的吗重庆专业做网站公司