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

企业网站欣赏郑州企业形象设计域名怎么查

企业网站欣赏郑州企业形象设计,域名怎么查,企业网站建设报价模板,手机网站开发服务deepsort 算法详解 Unmatched Tracks(未匹配的轨迹) 本质角色: 是已存在的轨迹在当前帧中“失联”的状态,即预测位置与检测结果不匹配。 生命周期阶段: 已初始化: 轨迹已存在多帧,可能携带历史信息(如外观特征、运动模型)。 未被观测到: 当前帧中未找到对应的检测框…
deepsort 算法详解
Unmatched Tracks(未匹配的轨迹)

本质角色:已存在的轨迹在当前帧中“失联”的状态,即预测位置与检测结果不匹配。
生命周期阶段:
已初始化: 轨迹已存在多帧,可能携带历史信息(如外观特征、运动模型)。
未被观测到: 当前帧中未找到对应的检测框,可能因
遮挡、目标消失或检测漏检
导致。
处理逻辑:
未匹配计数增加: 记录连续未匹配的帧数(如time_since_update)。
删除条件: 若未匹配次数超过阈值(如max_age),轨迹被删除。
预测继续: 即使未匹配,算法仍会预测下一帧的位置,以尝试重新匹配。

Unmatched Detections(未匹配的检测框)

本质角色: 是新检测到的候选目标,未被任何现有轨迹“认领”。

生命周期阶段:

  • 新出现的候选: 当前帧的检测结果,尚未被关联到已有轨迹。
  • 可能初始化为新轨迹:若未匹配到任何轨迹,需决定是否将其作为新轨迹的起点。

处理逻辑:

  • 初始化为新轨迹:
    • SORT:直接初始化为新轨迹(无确认机制)。
    • DeepSORT:需满足连续匹配次数阈值(如n_init=3)才能转为“确认态”。
  • 外观特征记录:DeepSORT会保存检测框的外观特征(如深度学习提取的向量),用于后续匹配。
