ECO 视频分类模型

ECO分类模型

ECO 分类模型,可以对视频进行分类,视频是静止画面的集合,并短时间内进行播放,在人眼中形成了视频,通过 FPS 单位进行计算,指的是每秒显示多少张图片。如果直接把图片组合一张大图,随后输入给分类模型是不是可以进行分类呢?由于是静态图片,无法表达出时间的属性,视频中人物的移动、速度等也无法提现。2014 年,研究人员提出了光流的概念,指的是两帧画面中物体移动的速度,速度越快,光流的向量就越长。所以只要观察光流的变化,就可以得到图像中物体移动的开始和结束时间,以及移动速度信息。ECO模型就是实现光流检测的一种方案,他并不是直接将数据放到 C3D的网络,而是首先通过二维卷积生成较小的特征数据,让后再讲这些数据输入 C3D中进行视频处理。

网络结构

ECO网络主要分为以下 4 部分,其中 2D Net和 3D Net 是核心网络。
在这里插入图片描述

2D Net

2D Net 包括 4 个字模块,Basic Conv、InceptionA、InceptionB、InceptionC。BasicConv 是卷积层特征变换,输入 3 * 224 * 224,输出 192 * 28 * 28。InceptionA ~ InceptionC进一步进行特征转换,输出尺寸分别为 (256 * 28 * 28)、(256 * 28 * 28)、(96 * 28 * 28)。代码如下:

在这里插入图片描述

