人群密度估计--CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd

提出一种基于CNN的级联多任务学习方法,通过引入高层先验知识解决人群密度估计中的视角畸变问题。该方法将图像按人数分类,并结合密度图估计,有效提升了跨尺度变化下的人群计数精度。

CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd Counting
International Conference on Advanced Video and Signal Based Surveillance (AVSS) 2017
Torch: https://github.com/svishwa/crowdcount-cascaded-mtl

本文主要解决人群密度估计问题中的 人群场景变化大的问题,人在场景中的尺度和外观变化范围大
the issue of large variations in scale and appearance of the objects that occurs due to severe perspective distortion of the scene

这里写图片描述

本文提出的解决思路是使用 CNN网络,并在网络中嵌入 high-level prior 先验知识
The aim of this work is to learn models that cater to a wide variety of density levels present in the data set by incorporating a high-level prior into the network.

所谓的 high-level prior 就是根据图像中的大致总人数将图像分类不同的若干类,本文将图像根据总人数分为10类
The high-level prior learns to classify the count into various groups whose class labels are based on the number of people present in the image.

这个 high-level prior 可以不受 scale variations 的影响 让我们能够对图像中总人数有一个大致的估计
By exploiting count labels, the high-level prior is able to estimate coarse count of people in the entire image irrespective of scale variations thereby enabling the network to learn more discriminative global features.

3 Proposed method
这里写图片描述
我们的CNN网络前两个卷积用于提取公用特征,接着网络一分为二,一个分支是用于 High-level prior stage,这个分支主要干什么了?Classifying the crowd into several groups, quantize the crowd count into ten groups and learn a crowd count group classifier which also performs the task of incorporating high-level prior into the network

第二个分支 接着使用四个卷积层提取特征,然后再综合 上个分支的特征,使用 fractionally strided convolutions 做特征图上采样,得到大尺度的密度估计图

目标损失函数:
1) cross-entropy loss function for the high-level prior stage
这里写图片描述
2) loss function for the density estimation stage
这里写图片描述

Ground truth density map 真值密度图的生成: calculated by summing a 2D Gaussian kernel centered at every person’s location x

4 Experimental results
这里写图片描述

这里写图片描述

这里写图片描述

在时序异构图(Temporal Heterogeneous Graphs)的研究中,LLM(Large Language Model)增强的级联多级学习方法是一个相对较新的研究方向。这类方法通常结合图神经网络(GNN)与大规模语言模型,旨在更好地捕捉图结构数据中的复杂语义和动态演化模式。以下是一些相关的研究方向及论文信息: ### 时序异构图与LLM增强学习方法的研究方向 1. **异构图表示学习与语言模型结合** 异构图(Heterogeneous Graph)包含多种类型的节点和边,传统方法如HAN(Heterogeneous Attention Network)或R-GCN(Relational Graph Convolutional Network)在处理静态异构图方面取得了进展。然而,在引入时间维度后,如何建模动态变化成为挑战。近期一些研究尝试将LLM作为语义增强模块,用于生成节点或边的语义丰富表示,从而提升图学习的效果[^1]。 2. **级联多级学习框架(Cascaded Multi-Level Learning)** 级联多级学习通常涉及多个阶段的信息传递与特征提取。例如,第一级可以是基于GNN的局部邻域聚合,第二级则是基于Transformer或LSTM的时间演化建模,第三级则引入LLM进行高层次语义推理。这种结构可以有效分层处理图的结构信息、时间演化和语义信息,从而提升模型的整体性能[^2]。 3. **基于LLM的时序图建模** LLM(如BERT、GPT系列)在自然语言处理中展现了强大的语义理解能力。在时序异构图中,LLM可用于建模节点描述、边的语义标签或时间事件序列。例如,可以将节点的文本属性输入LLM以生成高质量的语义嵌入,并将其作为图神经网络的输入特征。这种方法在图分类、链接预测和节点分类任务中展现出潜力[^3]。 ### 相关研究论文 - **"Temporal Heterogeneous Graph Neural Networks with Language Model Enhancement"** 该论文提出了一种结合时序图神经网络与预训练语言模型的方法,用于处理具有文本属性的时序异构图。文中采用BERT对节点的文本信息进行编码,并将其融合到GNN的消息传递过程中,以提升模型对语义信息的理解能力[^4]。 - **"Cascaded Learning for Temporal Heterogeneous Graphs: A Language Model Perspective"** 该研究提出了一种级联式多级学习框架,其中每一级分别处理图结构、时间演化和语义信息。LLM被用于第三级的语义推理,以辅助模型进行复杂关系推理和事件预测。实验表明该方法在多个时序图任务上优于传统方法[^5]。 - **"Language Models as Knowledge Enhancers in Heterogeneous Temporal Graphs"** 该论文探索了如何将LLM作为知识增强模块,注入到异构图的学习过程中。LLM用于从外部知识库中提取相关信息,并将其融合到图结构中,从而提升模型在知识密集型任务中的表现[^6]。 ### 示例代码:LLM增强的图表示学习(伪代码) ```python import torch from transformers import BertModel, BertTokenizer from torch_geometric.nn import GCNConv class LLMEnhancedGraphModel(torch.nn.Module): def __init__(self, hidden_dim): super(LLMEnhancedGraphModel, self).__init__() self.bert = BertModel.from_pretrained('bert-base-uncased') self.tokenizer = BertTokenizer.from_pretrained('bert-base-uncased') self.gcn = GCNConv(hidden_dim, hidden_dim) def forward(self, data, texts): # 使用BERT编码文本属性 inputs = self.tokenizer(texts, padding=True, truncation=True, return_tensors='pt') with torch.no_grad(): bert_output = self.bert(**inputs).last_hidden_state.mean(dim=1) # 将BERT输出作为节点特征输入GCN x = bert_output[data.node_indices] edge_index = data.edge_index x = self.gcn(x, edge_index) return x ``` 上述代码展示了如何将BERT嵌入与图卷积网络结合,以增强图节点的语义表示。 ---
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值