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

济南做网站找大标中山网站建设文化方案

济南做网站找大标,中山网站建设文化方案,wordpress 主页图片不显示,淘宝客wordpress模板程序示例精选 PythonDjangoHtml人脸识别考勤打卡系统 如需安装运行环境或远程调试#xff0c;见文章底部个人QQ名片#xff0c;由专业技术人员远程协助#xff01; 前言 这篇博客针对《PythonDjangoHtml网页版人脸识别考勤打卡系统》编写代码#xff0c;代码整洁#xf… 程序示例精选 PythonDjangoHtml人脸识别考勤打卡系统 如需安装运行环境或远程调试见文章底部个人QQ名片由专业技术人员远程协助 前言 这篇博客针对《PythonDjangoHtml网页版人脸识别考勤打卡系统》编写代码代码整洁规则易读。 学习与应用推荐首选。 运行结果 文章目录 一、所需工具软件 二、使用步骤        1. 主要代码        2. 运行结果 三、在线协助 一、所需工具软件 1. Python        2. Pycharm 二、使用步骤 代码如下示例 def detect(save_imgFalse):source, weights, view_img, save_txt, imgsz opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_sizewebcam source.isnumeric() or source.endswith(.txt) or source.lower().startswith((rtsp://, rtmp://, http://))# Directoriessave_dir Path(increment_path(Path(opt.project) / opt.name, exist_okopt.exist_ok)) # increment run(save_dir / labels if save_txt else save_dir).mkdir(parentsTrue, exist_okTrue) # make dir# Initializeset_logging()device select_device(opt.device)half device.type ! cpu # half precision only supported on CUDA# Load modelmodel attempt_load(weights, map_locationdevice) # load FP32 modelstride int(model.stride.max()) # model strideimgsz check_img_size(imgsz, sstride) # check img_sizeif half:model.half() # to FP16# Second-stage classifierclassify Falseif classify:modelc load_classifier(nameresnet101, n2) # initializemodelc.load_state_dict(torch.load(weights/resnet101.pt, map_locationdevice)[model]).to(device).eval()# Set Dataloadervid_path, vid_writer None, Noneif webcam:view_img check_imshow()cudnn.benchmark True # set True to speed up constant image size inferencedataset LoadStreams(source, img_sizeimgsz, stridestride)else:save_img Truedataset LoadImages(source, img_sizeimgsz, stridestride)# Get names and colorsnames model.module.names if hasattr(model, module) else model.namescolors [[random.randint(0, 255) for _ in range(3)] for _ in names]# Run inferenceif device.type ! cpu:model(torch.zeros(1, 3, imgsz, imgsz).to(device).type_as(next(model.parameters()))) # run oncet0 time.time()for path, img, im0s, vid_cap in dataset:img torch.from_numpy(img).to(device)img img.half() if half else img.float() # uint8 to fp16/32img / 255.0 # 0 - 255 to 0.0 - 1.0if img.ndimension() 3:img img.unsqueeze(0)# Inferencet1 time_synchronized()pred model(img, augmentopt.augment)[0]# Apply NMSpred non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classesopt.classes, agnosticopt.agnostic_nms)t2 time_synchronized()# Apply Classifierif classify:pred apply_classifier(pred, modelc, img, im0s)# Process detectionsfor i, det in enumerate(pred): # detections per imageif webcam: # batch_size 1p, s, im0, frame path[i], %g: % i, im0s[i].copy(), dataset.countelse:p, s, im0, frame path, , im0s, getattr(dataset, frame, 0)p Path(p) # to Pathsave_path str(save_dir / p.name) # img.jpgtxt_path str(save_dir / labels / p.stem) ( if dataset.mode image else f_{frame}) # img.txts %gx%g % img.shape[2:] # print stringgn torch.tensor(im0.shape)[[1, 0, 1, 0]] # normalization gain whwhif len(det):# Rescale boxes from img_size to im0 sizedet[:, :4] scale_coords(img.shape[2:], det[:, :4], im0.shape).round()# Write resultsfor *xyxy, conf, cls in reversed(det):if save_txt: # Write to filexywh (xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() # normalized xywhline (cls, *xywh, conf) if opt.save_conf else (cls, *xywh) # label formatwith open(txt_path .txt, a) as f:f.write((%g * len(line)).rstrip() % line \n)if save_img or view_img: # Add bbox to imagelabel f{names[int(cls)]} {conf:.2f}plot_one_box(xyxy, im0, labellabel, colorcolors[int(cls)], line_thickness3)# Print time (inference NMS)print(f{s}Done. ({t2 - t1:.3f}s))# Save results (image with detections)if save_img:if dataset.mode image:cv2.imwrite(save_path, im0)else: # videoif vid_path ! save_path: # new videovid_path save_pathif isinstance(vid_writer, cv2.VideoWriter):vid_writer.release() # release previous video writerfourcc mp4v # output video codecfps vid_cap.get(cv2.CAP_PROP_FPS)w int(vid_cap.get(cv2.CAP_PROP_FRAME_WIDTH))h int(vid_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))vid_writer cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*fourcc), fps, (w, h))vid_writer.write(im0)if save_txt or save_img:s f\n{len(list(save_dir.glob(labels/*.txt)))} labels saved to {save_dir / labels} if save_txt else print(fResults saved to {save_dir}{s})print(fDone. ({time.time() - t0:.3f}s))print(opt)check_requirements()with torch.no_grad():if opt.update: # update all models (to fix SourceChangeWarning)for opt.weights in [yolov5s.pt, yolov5m.pt, yolov5l.pt, yolov5x.pt]:detect()strip_optimizer(opt.weights)else:detect() 运行结果 三、在线协助 如需安装运行环境或远程调试见文章底部个人 QQ 名片由专业技术人员远程协助 1远程安装运行环境代码调试 2Visual Studio, Qt, C, Python编程语言入门指导 3界面美化 4软件制作 5云服务器申请 6网站制作 当前文章连接https://blog.csdn.net/alicema1111/article/details/132666851 个人博客主页https://blog.csdn.net/alicema1111?typeblog 博主所有文章点这里https://blog.csdn.net/alicema1111?typeblog 博主推荐 Python人脸识别考勤打卡系统 https://blog.csdn.net/alicema1111/article/details/133434445 Python果树水果识别https://blog.csdn.net/alicema1111/article/details/130862842 PythonYolov8Deepsort入口人流量统计https://blog.csdn.net/alicema1111/article/details/130454430 PythonQt人脸识别门禁管理系统https://blog.csdn.net/alicema1111/article/details/130353433 PythonQt指纹录入识别考勤系统https://blog.csdn.net/alicema1111/article/details/129338432 Python Yolov5火焰烟雾识别源码分享https://blog.csdn.net/alicema1111/article/details/128420453 PythonYolov8路面桥梁墙体裂缝识别https://blog.csdn.net/alicema1111/article/details/133434445 PythonYolov5道路障碍物识别https://blog.csdn.net/alicema1111/article/details/129589741 PythonYolov5人物目标行为 人体特征识别https://blog.csdn.net/alicema1111/article/details/129272048
http://www.dnsts.com.cn/news/253356.html

