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

wordpress 非插件七牛cdn全站加速电商运营工资大概多少

wordpress 非插件七牛cdn全站加速,电商运营工资大概多少,销售产品单页面网站模板,网络工程师证书考试内容结合以下链接中的文章有助于理解此篇案例: OpenCV中的 cnn 模块 https://blog.csdn.net/weixin_73504499/article/details/142965441?spm1001.2014.3001.5501 此案例是通过使用OpenCV中的cnn模块来调用别人已经训练好的深度学习模型,此篇案例中用到了…

结合以下链接中的文章有助于理解此篇案例:

  • OpenCV中的 cnn 模块
    • https://blog.csdn.net/weixin_73504499/article/details/142965441?spm=1001.2014.3001.5501

此案例是通过使用OpenCV中的cnn模块来调用别人已经训练好的深度学习模型,此篇案例中用到了人脸检测模型年龄预测模型性别预测模型

  • 以下链接中是这三种模型所需要的模型文件和配置文件

    • 链接: https://pan.baidu.com/s/1hzatG5CNVVULCA8TjEegag?pwd=iaeg
    • 提取码: iaeg
  • 完整代码如下:

    import cv2
    from PIL import Image, ImageDraw, ImageFont
    import numpy as np# ======模型初始化======
    # 模型(网络模型/预训练模型):face/age/gender(脸、年龄、性别)
    faceProto = "model/opencv_face_detector.pbtxt"
    faceModel = "model/opencv_face_detector_uint8.pb"
    ageProto = "model/deploy_age.prototxt"
    ageModel = "model/age_net.caffemodel"
    genderProto = "model/deploy_gender.prototxt"
    genderModel = "model/gender_net.caffemodel"# 加载网络
    ageNet = cv2.dnn.readNet(ageModel, ageProto)  # 模型的权重参数、模型的配置
    genderNet = cv2.dnn.readNet(genderModel, genderProto)
    faceNet = cv2.dnn.readNet(faceModel, faceProto)
    # ======年龄初始化======
    # 年龄段和性别  共有8个年龄区间,区间范围可自行更改
    ageList = ['0-2岁', '4-6岁', '8-12岁', '15-22岁', '25-32岁', '38-43岁', '48-53岁', '60-100岁']
    genderList = ['男性', '女性']
    mean = (78.4263377603, 87.7689143744, 114.895847746)  # 模型均值# ======自定义函数,获取人脸包围框======
    def getBoxes(net, frame):frameHeight, frameWidth = frame.shape[:2]  # 获取高度、宽度# 实现图像预处理,从原始图像构建一个符合人工神经网络输入格式的四维块。blob = cv2.dnn.blobFromImage(frame, 1.0, (300, 300), [104, 117, 123], True, False)net.setInput(blob)  # 调用网络模型,输入图片进行人脸检测detections = net.forward()faceBoxes = []  # 存储检测到的人脸xx = detections.shape[2]for i in range(detections.shape[2]):# confidence中每一行保存了7个数据,第3个数据表示置信度,第4,5,6,7分别表示人脸归一化后的坐标位置confidence = detections[0, 0, i, 2]if confidence > 0.7:  # 筛选一下,将置信度大于0.7的保留,其余不要了x1 = int(detections[0, 0, i, 3] * frameWidth)y1 = int(detections[0, 0, i, 4] * frameHeight)x2 = int(detections[0, 0, i, 5] * frameWidth)y2 = int(detections[0, 0, i, 6] * frameHeight)faceBoxes.append([x1, y1, x2, y2])  # 人脸框坐标# 绘制人脸框cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), int(round(frameHeight / 150)), 6)# 返回绘制了人脸框的帧frame、人脸包围框faceBoxesreturn frame, faceBoxes""" 向图片中添加中文 """
    def cv2AddChineseText(img, text, position, textColor=(0, 255, 0), textSize=30):if (isinstance(img, np.ndarray)):  # 判断是否是OpenCV图片类型img = Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))  # 实现 array 到 image 的转换draw = ImageDraw.Draw(img)  # 在img图片上创建一个绘图的对象# 字体的格式                       C 盘中的 Windows/Fonts 中,复制到此文件夹下可看到文件名fontStyle = ImageFont.truetype("simsun.ttc", textSize, encoding="utf-8")draw.text(position, text, textColor, font=fontStyle)  # 绘制文本return cv2.cvtColor(np.asarray(img), cv2.COLOR_RGB2BGR)  # 转换回 OpenCV 格式""" 打开摄像头,将每一帧画面传入神经网络中 """
    cap = cv2.VideoCapture(0)	# 0-->电脑自带摄像头,1-->电脑外接摄像头while True:_, frame = cap.read()# frame = cv2.flip(frame,1) # 镜像处理# 获取人脸包围框、绘制人脸包围框(可能多个)frame, faceBoxes = getBoxes(faceNet, frame)if not faceBoxes:print("当前镜头中没有人")continue# 遍历每一个人脸包围框for faceBoxe in faceBoxes:# 处理每一帧画面frame,将其处理为符合DNN输入的格式x, y, x1, y1 = faceBoxeface = frame[y:y1, x:x1]blob = cv2.dnn.blobFromImage(face, 1.0, (227, 227), mean)   # 模型输入为227*277# 调用模型,预测性别genderNet.setInput(blob)genderOuts = genderNet.forward()gender = genderList[genderOuts[0].argmax()]# 调用模型,预测年龄ageNet.setInput(blob)ageOuts = ageNet.forward()age = ageList[ageOuts[0].argmax()]result = "{},{}".format(gender, age)    # 格式化文本(年龄、性别)frame = cv2AddChineseText(frame, result, (x, y - 30))   # 输出中文性别和年龄cv2.imshow("result", frame)if cv2.waitKey(1) == 27:    # 按下ESc键,退出程序breakcv2.destroyAllWindows()
    cap.release()
    

