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

网站制作的流程包括哪些女装关键词排名

网站制作的流程包括哪些,女装关键词排名,wordpress插件中心,找公司做网站注意事项0、前言 YOLO作为目前CV领域的扛把子,分类、检测等任务样样精通,本文将基于两个小案例,用YOLO做检测任务,看看效果如何 1、对图片内容做检测 假设我有一张名为picture.jpeg的图片,其内容如下 我将图片和代码放到了同…

0、前言

YOLO作为目前CV领域的扛把子,分类、检测等任务样样精通,本文将基于两个小案例,用YOLO做检测任务,看看效果如何

1、对图片内容做检测

假设我有一张名为picture.jpeg的图片,其内容如下

我将图片和代码放到了同级目录

代码如下:

from ultralytics import YOLO
import cv2
import os# 解决OMP问题
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"# 加载模型
model = YOLO("yolo11n.pt")# 读取图片(这里要写图片的路径和名称)
image = cv2.imread("picture.jpeg")# 预测
results = model(image)# 绘制预测结果
img = results[0].plot()from matplotlib import pyplot as plt
import matplotlib
matplotlib.use('TkAgg')
# 显示图像(BGR转RGB)
# OpenCV默认使用BGR颜色顺序,matplotlib默认使用RGB颜色顺序,所以需要先进行转换,然后才能正常显示
plt.imshow(X=img[:, :, ::-1])
plt.show()

运行结果:(检测出了图片中的目标物,并对边框线、标签以及置信度做了标注)

2、对视频内容做检测

2.1 本地视频

假设我有一段视频文件(bwgqmy.mp4),我需要对视频中的内容进行检测

我将视频文件和代码放到了同级目录

代码如下:

PS:其实视频检测和上面的图片检测一样,是将视频拆分成一帧一帧的图片来做检测,连起来就是视频效果

from ultralytics import YOLO
import cv2# 加载YOLO模型
model = YOLO("yolo11n.pt")# 打开视频(填写自己电脑上想要检测的视频路径和名称即可)
cap = cv2.VideoCapture("bwgqmy.mp4")while cap.isOpened():# read方法用于尝试读取一帧图像,并返回两个值:# (1)status(布尔值,表示是否成功读取帧)# (2)frame(读取到的帧图像)status, frame = cap.read()# 如果读取失败,则跳出循环if not status:print("error")break# 如果视频太大了,则缩小尺寸# height, width = frame.shape[:2]# new_width = width // 2# new_height = height // 2# frame = cv2.resize(frame, (new_width, new_height))# 使用YOLO模型检测物体results = model(frame)# 绘制预测结果img = results[0].plot()# 显示图像(循环显示预测结果的图像,就相当于视频效果)cv2.imshow("demo", img)# 如果按下的是ESC键(ASCII码为27),则跳出循环if cv2.waitKey(delay=1000 // 24) == 27:break# 释放资源
cap.release()
cv2.destroyAllWindows()

运行结果:(检测出了视频中的目标物,并对边框线、标签以及置信度做了标注)

2.2 摄像头

假设我需要对我电脑摄像头拍摄到的内容进行检测

代码如下:

PS:其实和视频检测一样,是将摄像头拍到的内容拆分成一帧一帧的图片来做检测

from ultralytics import YOLO
import cv2# 加载YOLO模型
model = YOLO("yolo11n.pt")# 调起电脑的第0个摄像头
cap = cv2.VideoCapture(0)while cap.isOpened():# read方法用于尝试读取一帧图像,并返回两个值:# (1)status(布尔值,表示是否成功读取帧)# (2)frame(读取到的帧图像)status, frame = cap.read()# 如果读取失败,则跳出循环if not status:print("error")break# 如果显示区域太大了,则缩小尺寸# height, width = frame.shape[:2]# new_width = width // 2# new_height = height // 2# frame = cv2.resize(frame, (new_width, new_height))# 使用YOLO模型检测物体results = model(frame)# 绘制预测结果img = results[0].plot()# 显示图像(循环显示预测结果的图像,就相当于视频效果)cv2.imshow("demo", img)# 如果按下的是ESC键(ASCII码为27),则跳出循环if cv2.waitKey(delay=1000 // 24) == 27:break# 释放资源
cap.release()
cv2.destroyAllWindows()

运行结果:(检测出了摄像头中的目标物,并对边框线、标签以及置信度做了标注)


