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

自己做个网站用什么软件好建设银行网站点不进去了怎么办

自己做个网站用什么软件好,建设银行网站点不进去了怎么办,云浮市住房和城乡建设局网站,网站建设谈单思路引言 Label Studio ML 后端是一个 SDK#xff0c;用于包装您的机器学习代码并将其转换为 Web 服务器。Web 服务器可以连接到正在运行的 Label Studio 实例#xff0c;以自动执行标记任务。我们提供了一个示例模型库#xff0c;您可以在自己的工作流程中使用这些模型#x…引言 Label Studio ML 后端是一个 SDK用于包装您的机器学习代码并将其转换为 Web 服务器。Web 服务器可以连接到正在运行的 Label Studio 实例以自动执行标记任务。我们提供了一个示例模型库您可以在自己的工作流程中使用这些模型也可以根据需要进行扩展和自定义。 如果您想改为编写自己的模型请参阅编写自己的 ML 后端。 1、创建后端服务 地址GitHub - HumanSignal/label-studio-ml-backend: Configs and boilerplates for Label Studios Machine Learning backend 终端导航至本地仓库目录 #用清华的源会快一点 pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple #创建自己的后端服务 label-studio-ml create Stopsign_ml_backend1.1、环境变量设置 增加环境变量LABEL_STUDIO_URLLABEL_STUDIO_API_KEY LABEL_STUDIO_URL: LS的IP端口号如127.0.0.1:8080 LABEL_STUDIO_API_KEYLS中个人账户的秘钥 1.2、修改model.py文件 实现predict函数对于目标检测模型 from typing import List, Dict, Optional from label_studio_ml.model import LabelStudioMLBase from label_studio_ml.response import ModelResponse from label_studio_ml.utils import get_single_tag_keys, get_local_path import requests, os from ultralytics import YOLO from PIL import Image from io import BytesIOLS_URL os.environ[LABEL_STUDIO_URL] LS_API_TOKEN os.environ[LABEL_STUDIO_API_KEY]class YOLOv8Model(LabelStudioMLBase):Custom ML Backend modeldef setup(self):Configure any parameters of your model hereself.set(model_version, 0.0.1)self.from_name, self.to_name, self.value, self.classes get_single_tag_keys(self.parsed_label_config, RectangleLabels, Image)self.model YOLO(D:\\Label-stutio-ml-backend\\Stopsign_ml_backend\\best.pt)self.labels self.model.namesdef predict(self, tasks: List[Dict], context: Optional[Dict] None, **kwargs) - ModelResponse:task tasks[0]# header {# Authorization: Token LS_API_TOKEN}# image Image.open(BytesIO(requests.get(# LS_URL task[data][image], headersheader).content))url tasks[0][data][image]print(furl is: {url})image_path self.get_local_path(urlurl,ls_hostLS_URL,task_idtasks[0][id])print(fimage_path: {image_path})image Image.open(image_path)original_width, original_height image.sizepredictions []score 0i 0results self.model.predict(image,conf0.5)for result in results:for i, prediction in enumerate(result.boxes):xyxy prediction.xyxy[0].tolist()predictions.append({id: str(i),from_name: self.from_name,to_name: self.to_name,type: rectanglelabels,score: prediction.conf.item(),original_width: original_width,original_height: original_height,image_rotation: 0,value: {rotation: 0,x: xyxy[0] / original_width * 100, y: xyxy[1] / original_height * 100,width: (xyxy[2] - xyxy[0]) / original_width * 100,height: (xyxy[3] - xyxy[1]) / original_height * 100,rectanglelabels: [self.labels[int(prediction.cls.item())]]}})score prediction.conf.item()print(fPrediction Score is {score:.3f}.) final_prediction [{result: predictions,score: score / (i 1),model_version: v8n}]return ModelResponse(predictionsfinal_prediction)def fit(self, event, data, **kwargs):This method is called each time an annotation is created or updatedYou can run your logic here to update the model and persist it to the cacheIt is not recommended to perform long-running operations here, as it will block the main threadInstead, consider running a separate process or a thread (like RQ worker) to perform the training:param event: event type can be (ANNOTATION_CREATED, ANNOTATION_UPDATED, START_TRAINING):param data: the payload received from the event (check [Webhook event reference](https://labelstud.io/guide/webhook_reference.html))# use cache to retrieve the data from the previous fit() runsold_data self.get(my_data)old_model_version self.get(model_version)print(fOld data: {old_data})print(fOld model version: {old_model_version})# store new data to the cacheself.set(my_data, my_new_data_value)self.set(model_version, my_new_model_version)print(fNew data: {self.get(my_data)})print(fNew model version: {self.get(model_version)})print(fit() completed successfully.) 1.3、启动服务 label-studio-ml start Stopsign_ml_backend -p 90912、LS前端配置 在项目设置页面设置模型打开交互预标注 在标注页面打开新的图片出现缓冲条表示在向后台请求预测数据 预测成功如下图所示会多出一个标注如果没有则是请求数据错误请检查后端服务配置 这里用的是一个yoloV8-OBB模型带方向的矩形框它的Model.py参考这里 https://download.csdn.net/download/weixin_42253874/89820948
http://www.tj-hxxt.cn/news/233822.html

相关文章:

  • 网站怎么做微博链接wordpress如何添加顶层菜单
  • 做旅游网站抖音广告推广
  • 商城网站怎样做wordpress 被挂马
  • 如何搭建手机网站源码路由器当服务器做网站
  • shopex网站首页空白wordpress网站二次开发
  • 外包公司做网站有哪些内容桂林象鼻山水月洞
  • 动易网站开发的主要技术自己建设网站需要什么手续
  • 网站建设公司推荐 金石下拉万盛建设局官方网站
  • wordpress怎么写网站关键词和描述建设一个网站可以采用那几方案
  • 贵州网站中企动力建设wordpress域名重定向
  • 内蒙古网站建设流程网站优化需要做什么
  • 阿里巴巴如何做网站中信建设有限责任公司杨峰
  • app手机网站建筑网址导航
  • 北京自适应网站建设七冶建设集团网站 江苏
  • 个人宽带 架设网站需备案营销策划思路
  • 传统网站模版青岛网站制作案例
  • 在线做网站有哪些平台flash网站建设技术是什么
  • 长沙网站制作价格哈尔滨网站提升排名
  • 黄山网站设计网站建设制作汕头
  • 网站建设设计制作培训做标识的网站 知乎
  • 南京做网站的客户电话建设网站实训心得
  • cms网站开发框架ps软件入门教程
  • 成品网站短视频源码搭建平面设计做兼职网站
  • 响应式网站 谷歌 移动网站全国最大招商网
  • 自助建站推广如何推广外贸型网站
  • 域名做违法网站长春网站建设团队
  • 班级网站 建设模板wordpress本地访问满
  • 网站模板下载百度云链接怎么做的计算机应用技术与php网站开发
  • 网站建设保障措施视频网站开发需要什么语言
  • 海口手机建站模板论坛网站怎么做跳转