维度Unmatched TracksUnmatched Detections
本质历史存在但暂时未被观测到的目标新出现但未被关联到任何目标的候选
处理逻辑删除或保留决策初始化新轨迹或忽略
算法目标保持轨迹连续性与鲁棒性发现新目标与抗干扰
2. 卡尔曼滤波代码分析
2. 1 初始化状态转移矩阵 F F F和观测矩阵 H H H
class KalmanFilterXYAH:"""A KalmanFilterXYAH class for tracking bounding boxes in image space using a Kalman filter.Implements a simple Kalman filter for tracking bounding boxes in image space. The 8-dimensional state space(x, y, a, h, vx, vy, va, vh) contains the bounding box center position (x, y), aspect ratio a, height h, and theirrespective velocities. Object motion follows a constant velocity model, and bounding box location (x, y, a, h) istaken as a direct observation of the state space (linear observation model).Attributes:_motion_mat (np.ndarray): The motion matrix for the Kalman filter.    F_update_mat (np.ndarray): The update matrix for the Kalman filter.    H_std_weight_position (float): Standard deviation weight for position.  标准差的权重[x  y  a  h  dx dy da dh ]_std_weight_velocity (float): Standard deviation weight for velocity.Methods:initiate: Creates a track from an unassociated measurement.predict: Runs the Kalman filter prediction step.project: Projects the state distribution to measurement space.multi_predict: Runs the Kalman filter prediction step (vectorized version).update: Runs the Kalman filter correction step.gating_distance: Computes the gating distance between state distribution and measurements.Examples:Initialize the Kalman filter and create a track from a measurement>>> kf = KalmanFilterXYAH()>>> measurement = np.array([100, 200, 1.5, 50])>>> mean, covariance = kf.initiate(measurement)>>> print(mean)>>> print(covariance)"""def __init__(self):"""Initialize Kalman filter model matrices with motion and observation uncertainty weights.The Kalman filter is initialized with an 8-dimensional state space (x, y, a, h, vx, vy, va, vh), where (x, y)represents the bounding box center position, 'a' is the aspect ratio, 'h' is the height, and their respectivevelocities are (vx, vy, va, vh). The filter uses a constant velocity model for object motion and a linearobservation model for bounding box location.Examples:Initialize a Kalman filter for tracking:>>> kf = KalmanFilterXYAH()"""ndim, dt = 4, 1.0# Create Kalman filter model matricesself._motion_mat = np.eye(2 * ndim, 2 * ndim)   # F[8,8]for i in range(ndim):self._motion_mat[i, ndim + i] = dtself._update_mat = np.eye(ndim, 2 * ndim)       # H[4,8]# Motion and observation uncertainty are chosen relative to the current state estimate. These weights control# the amount of uncertainty in the model.self._std_weight_position = 1.0 / 20self._std_weight_velocity = 1.0 / 160
  • ndim = 4:表示位置相关状态的数量,即 x , y , a , h x, y, a, h x,y,a,h(中心坐标、宽高比、高度)。
  • dt = 1.0:时间步长,默认为1秒。
  • 状态转移矩阵 F F F_motion_mat
  • 观测矩阵 H H H_update_mat),4×8的单位矩阵,仅保留前4行(对应位置和尺寸 x x x, y y y, a a a, h h h
  • std_weight_position:位置噪声权重(默认 0.05)。
  • std_weight_velocity:速度噪声权重(默认 0.00625)
2.2 initiate 方法分析

initiate 方法用于根据初始观测值(未关联的检测框)创建一个新的跟踪轨迹的初始状态(均值向量和协方差矩阵)
输入: 观测值为 z 0 = [ x , y , a , h ] z_0 = [x, y, a, h] z0=[x,y,a,h]
输出:

  • 均值向量 μ 0 \mu_0 μ0: 8维(包含位置和速度的初始估计)
  • 协方差矩阵 P 0 P_0 P0 :8×8维,表示初始状态的不确定性均值向量。
   def initiate(self, measurement: np.ndarray) -> tuple:"""Create a track from an unassociated measurement.Args:measurement (ndarray): Bounding box coordinates (x, y, a, h) with center position (x, y), aspect ratio a,and height h.Returns:(tuple[ndarray, ndarray]): Returns the mean vector (8-dimensional) and covariance matrix (8x8 dimensional)of the new track. Unobserved velocities are initialized to 0 mean.Examples:>>> kf = KalmanFilterXYAH()>>> measurement = np.array([100, 50, 1.5, 200])>>> mean, covariance = kf.initiate(measurement)   # x_k,  p_k"""mean_pos = measurement               # [4,] [x, y, a, h]mean_vel = np.zeros_like(mean_pos)   # [4,] [0, 0, 0, 0]mean = np.r_[mean_pos, mean_vel]     # [8,]  np.r_[] 按行放在一起    [100,50,1.5,200,0,0,0,0]std = [2 * self._std_weight_position * measurement[3], 	# x 方向2 * self._std_weight_position * measurement[3], 	# y 方向1e-2,												# a 2 * self._std_weight_position * measurement[3], 	# h方向 10 * self._std_weight_velocity * measurement[3],	# v_x10 * self._std_weight_velocity * measurement[3],	# v_y1e-5,												# v_a10 * self._std_weight_velocity * measurement[3],	# v_h]   # [20.0, 20.0, 0.01, 20.0, 12.5, 12.5, 1e-05, 12.5]covariance = np.diag(np.square(std))    # [8,8] 对角矩阵  [20^2, 20^2 , 0.01^2, 20^2, 12.5^2, 12.5^2, (1e−5)^2, 12.5^2]return mean, covariance                 # (8,), (8, 8) 
2.3 predict方法分析

predict方法实现了卡尔曼滤波的预测步骤,通过状态转移矩阵 F \mathbf{F} F 和过程噪声协方差 Q \mathbf{Q} Q 对下一时刻的状态进行预测

  • 计算下一时刻的均值(位置 = 当前位置 + 速度)。
  • 更新协方差矩阵,结合状态转移和过程噪声。
  • 假设宽高比变化极小,速度噪声较低,确保滤波的鲁棒性。
def predict(self, mean: np.ndarray, covariance: np.ndarray) -> tuple:"""Run Kalman filter prediction step.Args:mean (ndarray): The 8-dimensional mean vector of the object state at the previous time step.covariance (ndarray): The 8x8-dimensional covariance matrix of the object state at the previous time step.Returns:(tuple[ndarray, ndarray]): Returns the mean vector and covariance matrix of the predicted state. Unobservedvelocities are initialized to 0 mean.Examples:    x_k+1 = F* x_k  ; P_K+1 = F* p_k * F^T>>> kf = KalmanFilterXYAH()>>> mean = np.array([0, 0, 1, 1, 0, 0, 0, 0])>>> covariance = np.eye(8)>>> predicted_mean, predicted_covariance = kf.predict(mean, covariance)"""std_pos = [self._std_weight_position * mean[3],self._std_weight_position * mean[3],1e-2,self._std_weight_position * mean[3],]     # [0.05, 0.05, 0.01, 0.05]std_vel = [self._std_weight_velocity * mean[3],self._std_weight_velocity * mean
http://www.dtcms.com/wzjs/458784.html

相关文章:

  • 如何制作一个论坛网站企业产品推广策划方案
  • 团队建设海报网站运营商大数据精准营销获客
  • 网站服务器维护怎样弄一个自己的平台
  • 北京手机网站建设公司杭州百度公司在哪里
  • 网站开发合同书站长工具seo综合查询全面解析
  • html如何做购物网站北京新闻最新消息
  • 江岸区建设局网站四川成都最新消息
  • 网站建设越来越难做搜盘网
  • 聊城建网站网络营销组合策略
  • 珠海专业网站建设价格百度免费下载
  • 门户网站建设模板抖音代运营大概多少钱一个月
  • wordpress的开发框架哈尔滨seo优化软件
  • 阜阳网站建设价格低搜索引擎排名google
  • 网站项目怎么做百度搜索量统计
  • 潍坊企化网站建设seo排名赚app下载
  • 博客X WordPress主题互联网优化是什么意思
  • 青岛的网站设计百度seo排名优化助手
  • 武汉 商城网站建设武汉大学人民医院光谷院区
  • 河北省做网站哪家公司好广州网络营销选择
  • 天津视频网站开发团队软件网站排行榜
  • WordPress判断用户角色seo排名优化技巧
  • 张家口住房和城乡建设部网站百度一下你就知道百度一下
  • 营销型网站开发指的是什么口碑营销什么意思
  • 网站 业务范围优化公司网站排名
  • 网站的百度快照如何做怎样做关键词排名优化
  • 为男人做购物网站河南郑州网站推广优化外包
  • 深圳市疫情最新情况关键词的优化方法
  • 在线做六级阅读网站网站媒体推广方案
  • 室内设计师联盟论坛南宁网站建设优化服务
  • 舆情分析网站免费seo黑帽教学网