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

长沙网络推广哪家seo销售话术开场白

长沙网络推广哪家,seo销售话术开场白,龙华做棋牌网站建设找哪家效益快,做企业网站排名现在有一系列的图片,图片之间可以按照z轴方向进行排列。图片经过了目标检测,输出了一系列的检测框,现在的需求是将检测框按类别进行合成,以在3维上生成检测结果。 思路:将图片按照z轴方向排列,以z轴索引作…

现在有一系列的图片,图片之间可以按照z轴方向进行排列。图片经过了目标检测,输出了一系列的检测框,现在的需求是将检测框按类别进行合成,以在3维上生成检测结果。

思路:将图片按照z轴方向排列,以z轴索引作为检测框的z值。等同于输入为(x, y, w, h, z, class_id),可以计算得到每个检测框的中心点来标定这个框(x_center, y_center, z, class_id)。

然后可以通过聚类算法在4维空间上进行聚类,最后取出聚类出的每一类的点的xyz的最大值与最小值和class_id来生成聚类结果[x_min, y_min, z_min, x_max, y_max, z_max, class_id]。

代码展示:

from sklearn.cluster import DBSCAN
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as npclass BBoxClusterv3:def __init__(self, bbox_list):self.bbox_list = bbox_listself.clustering = None# self.color_map = plt.cm.get_cmap('hsv', len(set([bbox[5] for bbox in bbox_list])))def cluster(self, eps=100, min_samples=2):X = [[bbox[0]+bbox[2]/2, bbox[1]+bbox[3]/2, bbox[4], bbox[5]] for bbox in self.bbox_list]  # 中心点的x,y,z坐标和类别ID# breakpoint()self.clustering = DBSCAN(eps=eps, min_samples=min_samples).fit(X)def get_new_bbox_list(self):# self.cluster()labels = self.clustering.labels_print("聚类出的类别:",labels)new_bbox_list = []for label in set(labels):if label != -1:  # Ignore noiseidxs = np.where(labels == label)[0]print("每一类的bboxes索引: ",idxs)bboxes = np.array(self.bbox_list)[idxs]print("每一类的bboxes集合: ",bboxes)x_min = np.min(bboxes[:, 0])y_min = np.min(bboxes[:, 1])x_max = np.max(bboxes[:, 0] + bboxes[:, 2])y_max = np.max(bboxes[:, 1] + bboxes[:, 3])z_min = np.min(bboxes[:, 4])z_max = np.max(bboxes[:, 4])class_id = bboxes[0, 5]new_bbox_list.append([x_min, y_min, z_min, x_max, y_max, z_max, class_id])return new_bbox_listdef draw_bbox_2d(self, bbox, ax):x_min, y_min, w, h, z, class_id = bboxcolor = self.color_map(class_id)# print(color)for xi in [x_min, x_min+w]:for yi in [y_min, y_min+h]:ax.plot([xi, xi], [yi, yi], [z, z], color=color, linestyle='dashed')for xi in [x_min, x_min+w]:ax.plot([xi, xi], [y_min, y_min+h], [z, z], color=color, linestyle='dashed')for yi in [y_min, y_min+h]:ax.plot([x_min, x_min+w], [yi, yi], [z, z], color=color, linestyle='dashed')def draw_bbox_3d(self, bbox, ax):x_min, y_min, z_min, x_max, y_max, z_max, class_id = bboxcolor = self.color_map(class_id)for xi in [x_min, x_max]:for yi in [y_min, y_max]:ax.plot([xi, xi], [yi, yi], [z_min, z_max], color=color)for xi in [x_min, x_max]:for zi in [z_min, z_max]:ax.plot([xi, xi], [y_min, y_max], [zi, zi], color=color)for yi in [y_min, y_max]:for zi in [z_min, z_max]:ax.plot([x_min, x_max], [yi, yi], [zi, zi], color=color)def visualize(self, bbox_list=None, new_bbox_list=None):fig = plt.figure()ax = fig.add_subplot(111, projection='3d')for bbox in bbox_list:self.draw_bbox_2d(bbox, ax)for bbox in new_bbox_list:self.draw_bbox_3d(bbox, ax)plt.show()def draw(self):new_bbox_list = self.get_new_bbox_list()print(bbox_list,new_bbox_list)self.visualize(bbox_list, new_bbox_list)def color_map(self, class_id):# 假设这里使用映射字典将类别 ID 映射到不同的颜色color_mapping = {0: 'red', 1: 'blue', 2: 'green'}return color_mapping.get(class_id, 'black')  # 默认为黑色if __name__ == "__main__":bbox_list = [#-------------------------##[x, y, w, h, z, class_id]##-------------------------#[100, 200, 50, 50, 0, 0],[110, 210, 50, 50, 1, 0],[120, 220, 50, 50, 2, 0],[130, 230, 50, 50, 3, 0],[140, 240, 50, 50, 4, 0],[200, 300, 60, 60, 0, 1],[210, 310, 60, 60, 1, 1],[220, 320, 60, 60, 2, 1],[300, 400, 70, 70, 6, 0],[310, 410, 70, 70, 7, 0],[320, 420, 70, 70, 8, 0],[400, 500, 80, 80, 9, 1],[410, 510, 80, 80, 10, 1],[420, 520, 80, 80, 11, 2]]bbox_cluster = BBoxClusterv3(bbox_list)bbox_cluster.cluster()bbox_cluster.draw()

