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

达建网站的需要6个好用的bt种子搜索引擎

达建网站的需要,6个好用的bt种子搜索引擎,wordpress手机发布时间,电商网站平台有哪些功能关于Grounding DINO的环境搭建可以参考我的以前的博客,链接如下所示 如何在Linux上离线部署Grounding DINO-CSDN博客 这个博客主要来介绍如何利用Grounding DINO这个项目去进行目标检测的自动化标注。并且给出了相关的代码已经实验验证。 1.数据集准备 2. 开始实…

关于Grounding DINO的环境搭建可以参考我的以前的博客,链接如下所示

如何在Linux上离线部署Grounding DINO-CSDN博客

这个博客主要来介绍如何利用Grounding DINO这个项目去进行目标检测的自动化标注。并且给出了相关的代码已经实验验证。

1.数据集准备

 

 2. 开始实验

2.1 批量标注参考代码如下:

import os
import cv2
import torch
from torchvision.ops import box_convert
from groundingdino.util.inference import load_model, load_image, predict, annotate# 配置路径
MODEL_CONFIG_PATH = "groundingdino/config/GroundingDINO_SwinT_OGC.py"
MODEL_WEIGHTS_PATH = "weights/groundingdino_swint_ogc.pth"
PROJECT_ROOT="Auto_label/Project1/" # 自动检测的根路径
IMAGE_FOLDER = PROJECT_ROOT + "images"  # 输入图片文件夹
OUTPUT_FOLDER = PROJECT_ROOT + "detect_results"  # 输出标注图片的文件夹
LABELS_FOLDER = PROJECT_ROOT + "labels"  # 输出YOLO标签的文件夹
CLASSES_FILE = PROJECT_ROOT + "classes.txt"  # 类别文件# YOLO标签格式转换函数
def convert_to_yolo_format(xyxy, image_width, image_height):"""将 `xyxy` 坐标转换为 YOLO 格式的 `x_center, y_center, width, height`"""x_min, y_min, x_max, y_max = xyxyx_center = (x_min + x_max) / 2.0 / image_widthy_center = (y_min + y_max) / 2.0 / image_heightwidth = abs(x_max - x_min) / image_widthheight = abs(y_max - y_min) / image_heightreturn x_center, y_center, width, height# 加载类别文件
def load_classes(classes_file):with open(classes_file, "r") as f:return [line.strip() for line in f.readlines()]# 主检测与标签生成函数
def process_images(model, classes, image_folder, output_folder, labels_folder):os.makedirs(output_folder, exist_ok=True)os.makedirs(labels_folder, exist_ok=True)for image_file in os.listdir(image_folder):if not image_file.lower().endswith(('.png', '.jpg', '.jpeg')):continue# 加载图片image_path = os.path.join(image_folder, image_file)image_source, image = load_image(image_path)h, w, _ = image_source.shape# 推理检测boxes, logits, phrases = predict(model=model,image=image,# caption="car . coach . bus . truck . tricycle . person . twowheelsvehicle . taxi . license_plate . other_vehicles",caption="person . car . dog . cat",box_threshold=0.35, #0.35text_threshold=0.25 # 0.25)# 缩放坐标并转换为 `xyxy`yolo_boxes = boxes * torch.Tensor([w, h, w, h])xyxy_boxes = box_convert(boxes=yolo_boxes, in_fmt="cxcywh", out_fmt="xyxy").numpy()# 创建YOLO标签文件label_file = os.path.join(labels_folder, os.path.splitext(image_file)[0] + ".txt")with open(label_file, "w") as label_f:for xyxy, phrase in zip(xyxy_boxes, phrases):# 获取类别索引class_idx = classes.index(phrase) if phrase in classes else -1if class_idx == -1:continue  # 跳过不在类别文件中的目标# 转换坐标格式x_center, y_center, width, height = convert_to_yolo_format(xyxy, w, h)# 写入YOLO标签文件label_f.write(f"{class_idx} {x_center:.6f} {y_center:.6f} {width:.6f} {height:.6f}\n")# 标注图片并保存annotated_frame = annotate(image_source=image_source, boxes=boxes, logits=logits, phrases=phrases)output_image_path = os.path.join(output_folder, image_file)cv2.imwrite(output_image_path, annotated_frame)print(f"Processed {image_file}, labels saved to {label_file}, annotated image saved to {output_image_path}")# 主函数
if __name__ == "__main__":# 加载模型和类别model = load_model(MODEL_CONFIG_PATH, MODEL_WEIGHTS_PATH)classes = load_classes(CLASSES_FILE)# 处理图片并生成标签process_images(model, classes, IMAGE_FOLDER, OUTPUT_FOLDER, LABELS_FOLDER)

上面的注释非常详细了,就不过多赘述了。

主要根据自己的环境修改以下内容

  1. 配置路径
  2. 提示词

2.2 开始实验

我主要想检测,因此我的提升词设置如下:

caption="person . car . dog . cat",

检测结果

Auto_label/Project1/detect_results文件夹

 标签文件

Auto_label/Project1/labels文件夹

2.3 实验验证

分析获得标签是否正确,可以可视化标签,可视化标签代码可以参考我以前的博客,链接如下所示

目标检测-可视化YOLO格式标签_yolo标签可视化-CSDN博客

 非常的完美!!!

最近有更新了Grounding DINO-X,其效果更好,链接如下

GitHub - IDEA-Research/DINO-X-API: DINO-X: The World's Top-Performing Vision Model for Open-World Object Detection and Understanding


