论文笔记--ConvNet Architecture Search for Spatiotemporal Feature Learning

本文深入探讨了C3D-ResNet在时空特征提取方面的改进,并通过实验对比了不同帧采样率、分辨率及混合模型的效果,揭示了在参数量相近条件下网络深度对性能的影响。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这是Du Tran在Learning Spatiotemporal Features with 3D Convolutional Networks之后发表的续篇,相当于C3D的第二个版本,C3D-resnet.我个人觉得这篇文章除了主要探讨C3D-resnet以外,更重要的是对CNN卷积结构在时空特征表现上的一个深入探讨。大部分工作还是基于UCF-101,而且从头训练,很利于在硬件条件有限的情况下,对算法进行讨论。
首先给出代码:
https://github.com/facebook/C3D/tree/master/C3D-v1.1
再看一下升级后的效果图:
这里写图片描述
这是相较于C3D来说,已经有了明显的提高。
接下来我们看一下3D Residual Networks的结构
这里写图片描述
这是一个标准的8×112×112的input的结构。
这里写图片描述
可以看到它的效果相比于2D-CNN有了提高,但是同时也增加了参数和浮点运算。
为了接下来研究方便,作者使用了一个很方便的小trick:
他简化了网络输入,把8×112×112换成4×112×112,只需要把最后一个卷积层conv5_1的stride换成1*2*2即可,也就是时序上的stride=1.
然后作者讨论了帧采样率{1, 2, 4, 8, 16, 32},这里帧采样率就是输入帧时序上的stride(采样间隔),在最小帧采样率为1,输入为4的情况下,4帧大概是1/8s,按照上述采样率,最大32的话,相当于稀疏采样,用4帧段视频表达了128帧的长视频(大概4.5-5s).
这里写图片描述
可以看到,采样率是2或者4的时候比较好,说明过于稀疏也没用,1的话太稠密冗余,也没有意义。
作者还比较了不同分辨率的影响:
这里写图片描述
这也说明了,分辨率不一定是越大越好。
接下来作者讨论了2D-CNN和3D-CNN的混合模型:
这里写图片描述
然而证明效果不佳。
接下来这个探讨我觉得非常可惜:
这里写图片描述
这个2.5D-CNN的想法我觉得本来很好,但是作者做出来的效果也不好,不过准确率没有提高就算了,参数量和浮点运算量也还是那么大,令人费解。
因为令人惊奇的是MSRA有一篇文章实现了伪3D卷积,效果不错,不仅准确率高,参数量和浮点运算量也低,值得关注。
Learning Spatio-Temporal Representation with Pseudo-3D Residual Networks
接下来,作者讨论了在参数量和浮点运算量差不多的情况下,网络深度的影响,发现也没什么作用。
这里写图片描述
其中,k是输出卷积核的通道数,俗称网络宽度,用来控制参数量和浮点运算次数。
之后,作者还做了一个很有意义的比较:
这里写图片描述
这张图的意思是,把C3D和C3D-Resnet的特征同时用PCA降维处理后,在低维情况下进行了比较,发现它的效果好。这个还是比较有实际意义的,因为应用上不可能有高维特征,把它降维之后,才方便产品落地。
最后,给出整体的网络框架,大家会发现和2D-CNN的Resnet类似。
这里写图片描述
这是混合的2D-CNN和3D-CNN的Resnet.
这里写图片描述
这是不同深度的3D-CNN的Resnet.
总结:
虽然这篇升级版的C3D不一定是state of art,但是我最大的收获是从作者的思路中学习到如何讨论科研问题和改进模型结构的方法,这一点很重要。所以我很欣赏这篇文章,接地气,硬件条件有限的情况下也可以实现,从头训练讨论问题,排除了依靠大数据迁移学习,提升效果而忽略算法本事的问题。(PS:大概是贫穷限制了我的想象!)

### CLIP Anomaly Detection Implementation and Solutions In the context of anomaly detection using Contrastive Language–Image Pretraining (CLIP), an attribute restoration framework has been proposed that leverages pre-trained models like CLIP for detecting anomalies in images or other data types[^1]. This approach involves utilizing the powerful feature extraction capabilities of CLIP to identify patterns that deviate from normal behavior. For implementing CLIP-based anomaly detection, one can follow a structured methodology: #### Data Preparation Collecting both normal and anomalous samples is crucial. The dataset should cover various scenarios where anomalies might occur. For each sample, extract features using CLIP's encoder architecture which maps inputs into high-dimensional embedding spaces shared between text and image domains. ```python import clip import torch device = "cuda" if torch.cuda.is_available() else "cpu" model, preprocess = clip.load("ViT-B/32", device=device) def get_clip_embedding(image_path): image = preprocess(Image.open(image_path)).unsqueeze(0).to(device) with torch.no_grad(): image_features = model.encode_image(image) return image_features.cpu().numpy() ``` #### Model Training Train a classifier on top of frozen CLIP embeddings obtained during the previous step. Alternatively, fine-tune only the last few layers while keeping earlier parts fixed. Another option includes employing unsupervised learning techniques such as autoencoders trained specifically for reconstruction error minimization over CLIP representations. #### Evaluation Metrics Use metrics tailored for imbalanced datasets since anomalies typically constitute minority classes. Common choices include precision-recall curves, F1 scores, ROC AUC values, etc., alongside visual inspection tools for qualitative assessment. Regarding specific implementations, research papers focusing on building bridges across spatial and temporal resolutions may offer insights applicable when dealing with spatiotemporal anomalies detected through changes prior modeling combined with conditional diffusion processes[^2]. System-level optimizations play a significant role too; efficient utilization of hardware resources ensures faster processing times without compromising accuracy levels significantly[^3]. Lastly, integrating geographic information systems could provide additional contextual awareness beneficial for certain applications involving location-specific events monitoring tasks[^4].
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值