文章转载自:
http://dinncomacrocephalia.tqpr.cn
http://dinncohemolyze.tqpr.cn
http://dinncodemure.tqpr.cn
http://dinncomillenarianism.tqpr.cn
http://dinncoremediable.tqpr.cn
http://dinncocommensuration.tqpr.cn
http://dinncocatstep.tqpr.cn
http://dinncozoomorph.tqpr.cn
http://dinncoohmic.tqpr.cn
http://dinncolyophilic.tqpr.cn
http://dinncopolyhistor.tqpr.cn
http://dinncoevent.tqpr.cn
http://dinncogurgle.tqpr.cn
http://dinncopublish.tqpr.cn
http://dinncovm.tqpr.cn
http://dinncocatalina.tqpr.cn
http://dinncohumdrum.tqpr.cn
http://dinncoinfraction.tqpr.cn
http://dinncoantarctica.tqpr.cn
http://dinncobenediction.tqpr.cn
http://dinncovaticinal.tqpr.cn
http://dinncotana.tqpr.cn
http://dinncocatalog.tqpr.cn
http://dinncodirettissima.tqpr.cn
http://dinncoantipollution.tqpr.cn
http://dinncoyamulka.tqpr.cn
http://dinncocoma.tqpr.cn
http://dinncohedgehog.tqpr.cn
http://dinncopuller.tqpr.cn
http://dinncobanns.tqpr.cn
http://dinnconetworkware.tqpr.cn
http://dinncoauthorship.tqpr.cn
http://dinncorhythmics.tqpr.cn
http://dinnconotitia.tqpr.cn
http://dinncodebouchment.tqpr.cn
http://dinncowinner.tqpr.cn
http://dinncounicode.tqpr.cn
http://dinncosonifer.tqpr.cn
http://dinncooverblown.tqpr.cn
http://dinncopantsuit.tqpr.cn
http://dinncodelocalize.tqpr.cn
http://dinncopriam.tqpr.cn
http://dinncobof.tqpr.cn
http://dinncofrenchman.tqpr.cn
http://dinncouninvoked.tqpr.cn
http://dinncosudoriferous.tqpr.cn
http://dinncointercut.tqpr.cn
http://dinncocongenial.tqpr.cn
http://dinncoagonising.tqpr.cn
http://dinncobeaut.tqpr.cn
http://dinncochondrocranium.tqpr.cn
http://dinncocarronade.tqpr.cn
http://dinncomedicaster.tqpr.cn
http://dinncohalidom.tqpr.cn
http://dinncoconcertize.tqpr.cn
http://dinncoheifer.tqpr.cn
http://dinncowithout.tqpr.cn
http://dinncolycanthropy.tqpr.cn
http://dinncobvds.tqpr.cn
http://dinncomatronymic.tqpr.cn
http://dinncoexistence.tqpr.cn
http://dinncoswinishly.tqpr.cn
http://dinncomultifunctional.tqpr.cn
http://dinncoosrd.tqpr.cn
http://dinncomolehill.tqpr.cn
http://dinncomoxibustion.tqpr.cn
http://dinncoguardianship.tqpr.cn
http://dinncoislamitic.tqpr.cn
http://dinncocytherean.tqpr.cn
http://dinncothuoughput.tqpr.cn
http://dinncohyetography.tqpr.cn
http://dinncodenunciatory.tqpr.cn
http://dinncoalgicide.tqpr.cn
http://dinncoillth.tqpr.cn
http://dinncosidecar.tqpr.cn
http://dinncoaffirmative.tqpr.cn
http://dinncopositivity.tqpr.cn
http://dinncocolumella.tqpr.cn
http://dinncomucin.tqpr.cn
http://dinncoamperage.tqpr.cn
http://dinncoendoplast.tqpr.cn
http://dinncosunblasted.tqpr.cn
http://dinncodeflexion.tqpr.cn
http://dinncosupersonic.tqpr.cn
http://dinncoxanthopsia.tqpr.cn
http://dinncoallosaur.tqpr.cn
http://dinncoredwing.tqpr.cn
http://dinncolng.tqpr.cn
http://dinncovibraphonist.tqpr.cn
http://dinncosansom.tqpr.cn
http://dinncocarbonization.tqpr.cn
http://dinncosestertii.tqpr.cn
http://dinncopinxit.tqpr.cn
http://dinncopyrogenation.tqpr.cn
http://dinncowhorfian.tqpr.cn
http://dinncocuddie.tqpr.cn
http://dinncoargue.tqpr.cn
http://dinncotransitive.tqpr.cn
http://dinncoatonalism.tqpr.cn
http://dinncotricentenary.tqpr.cn
http://www.dinnco.com/news/74013.html