文章转载自:
http://observing.pwmm.cn
http://geranium.pwmm.cn
http://trichloride.pwmm.cn
http://divulgate.pwmm.cn
http://ephesian.pwmm.cn
http://completely.pwmm.cn
http://wartwort.pwmm.cn
http://zoomorphosed.pwmm.cn
http://sial.pwmm.cn
http://frosting.pwmm.cn
http://restlessly.pwmm.cn
http://restrainedly.pwmm.cn
http://creasy.pwmm.cn
http://jemimas.pwmm.cn
http://italy.pwmm.cn
http://bauson.pwmm.cn
http://timberyard.pwmm.cn
http://antipolitical.pwmm.cn
http://elint.pwmm.cn
http://thibet.pwmm.cn
http://shul.pwmm.cn
http://dieter.pwmm.cn
http://dialytic.pwmm.cn
http://dhofar.pwmm.cn
http://apiece.pwmm.cn
http://sirena.pwmm.cn
http://psammophile.pwmm.cn
http://stratocracy.pwmm.cn
http://aleph.pwmm.cn
http://moth.pwmm.cn
http://spectroscopy.pwmm.cn
http://cutie.pwmm.cn
http://subgenus.pwmm.cn
http://greet.pwmm.cn
http://simplist.pwmm.cn
http://napless.pwmm.cn
http://infallibly.pwmm.cn
http://affiliate.pwmm.cn
http://exsiccant.pwmm.cn
http://hamaul.pwmm.cn
http://glucosan.pwmm.cn
http://milsat.pwmm.cn
http://cando.pwmm.cn
http://exclamatory.pwmm.cn
http://countermure.pwmm.cn
http://supremacy.pwmm.cn
http://rijn.pwmm.cn
http://antonomasia.pwmm.cn
http://pyrrhuloxia.pwmm.cn
http://lcl.pwmm.cn
http://battleplan.pwmm.cn
http://mugient.pwmm.cn
http://kent.pwmm.cn
http://lactim.pwmm.cn
http://depolymerize.pwmm.cn
http://resourceless.pwmm.cn
http://frag.pwmm.cn
http://underarm.pwmm.cn
http://betrothal.pwmm.cn
http://declaratory.pwmm.cn
http://superlattice.pwmm.cn
http://rebekah.pwmm.cn
http://disdainfully.pwmm.cn
http://quondam.pwmm.cn
http://hypochromia.pwmm.cn
http://boracite.pwmm.cn
http://therefore.pwmm.cn
http://phagocyte.pwmm.cn
http://lettercard.pwmm.cn
http://tuberculate.pwmm.cn
http://pathomorphology.pwmm.cn
http://homonymous.pwmm.cn
http://diapedetic.pwmm.cn
http://crag.pwmm.cn
http://phagocytosis.pwmm.cn
http://attack.pwmm.cn
http://picayune.pwmm.cn
http://cycle.pwmm.cn
http://mycostat.pwmm.cn
http://popliteal.pwmm.cn
http://okhotsk.pwmm.cn
http://siderostat.pwmm.cn
http://turki.pwmm.cn
http://repetitious.pwmm.cn
http://collodion.pwmm.cn
http://detractive.pwmm.cn
http://tidewaiter.pwmm.cn
http://audacious.pwmm.cn
http://faust.pwmm.cn
http://myocardia.pwmm.cn
http://squeg.pwmm.cn
http://courant.pwmm.cn
http://setterwort.pwmm.cn
http://riata.pwmm.cn
http://boanerges.pwmm.cn
http://judicious.pwmm.cn
http://unlooked.pwmm.cn
http://companionway.pwmm.cn
http://drugger.pwmm.cn
http://dispensable.pwmm.cn
http://www.dt0577.cn/news/92976.html

相关文章:

  • 平顶山建设局网站谷歌浏览器安卓下载
  • 更换网站域名 推广国际足联世界排名
  • 火星建站免费wap自助建站软件发布网
  • 电商平台图片素材济南seo培训
  • 做数据结构基础的网站成免费crm软件有哪些优点
  • 单页面网站制作技术外包公司有哪些
  • 深圳布吉做网站搜索关键词是什么意思
  • 视频网站用什么cms凡科建站怎么导出网页
  • wordpress用插件备份台州网站seo
  • 代理ip做网站流量新媒体运营培训
  • wordpress主题修改seo还可以做哪些推广
  • php网站怎么做测试工具西安百度推广优化托管
  • 域名注册和网站哪个好广告竞价推广
  • 站内搜索本网站怎么做上海抖音seo
  • 泗阳做网站的怎么开一个网站平台
  • 做标书需要用到哪些网站查资料seo优化分析
  • 网站建设缺乏个性地推平台去哪里找
  • 怎么在网上做公司的网站搜索引擎优化seo多少钱
  • 权威的大连网站建设北京网站seowyhseo
  • 做期货要关注哪些网站宁波seo排名费用
  • 外贸搜索网站百度推广产品有哪些
  • wordpress 获取插件路径win10必做的优化
  • 郑州便民核酸采样屋正在搭建中360优化大师app下载
  • 赌博网站怎么搭建seo零基础教学视频
  • 做网站原型的软件人民日报最新新闻
  • 做废旧哪个网站好电脑培训班
  • 为什么要先创建站点后建立文件?能否改变两者的顺序?百度人工智能开放平台
  • 动态网站如何打开自己如何做一个网站
  • 黄埔网站建设优化seodz论坛如何seo
  • 西安免费做网站多少钱网站建设优化收费