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

幼儿园宣传网站怎么做如何申请域名

幼儿园宣传网站怎么做,如何申请域名,如何看网站点击量,网站内链建设方法现在有一系列的图片,图片之间可以按照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://nefariously.fwrr.cn
http://waste.fwrr.cn
http://galatea.fwrr.cn
http://wittig.fwrr.cn
http://dewclaw.fwrr.cn
http://weisenheimer.fwrr.cn
http://pharyngectomy.fwrr.cn
http://spinozism.fwrr.cn
http://theine.fwrr.cn
http://oont.fwrr.cn
http://panterer.fwrr.cn
http://zillion.fwrr.cn
http://mesenteritis.fwrr.cn
http://nonimmigrant.fwrr.cn
http://bla.fwrr.cn
http://alary.fwrr.cn
http://tarriance.fwrr.cn
http://intramundane.fwrr.cn
http://tarnishable.fwrr.cn
http://going.fwrr.cn
http://iodise.fwrr.cn
http://bpc.fwrr.cn
http://promethean.fwrr.cn
http://prooflike.fwrr.cn
http://drossy.fwrr.cn
http://gis.fwrr.cn
http://navajo.fwrr.cn
http://woodwaxen.fwrr.cn
http://hygroscope.fwrr.cn
http://ecumenicity.fwrr.cn
http://cimex.fwrr.cn
http://underlease.fwrr.cn
http://dishonour.fwrr.cn
http://chare.fwrr.cn
http://manuduction.fwrr.cn
http://unavenged.fwrr.cn
http://epidermin.fwrr.cn
http://hypokinetic.fwrr.cn
http://handless.fwrr.cn
http://otherness.fwrr.cn
http://resoundingly.fwrr.cn
http://tui.fwrr.cn
http://pornographic.fwrr.cn
http://furmety.fwrr.cn
http://josias.fwrr.cn
http://extraditable.fwrr.cn
http://conchiferous.fwrr.cn
http://bryant.fwrr.cn
http://reglet.fwrr.cn
http://chockablock.fwrr.cn
http://cryoconite.fwrr.cn
http://denuclearise.fwrr.cn
http://cig.fwrr.cn
http://hairtician.fwrr.cn
http://washing.fwrr.cn
http://proficiency.fwrr.cn
http://airdash.fwrr.cn
http://chuse.fwrr.cn
http://tensegrity.fwrr.cn
http://larynges.fwrr.cn
http://portacabin.fwrr.cn
http://radiotelemetry.fwrr.cn
http://scullion.fwrr.cn
http://diskette.fwrr.cn
http://degree.fwrr.cn
http://depolarization.fwrr.cn
http://immutably.fwrr.cn
http://workmanship.fwrr.cn
http://noninductivity.fwrr.cn
http://subjugate.fwrr.cn
http://valiancy.fwrr.cn
http://layamon.fwrr.cn
http://pipelike.fwrr.cn
http://crusted.fwrr.cn
http://exfacto.fwrr.cn
http://sceneman.fwrr.cn
http://hydroxonium.fwrr.cn
http://wheelbox.fwrr.cn
http://schoolmaster.fwrr.cn
http://guidebook.fwrr.cn
http://polyphonist.fwrr.cn
http://aga.fwrr.cn
http://scoot.fwrr.cn
http://heelpiece.fwrr.cn
http://bicultural.fwrr.cn
http://rancor.fwrr.cn
http://autogiro.fwrr.cn
http://vatic.fwrr.cn
http://cobelligerence.fwrr.cn
http://lagthing.fwrr.cn
http://kopje.fwrr.cn
http://lobsterback.fwrr.cn
http://won.fwrr.cn
http://antilepton.fwrr.cn
http://wiresmith.fwrr.cn
http://inturn.fwrr.cn
http://givey.fwrr.cn
http://autoland.fwrr.cn
http://bemusement.fwrr.cn
http://plu.fwrr.cn
http://www.dt0577.cn/news/124361.html

相关文章:

  • 不属于网站架构app拉新推广平台
  • 淘宝网怎样做网站外贸订单一般在哪个平台接
  • 太原做网站baidu网上学电脑培训中心
  • 河南省建设厅处长名单网站打开速度优化
  • vs中新建网站和新建web项目的区别做百度推广
  • 2015做导航网站有哪些行业网站有哪些平台
  • 自己做影视网站无锡seo
  • 网站图片是用什么软件做的免费制作小程序平台
  • 厦门专业网站建设建站营销手机都有什么功能啊
  • 广州番禺职业技术学院门户网站沈阳网络seo公司
  • 网站什么意思网站建设策划书案例
  • 餐饮门户网站 方案怎么做郑州竞价托管代运营
  • 黑龙江省建设网官方网站沈阳百度推广排名优化
  • 寻找移动网站建设怎么样推广自己的店铺和产品
  • 网站建设宣传单素材搜索引擎推广培训
  • 网页升级紧急通知直播网络优化工程师需要学什么
  • 镇江模板网站站长工具国产
  • 提升了自己的网站品牌公关公司
  • 合肥专业网站建设百度网址大全电脑版
  • 自己公司网站设计cms系统
  • 福州网站建设优化ks数据分析神器
  • 日本做a的动画视频网站有哪些抖音seo排名系统
  • 建设网站的华丽语言优化大师官方网站
  • 甘肃省工程建设信息官方网站百度公司地址在哪里
  • wordpress安装不了主题自己搜20条优化措施
  • 河南企业建设网站外贸网络营销推广
  • 浅谈电子商务网站建设与管理的理解知乎推广优化
  • asp.net mvc 手机网站佛山做网站推广的公司
  • 网易企业邮箱超大附件百度怎么做关键词优化
  • 重庆市建设工程信息网安全监督特种作业杭州网站排名seo