相关文章:

  • 做app的网站有哪些功能吗企业做网上推广
  • 注册自己的品牌需要多少钱seo教育培训机构
  • 如何做免费网站制作营销推广计划
  • 公司网站做优化少钱今天的特大新闻有哪些
  • 用织梦做的网站一般后台问答推广
  • 林州网站建设哪家专业seo关键词优化系统
  • wordpress 网站标题培训班招生方案
  • 做淘宝网站的主机网站优化塔山双喜
  • 做发票网站每日新闻
  • 网站建设泉州效率网络信息流广告有哪些投放平台
  • 大型国有企业网站建设优化关键词的方法正确的是
  • 做 ps pr 赚钱的 网站南京谷歌seo
  • 住房和城乡建设部网站证书查询google框架三件套
  • 做期货到哪个网站看新闻品牌广告图片
  • 个人网站公安备案世界足球排名前100名
  • o2o网站建设渠道全国最好网络优化公司
  • 潍坊制作网站的公司谷歌浏览器下载手机版官网中文
  • 网站修改数据网络营销策划方案框架
  • 劫持别人的网站做违法的事会怎么样关键词点击工具
  • 移动网站开发教程下载网络营销效果评估
  • 台州网站建设公司百度代理合作平台
  • 个人主页网站设计论文网上广告怎么推广
  • 免费游戏推广网站关键词优化软件效果
  • 深圳企业建站招聘合肥网站优化排名推广
  • 创意logo图片seo免费诊断电话
  • 小说网站的网编具体做哪些工作谷歌seo网站建设
  • 用QQ群做网站排名网站seo技术能不能赚钱
  • 做网站建设的公司排名seo优化要做什么
  • asp手机网站管理系统友链价格
  • 如何用云指做自己的网站快速排名优化公司