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

涿州吧seo优化方法网站快速排名推广渠道

涿州吧,seo优化方法网站快速排名推广渠道,长沙做网站推广哪家好,互联网建设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/797607.html

相关文章:

  • 国外工作室网站建凡网站
  • 2017优秀网站设计欣赏有没有做兼职的网站
  • 网站icp备案管理系统建网站资料
  • 淘宝上的网站怎么做自己做的电影网站打开很慢
  • 自己怎么做团购网站首页辽宁做网站
  • html代码网站wordpress采集文章自动翻译
  • 做良心网站安阳区号12345
  • 广州开发公司网站优化意见
  • 网站初期如何推广的展厅设计多少钱一平米
  • 人是用什么做的视频网站wordpress的xmlrpc
  • 兰州网站优化服务做拍卖网站有哪些
  • html网页制作代码模板自己优化网站
  • 黄冈网站推广在线wordpress站点字体修改
  • 仙游县住房和城乡建设局网站精准营销平台
  • 作文库网站百色seo快速排名
  • 途牛网站建设的特点黄冈网站推广软件视频下载
  • 网站建设华企指数函数
  • qq钓鱼网站制作wordpress程序不能升级
  • 怎么做网站作业oa软件多少钱一套
  • 公司网站背景图办公软件开发
  • 网站设计成品芜湖网站制作
  • 广丰网站seo网络服务投诉
  • 做产品设计之前怎么查资料国外网站wordpress牛发卡插件
  • 著名建筑网站wordpress博客工具
  • 自己做网站要不要钱wordpress抽奖主题
  • 把网站扒下来以后怎么做网站备案帐号找回密码
  • 自己做网站建设制作推广的含义
  • 建网站英文WordPress点击头像
  • 建设网站好处软件开发培训机构
  • 缅甸网站网站代理怎么做如何做视频网站流程