相关文章:

  • 做网站需要会什么条件如何安装wordpress模板
  • 用于做分析图 的地图网站茶山网站仿做
  • 制作免费网站的平台深圳市建设主管部门门户网站
  • 在网上做企业网站怎么做天元建设集团有限公司工程
  • 微网站功能介绍长春seo按天计费
  • 重庆网站建设的价格济宁百度推广开户
  • 长春企业网站设计上海松江区做网站的公司
  • 网站页面html静态化是什么意思外贸网站做流量
  • 网站建设乐云seo安庆网站优化
  • 淘宝网站建设好评wordpress自适应手机插件
  • 成都网站设计说明书久久结婚网
  • 山东省南水北调建设管理局网站科普网站建设的支持力度
  • 成立一个网站软件需要多少钱搜一搜搜索
  • wordpress代理管理多站点win10 电脑做网站服务器
  • 内蒙古兴安盟建设局网站网站建设实例分析
  • h5网站快速搭建照片管理网站模板下载
  • 58同城做网站地区门户网站 wap app
  • 网站建设公司人员组成做微信公众号网站
  • 张掖网站设计公司初二做网站的首页模板
  • 物流网站的建设实训崇川网站建设
  • 奉化市建设局网站一人开公司做网站创业
  • 网站首页设计分析郑州金水区做网站公司
  • 计算机毕设做网站百度搜索资源平台提交
  • 做网络歌手的网站博物馆文化网站建设
  • 怎么建网站教程视频appapp开发软件开发公司
  • wordpress付费会员才能看到内容汕头优化网站
  • 网站打不开 别的电脑能打开线上营销策略方案
  • 石家庄网站建设蓝龙公司网站建设描述
  • 请问做卖东西网站怎么做网站有哪些费用
  • 网站建设及管理工作岗位要求福田区网站建设