BasicConv
class BasicConv(nn.Module):'''ECO的2D Net模块中开头的模块'''def __init__(self):super(BasicConv, self).__init__()self.conv1_7x7_s2 = nn.Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3))self.conv1_7x7_s2_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.conv1_relu_7x7 = nn.ReLU(inplace=True)self.pool1_3x3_s2 = nn.MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=True)self.conv2_3x3_reduce = nn.Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1))self.conv2_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.conv2_relu_3x3_reduce = nn.ReLU(inplace=True)self.conv2_3x3 = nn.Conv2d(64, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.conv2_3x3_bn = nn.BatchNorm2d(192, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.conv2_relu_3x3 = nn.ReLU(inplace=True)self.pool2_3x3_s2 = nn.MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=True)def forward(self, x):out = self.conv1_7x7_s2(x)out = self.conv1_7x7_s2_bn(out)out = self.conv1_relu_7x7(out)out = self.pool1_3x3_s2(out)out = self.conv2_3x3_reduce(out)out = self.conv2_3x3_reduce_bn(out)out = self.conv2_relu_3x3_reduce(out)out = self.conv2_3x3(out)out = self.conv2_3x3_bn(out)out = self.conv2_relu_3x3(out)out = self.pool2_3x3_s2(out)return out
InceptionA
class InceptionA(nn.Module):'''InceptionA'''def __init__(self):super(InceptionA, self).__init__()self.inception_3a_1x1 = nn.Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3a_1x1_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_1x1 = nn.ReLU(inplace=True)self.inception_3a_3x3_reduce = nn.Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3a_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_3x3_reduce = nn.ReLU(inplace=True)self.inception_3a_3x3 = nn.Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3a_3x3_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_3x3 = nn.ReLU(inplace=True)self.inception_3a_double_3x3_reduce = nn.Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3a_double_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_double_3x3_reduce = nn.ReLU(inplace=True)self.inception_3a_double_3x3_1 = nn.Conv2d(64, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3a_double_3x3_1_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_double_3x3_1 = nn.ReLU(inplace=True)self.inception_3a_double_3x3_2 = nn.Conv2d(96, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3a_double_3x3_2_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_double_3x3_2 = nn.ReLU(inplace=True)self.inception_3a_pool = nn.AvgPool2d(kernel_size=3, stride=1, padding=1)self.inception_3a_pool_proj = nn.Conv2d(192, 32, kernel_size=(1, 1), stride=(1, 1))self.inception_3a_pool_proj_bn = nn.BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3a_relu_pool_proj = nn.ReLU(inplace=True)def forward(self, x):out1 = self.inception_3a_1x1(x)out1 = self.inception_3a_1x1_bn(out1)out1 = self.inception_3a_relu_1x1(out1)out2 = self.inception_3a_3x3_reduce(x)out2 = self.inception_3a_3x3_reduce_bn(out2)out2 = self.inception_3a_relu_3x3_reduce(out2)out2 = self.inception_3a_3x3(out2)out2 = self.inception_3a_3x3_bn(out2)out2 = self.inception_3a_relu_3x3(out2)out3 = self.inception_3a_double_3x3_reduce(x)out3 = self.inception_3a_double_3x3_reduce_bn(out3)out3 = self.inception_3a_relu_double_3x3_reduce(out3)out3 = self.inception_3a_double_3x3_1(out3)out3 = self.inception_3a_double_3x3_1_bn(out3)out3 = self.inception_3a_relu_double_3x3_1(out3)out3 = self.inception_3a_double_3x3_2(out3)out3 = self.inception_3a_double_3x3_2_bn(out3)out3 = self.inception_3a_relu_double_3x3_2(out3)out4 = self.inception_3a_pool(x)out4 = self.inception_3a_pool_proj(out4)out4 = self.inception_3a_pool_proj_bn(out4)out4 = self.inception_3a_relu_pool_proj(out4)outputs = [out1, out2, out3, out4]return torch.cat(outputs, 1)
InceptionB
class InceptionB(nn.Module):'''InceptionB'''def __init__(self):super(InceptionB, self).__init__()self.inception_3b_1x1 = nn.Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3b_1x1_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_1x1 = nn.ReLU(inplace=True)self.inception_3b_3x3_reduce = nn.Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3b_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_3x3_reduce = nn.ReLU(inplace=True)self.inception_3b_3x3 = nn.Conv2d(64, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3b_3x3_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_3x3 = nn.ReLU(inplace=True)self.inception_3b_double_3x3_reduce = nn.Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3b_double_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_double_3x3_reduce = nn.ReLU(inplace=True)self.inception_3b_double_3x3_1 = nn.Conv2d(64, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3b_double_3x3_1_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_double_3x3_1 = nn.ReLU(inplace=True)self.inception_3b_double_3x3_2 = nn.Conv2d(96, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3b_double_3x3_2_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_double_3x3_2 = nn.ReLU(inplace=True)self.inception_3b_pool = nn.AvgPool2d(kernel_size=3, stride=1, padding=1)self.inception_3b_pool_proj = nn.Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3b_pool_proj_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3b_relu_pool_proj = nn.ReLU(inplace=True)def forward(self, x):out1 = self.inception_3b_1x1(x)out1 = self.inception_3b_1x1_bn(out1)out1 = self.inception_3b_relu_1x1(out1)out2 = self.inception_3b_3x3_reduce(x)out2 = self.inception_3b_3x3_reduce_bn(out2)out2 = self.inception_3b_relu_3x3_reduce(out2)out2 = self.inception_3b_3x3(out2)out2 = self.inception_3b_3x3_bn(out2)out2 = self.inception_3b_relu_3x3(out2)out3 = self.inception_3b_double_3x3_reduce(x)out3 = self.inception_3b_double_3x3_reduce_bn(out3)out3 = self.inception_3b_relu_double_3x3_reduce(out3)out3 = self.inception_3b_double_3x3_1(out3)out3 = self.inception_3b_double_3x3_1_bn(out3)out3 = self.inception_3b_relu_double_3x3_1(out3)out3 = self.inception_3b_double_3x3_2(out3)out3 = self.inception_3b_double_3x3_2_bn(out3)out3 = self.inception_3b_relu_double_3x3_2(out3)out4 = self.inception_3b_pool(x)out4 = self.inception_3b_pool_proj(out4)out4 = self.inception_3b_pool_proj_bn(out4)out4 = self.inception_3b_relu_pool_proj(out4)outputs = [out1, out2, out3, out4]return torch.cat(outputs, 1)
InceptionC
class InceptionC(nn.Module):'''InceptionC'''def __init__(self):super(InceptionC, self).__init__()self.inception_3c_double_3x3_reduce = nn.Conv2d(320, 64, kernel_size=(1, 1), stride=(1, 1))self.inception_3c_double_3x3_reduce_bn = nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3c_relu_double_3x3_reduce = nn.ReLU(inplace=True)self.inception_3c_double_3x3_1 = nn.Conv2d(64, 96, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))self.inception_3c_double_3x3_1_bn = nn.BatchNorm2d(96, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.inception_3c_relu_double_3x3_1 = nn.ReLU(inplace=True)def forward(self, x):out = self.inception_3c_double_3x3_reduce(x)out = self.inception_3c_double_3x3_reduce_bn(out)out = self.inception_3c_relu_double_3x3_reduce(out)out = self.inception_3c_double_3x3_1(out)out = self.inception_3c_double_3x3_1_bn(out)out = self.inception_3c_relu_double_3x3_1(out)return out

3D Net

从2D Net的输出(16 * 96 * 28 * 28)进入3D Net,首先将数据进行转换,需要转为时间、高度、宽度。3D Net 包含 4 个字模块,Resnet_3D_3、Resnet_3D_4、Resnet_3D_5,分别进行特征转换,转换后分别为 128 * 16 * 28 *28、256 * 8 * 14 14、512 4 * 7 *7,最终转换为 (512) 特征向量。代码如下:

在这里插入图片描述

Resnet_3D_3
class Resnet_3D_3(nn.Module):'''Resnet_3D_3'''def __init__(self):super(Resnet_3D_3, self).__init__()self.res3a_2 = nn.Conv3d(96, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res3a_bn = nn.BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res3a_relu = nn.ReLU(inplace=True)self.res3b_1 = nn.Conv3d(128, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res3b_1_bn = nn.BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res3b_1_relu = nn.ReLU(inplace=True)self.res3b_2 = nn.Conv3d(128, 128, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res3b_bn = nn.BatchNorm3d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res3b_relu = nn.ReLU(inplace=True)def forward(self, x):residual = self.res3a_2(x)out = self.res3a_bn(residual)out = self.res3a_relu(out)out = self.res3b_1(out)out = self.res3b_1_bn(out)out = self.res3b_relu(out)out = self.res3b_2(out)out += residualout = self.res3b_bn(out)out = self.res3b_relu(out)return out
Resnet_3D_4
class Resnet_3D_4(nn.Module):'''Resnet_3D_4'''def __init__(self):super(Resnet_3D_4, self).__init__()self.res4a_1 = nn.Conv3d(128, 256, kernel_size=(3, 3, 3), stride=(2, 2, 2), padding=(1, 1, 1))self.res4a_1_bn = nn.BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res4a_1_relu = nn.ReLU(inplace=True)self.res4a_2 = nn.Conv3d(256, 256, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res4a_down = nn.Conv3d(128, 256, kernel_size=(3, 3, 3), stride=(2, 2, 2), padding=(1, 1, 1))self.res4a_bn = nn.BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res4a_relu = nn.ReLU(inplace=True)self.res4b_1 = nn.Conv3d(256, 256, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res4b_1_bn = nn.BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res4b_1_relu = nn.ReLU(inplace=True)self.res4b_2 = nn.Conv3d(256, 256, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res4b_bn = nn.BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res4b_relu = nn.ReLU(inplace=True)def forward(self, x):residual = self.res4a_down(x)out = self.res4a_1(x)out = self.res4a_1_bn(out)out = self.res4a_1_relu(out)out = self.res4a_2(out)out += residualresidual2 = outout = self.res4a_bn(out)out = self.res4a_relu(out)out = self.res4b_1(out)out = self.res4b_1_bn(out)out = self.res4b_1_relu(out)out = self.res4b_2(out)out += residual2out = self.res4b_bn(out)out = self.res4b_relu(out)return out
Resnet_3D_5
class Resnet_3D_5(nn.Module):'''Resnet_3D_5'''def __init__(self):super(Resnet_3D_5, self).__init__()self.res5a_1 = nn.Conv3d(256, 512, kernel_size=(3, 3, 3), stride=(2, 2, 2), padding=(1, 1, 1))self.res5a_1_bn = nn.BatchNorm3d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res5a_1_relu = nn.ReLU(inplace=True)self.res5a_2 = nn.Conv3d(512, 512, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res5a_down = nn.Conv3d(256, 512, kernel_size=(3, 3, 3), stride=(2, 2, 2), padding=(1, 1, 1))self.res5a_bn = nn.BatchNorm3d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res5a_relu = nn.ReLU(inplace=True)self.res5b_1 = nn.Conv3d(512, 512, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res5b_1_bn = nn.BatchNorm3d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res5b_1_relu = nn.ReLU(inplace=True)self.res5b_2 = nn.Conv3d(512, 512, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))self.res5b_bn = nn.BatchNorm3d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)self.res5b_relu = nn.ReLU(inplace=True)def forward(self, x):residual = self.res5a_down(x)out = self.res5a_1(x)out = self.res5a_1_bn(out)out = self.res5a_1_relu(out)out = self.res5a_2(out)out += residual  # res5aresidual2 = outout = self.res5a_bn(out)out = self.res5a_relu(out)out = self.res5b_1(out)out = self.res5b_1_bn(out)out = self.res5b_1_relu(out)out = self.res5b_2(out)out += residual2  # res5bout = self.res5b_bn(out)out = self.res5b_relu(out)return out

有兴趣可以从 github 下载模型进行推理。https://github.com/mzolfaghari/ECO-efficient-video-understanding

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/9671.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

开源直播电商系统(仿抖音电商模式)

当下,传统的图文电商模式正在走向没落,以“抖音”为首的直播电商模式备受用户追捧,它具有直观与互动的特点,拥有传统电商所不具备的优势。而且,当前正是直播电商的红利期,很多主播和品牌商都通过直播电商业…

numpy中高维数组变为向量与numpy中增加和删除维度实现方法

在NumPy中,将高维数组变为向量通常指的是将多维数组(如二维或更高维度的数组)转换为一维数组(向量)。这一过程可以通过多种方法实现,具体如下: 使用numpy.reshape()函数:这个函数可…

人工智能|推荐系统——工业界的推荐系统之冷启动

UGC的物品冷启有哪些 ⼩红书上⽤户新发布的笔记。 B站上⽤户新上传的视频。 今⽇头条上作者新发布的⽂章。 为什么要特殊对待新笔记? 新笔记缺少与⽤户的交互,导致推荐的难度⼤、效果差。 扶持新发布、低曝光的笔记,可以增强作者发布意愿…

超越传统游戏:生成式人工智能对游戏的变革性影响

人工智能(AI)在游戏中的应用 游戏产业是一个充满活力、不断发展的领域,人工智能(AI)的融入对其产生了重大影响。这一技术进步彻底改变了游戏的开发、玩法和体验方式。本文分析的重点是传统人工智能和生成式人工智能在游…

PyTorch 图像篇

计算机视觉技术是一门包括计算机科学与工程、神经生理学、物理学、信号处理、认知科学、应用数学与统计等多学科的综合性科学技术, 是人工智能的一个重要分支, 目前在智能安防、自动驾驶汽车、医疗保健、生成制造等领域具有重要的应用价值。 计算机视觉…

Linux -- 日志

一 日志的重要性 在之前的编程经历中,如果我们的程序运行出现了问题,都是通过 标准输出 或 标准错误 将 错误信息 直接输出到屏幕上,以此来排除程序中的错误。 这在我们以往所写的程序中使用没啥问题,但如果出错的是一个不断在运行…

burp靶场xss漏洞(初级篇)

靶场地址 http://portswigger.net/web-security/all-labs#cross-site-scripting 第一关&#xff1a;反射型 1.发现搜索框直接注入payload <script>alert(111)</script> ​ 2.出现弹窗即说明攻击成功 ​ 第二关&#xff1a;存储型 1.需要在评论里插入payload …

完整版解答!2024年数维杯数学建模挑战赛B题

B题 生物质和煤共热解问题的研究 技术文档第一问1.1问题一分析1.2数据预处理1.3问题一Spearman相关性分析 数据代码资料获取 技术文档 第一问 1.1问题一分析 对于问题一&#xff0c;题目要求分析出正己烷不溶物对焦油产率、水产率、焦渣产率这三个指标是否有显著影响&#x…

2024年湖北省专升本C语言程序设计大题真题解析

2024年湖北省的专升本考试已于4月30日举行&#xff0c;考试中&#xff0c;出现了许多不同的考试题目&#xff0c;我在网上找到一所高校专升本的大题&#xff08;好像是湖北师范的&#xff0c;后续会有湖北理工的大题真题解析&#xff0c;敬请期待&#xff09;&#xff0c;那么我…

C#中字典Dictionary与自定义类型CustomType之间的转换

C#中字典Dictionary与自定义类型CustomType之间的转换 思路&#xff1a; 可以使用反射System.Reflection来获取类的具体属性&#xff0c; 属性名称就映射字典的键Key。 新建控制台程序DictionaryCustomClassConversionDemo 第一步、新建关键转换类ConversionUtil。 类Con…

基于STM32F401RET6智能锁项目(使用库函数点灯、按键)

点灯硬件原理图 1、首先&#xff0c;我们查看一下原理图&#xff0c;找到相对应的GPIO口 LED_R低电平导通&#xff0c;LED4亮&#xff0c;所以LED_R的GPIO口需要配置一个低电平才能亮&#xff1b; LED_G低电平导通&#xff0c;LED3亮&#xff0c;所以LED_R的GPIO口需要配置一…

举办《Llama3关键技术深度解析与构建Responsible AI、算法及开发落地实战》线上高级研修讲座

举办《Llama3关键技术深度解析与构建Responsible AI、算法及开发落地实战》线上高级研修讲座

AI 资料汇总专栏

包含AI资料、大模型资料、AI最新行业发展 人工智能&#xff08;Artificial Intelligence&#xff0c;简称AI&#xff09;是一门研究如何使计算机能够具备智能行为的科学与技术。它致力于开发出能够像人类一样思考、学习、理解和决策的计算机系统。自20世纪50年代以来&#xff…

C++ 内联函数

一 宏定义带来的问题 最后ret的值是0。问题出在编译器在遇到宏时只是进行简单的宏替换。 宏的好处是没有类似于普通函数调用时的系统开销&#xff0c;并且宏定义的参数可以适宜大多数类型的数据。 宏定义也有缺点&#xff1a; 有时会产生不可预料的副作用。 二 用inline定义…

开源框架平台:功能优势多,助力数字化转型!

伴随着科技越来越发达&#xff0c;低代码技术平台、开源框架平台逐渐在各中小型企业里获得重视和青睐&#xff0c;成为助力企业实现流程化办公&#xff0c;进入数字化转型的的有力武器。在众多服务商中&#xff0c;谁拥有市场竞争力&#xff0c;谁在服务和产品方面更具核心价值…

Vue 插槽

Vue插槽是一种特殊的语法&#xff0c;用于在组件中定义可复用的模板部分。它允许开发者在组件的标记中声明一个或多个插槽&#xff0c;然后在使用该组件时&#xff0c;可以根据自己的需求将内容插入到这些插槽中。 Vue插槽分为默认插槽和具名插槽两种。 目录 默认插槽 语法…

springboot-aop-学习笔记

什么是AOP&#xff1f; AOP英文全称&#xff1a;Aspect Oriented Programming&#xff08;面向切面编程、面向方面编程&#xff09;&#xff0c;其实说白了&#xff0c;就是 需要 某个通用的方法时&#xff0c;可以创建一个模板&#xff0c;模板里面就有这些通用的方法&#xf…

effective python学习笔记_类与接口

用组合类实现多层结构而不用内置类型 例子&#xff1a;成绩单&#xff0c;存储学生各科成绩多个然后加权重&#xff0c;如果用字典类型会导致字典有多层嵌套结构 思想 当用内置类型如字典元组等结构出现超过二层的多层嵌套结构时&#xff0c;读起来会比较难懂&#xff0c;此时…

nestjs 全栈进阶--中间件

视频教程 22_nest中中间件_哔哩哔哩_bilibili 1. 介绍 在Nest.js框架中&#xff0c;中间件&#xff08;Middleware&#xff09;是一个非常重要的概念&#xff0c;它是HTTP请求和响应生命周期中的一个重要组成部分&#xff0c;允许开发者在请求到达最终的目的控制器方法之前或…

04.进程间通信

进程间通信基本概念 IPC&#xff08;Inter Process Communication&#xff09; 进程间通信 进程通信就是不同进程之间进行信息的交换或传播 为什么进程之间实现通信和困难 因为进程之间具有独立性&#xff0c;数据独立&#xff0c;程序可能独立也可能不独立&#xff08;父子进…