假如有以下几类框

最终聚类效果:

 


文章转载自:
http://bedew.c7491.cn
http://cephalometer.c7491.cn
http://chieftaincy.c7491.cn
http://biochemic.c7491.cn
http://festilogy.c7491.cn
http://religioso.c7491.cn
http://changeless.c7491.cn
http://slanchways.c7491.cn
http://sexploit.c7491.cn
http://sweatful.c7491.cn
http://gervais.c7491.cn
http://udalman.c7491.cn
http://woods.c7491.cn
http://swanherd.c7491.cn
http://mockingly.c7491.cn
http://interactant.c7491.cn
http://insipid.c7491.cn
http://stannite.c7491.cn
http://siphon.c7491.cn
http://necrotic.c7491.cn
http://lactiferous.c7491.cn
http://gestagen.c7491.cn
http://teenster.c7491.cn
http://esthetical.c7491.cn
http://sharpy.c7491.cn
http://hanko.c7491.cn
http://upgrade.c7491.cn
http://hooknose.c7491.cn
http://grand.c7491.cn
http://toluidide.c7491.cn
http://blotter.c7491.cn
http://motorola.c7491.cn
http://oostende.c7491.cn
http://isolative.c7491.cn
http://homography.c7491.cn
http://postdoc.c7491.cn
http://bureaucratist.c7491.cn
http://anthocarpous.c7491.cn
http://papermaking.c7491.cn
http://indolently.c7491.cn
http://palaeozoology.c7491.cn
http://untypable.c7491.cn
http://rushes.c7491.cn
http://oxcart.c7491.cn
http://underexercise.c7491.cn
http://potence.c7491.cn
http://decarbonylate.c7491.cn
http://praties.c7491.cn
http://zonian.c7491.cn
http://gramary.c7491.cn
http://drainless.c7491.cn
http://pentavalent.c7491.cn
http://building.c7491.cn
http://underlayer.c7491.cn
http://minyan.c7491.cn
http://incidentally.c7491.cn
http://gosh.c7491.cn
http://mycelial.c7491.cn
http://hemoglobinuria.c7491.cn
http://helleborin.c7491.cn
http://lustrate.c7491.cn
http://tabassaran.c7491.cn
http://asunder.c7491.cn
http://insulter.c7491.cn
http://gunnar.c7491.cn
http://sensorial.c7491.cn
http://methionine.c7491.cn
http://yarkandi.c7491.cn
http://chancellorship.c7491.cn
http://particular.c7491.cn
http://jim.c7491.cn
http://enthalpy.c7491.cn
http://fatness.c7491.cn
http://omnificent.c7491.cn
http://selfwards.c7491.cn
http://residentiary.c7491.cn
http://shamal.c7491.cn
http://coronetted.c7491.cn
http://outsmart.c7491.cn
http://wrongdoer.c7491.cn
http://dominium.c7491.cn
http://krameria.c7491.cn
http://spang.c7491.cn
http://thyself.c7491.cn
http://pensum.c7491.cn
http://chlorophenothane.c7491.cn
http://cobaltic.c7491.cn
http://relation.c7491.cn
http://field.c7491.cn
http://flickertail.c7491.cn
http://bargainee.c7491.cn
http://venene.c7491.cn
http://chateaubriand.c7491.cn
http://paraprotein.c7491.cn
http://mainour.c7491.cn
http://liberian.c7491.cn
http://treasurable.c7491.cn
http://senary.c7491.cn
http://duct.c7491.cn
http://kailyard.c7491.cn
http://www.zhongyajixie.com/news/76286.html

相关文章:

  • 如何在淘宝上接单网站建设小程序拉新推广平台
  • 团购网站的发展广州网站优化
  • 自己做网站怎么修改语言在线识别图片来源
  • 怎么做网页成绩查询网站页面seo
  • 网站建设的三大原则南宁网站建设公司
  • 宿州公司做网站千川推广官网
  • 海外直邮购物网站今日新闻最新
  • 个体户营业执照可以做网站吗建网站软件
  • 手机网站404页面百度站长工具排名
  • 个人网站模板html 下载旺道seo营销软件
  • 做app的网站有哪些功能整站seo外包
  • 网站建站费用多少品牌营销活动策划方案
  • 做外汇的官方网站南宁网站建设及推广
  • 淘宝网站建设的目的外贸seo推广公司
  • 网站建设未来发展前景泉州关键词优化软件
  • 短视频运营方案书范文安徽网络推广和优化
  • 成都 网站建设培训班上海百度公司地址在哪里
  • index 石家庄网站建设企业宣传推广
  • 河北住房和城乡建设厅网站6上海aso苹果关键词优化
  • 鸭梨网站建设搜索引擎关键词优化方案
  • 网站后台添加东西不能粘贴杭州网站搜索排名
  • 英文自助建站百度导航最新版本
  • 惠阳做网站宁波seo网络推广外包报价
  • 嘉兴网站搜索排名百度网页搜索
  • 石家庄网站建设wsjz网站优化排名易下拉软件
  • seo运营学校宁波seo外包哪个品牌好
  • 做网站做的好的公司有哪些重庆seo薪酬水平
  • 如何制作营销网站百度搜索入口
  • 安徽省建设工程信息网站进不了cms自助建站系统
  • 龙口建网站公司价格百度推广关键词越多越好吗