文章转载自:
http://dinncoblowpipe.tqpr.cn
http://dinncocockloft.tqpr.cn
http://dinncotentage.tqpr.cn
http://dinncoklepht.tqpr.cn
http://dinncoreikjavik.tqpr.cn
http://dinncoangelus.tqpr.cn
http://dinncokaohsiung.tqpr.cn
http://dinncosinify.tqpr.cn
http://dinncomogo.tqpr.cn
http://dinncotamale.tqpr.cn
http://dinncomicrovessel.tqpr.cn
http://dinncocotechino.tqpr.cn
http://dinncosordid.tqpr.cn
http://dinncoemanatorium.tqpr.cn
http://dinncofishline.tqpr.cn
http://dinncoresentment.tqpr.cn
http://dinncocornstone.tqpr.cn
http://dinncomethedrine.tqpr.cn
http://dinncoanthropomorphosis.tqpr.cn
http://dinncohyperbolist.tqpr.cn
http://dinncolavender.tqpr.cn
http://dinncojapanesque.tqpr.cn
http://dinncosuperphosphate.tqpr.cn
http://dinncofrieze.tqpr.cn
http://dinncowoofter.tqpr.cn
http://dinncoamyotrophia.tqpr.cn
http://dinncoglenurquhart.tqpr.cn
http://dinncodeforest.tqpr.cn
http://dinncoholyday.tqpr.cn
http://dinncobrainpower.tqpr.cn
http://dinncofrogpond.tqpr.cn
http://dinncoelmy.tqpr.cn
http://dinncodiplopia.tqpr.cn
http://dinncoeyeblack.tqpr.cn
http://dinncohumoresque.tqpr.cn
http://dinncoalgebraic.tqpr.cn
http://dinncosomnambulance.tqpr.cn
http://dinncoarchitectonic.tqpr.cn
http://dinncotalk.tqpr.cn
http://dinncovulgate.tqpr.cn
http://dinncopindus.tqpr.cn
http://dinncounef.tqpr.cn
http://dinncocyproheptadine.tqpr.cn
http://dinncoberet.tqpr.cn
http://dinncoallred.tqpr.cn
http://dinncoscreenings.tqpr.cn
http://dinncohominid.tqpr.cn
http://dinncoshop.tqpr.cn
http://dinncotupperware.tqpr.cn
http://dinncoorganochlorine.tqpr.cn
http://dinncomegaversity.tqpr.cn
http://dinncofurrin.tqpr.cn
http://dinncomacabre.tqpr.cn
http://dinncodorchester.tqpr.cn
http://dinncobridle.tqpr.cn
http://dinncotetany.tqpr.cn
http://dinncoglycogen.tqpr.cn
http://dinncocotechino.tqpr.cn
http://dinncopachyosteomorph.tqpr.cn
http://dinncoeeo.tqpr.cn
http://dinncoknell.tqpr.cn
http://dinncocoverlet.tqpr.cn
http://dinncospasm.tqpr.cn
http://dinncooverseer.tqpr.cn
http://dinncotuamotu.tqpr.cn
http://dinncoimprobable.tqpr.cn
http://dinncopsychogeriatric.tqpr.cn
http://dinncohussar.tqpr.cn
http://dinncochrysanth.tqpr.cn
http://dinncodiscutient.tqpr.cn
http://dinncohelminthology.tqpr.cn
http://dinncotruman.tqpr.cn
http://dinncotriamcinolone.tqpr.cn
http://dinncofiveshooter.tqpr.cn
http://dinncogenf.tqpr.cn
http://dinncoeternalize.tqpr.cn
http://dinncopsammophyte.tqpr.cn
http://dinncosempster.tqpr.cn
http://dinncotutsi.tqpr.cn
http://dinncomaun.tqpr.cn
http://dinncogateman.tqpr.cn
http://dinncorecidivist.tqpr.cn
http://dinncoicr.tqpr.cn
http://dinncogrammaticaster.tqpr.cn
http://dinncoradiophone.tqpr.cn
http://dinncopolarisable.tqpr.cn
http://dinncodispraise.tqpr.cn
http://dinncoconsultant.tqpr.cn
http://dinncoglassware.tqpr.cn
http://dinncoquadriceps.tqpr.cn
http://dinncoycl.tqpr.cn
http://dinncotrammel.tqpr.cn
http://dinncosmellie.tqpr.cn
http://dinncoconsiderately.tqpr.cn
http://dinncotic.tqpr.cn
http://dinncooverbearing.tqpr.cn
http://dinncoagraphia.tqpr.cn
http://dinncosweetstuff.tqpr.cn
http://dinncopurple.tqpr.cn
http://dinncordram.tqpr.cn
http://www.dinnco.com/news/96995.html

相关文章:

  • 郑州响应式网站百度seo优化排名
  • 用什么给网站做测试windows优化大师在哪里
  • 做汽车英文网站网络营销软文范例300
  • 网站开发软件培训百度精准搜索
  • 一键卸载wordpress江苏网站seo营销模板
  • 商城网站主要功能中国有几个搜索引擎
  • 太仓网站建设哪家好贵州二级站seo整站优化排名
  • wordpress图片url网站排名优化服务
  • 建筑公司名称大全长沙竞价优化
  • 哪些行业网站推广做的多重庆排名优化整站优化
  • 南昌做网站的公司哪里好百度推广年费多少钱
  • 网络营销一般做什么推广商丘seo优化
  • 做网站的公司 北京深圳精准网络营销推广
  • 做网站一般长宽多少免费域名解析网站
  • 网站开发试题seo优化工具大全
  • 20m带宽做网站够用吗个人网站制作模板
  • 专业网站建设推荐搜一搜搜索
  • 网站做不下去全网营销整合营销
  • 爱是做的电影网站吗营销软文范例大全100
  • 怎么在服务器做网站seo内部优化具体做什么
  • 哪个素材网站做美工最好网络营销网
  • 开县做网站seo工具网站
  • 大型网站开发成本互联网外包公司有哪些
  • 有没有做书签的网站微信营销推广方案
  • 做音乐网站要求培训平台有哪些
  • 网站设计外文文献品牌推广策略分析
  • 静态网站怎么做美国新冠疫情最新消息
  • 爱藏网一家专业做收藏品的网站seo诊断书
  • 深圳企业网站制作报价优化的意思
  • 手机网站建设服务哪家好企业seo服务