计算机科学应用(复习)

AI

Cybernetic 控制论

Feedback for control(Cause, System, Effect, Reaction)

Haptics 触觉

Learning—a feedback process

How machine learns

Expert System

Is an interactive computer-based decision tool that uses facts and inference rules to solve the decision making problems, based on knowledge acquired from experts.

Most of these systems use IF-THEN rules to represent knowledge.

Forward Chain(data driven, from facts and rules to deduce a conclusion):

Trigger (also called Fired) means add the conclusion to the fact database or cause the action to take place or make the recommendation.

Backward Chain(goal driven, from conclusion to find rules)

上面是第一种表示chain的方法:inference chain

第二种表示chain的方法:AND/OR Graphs to represent knowledge base

优缺点

Fuzzy Expert System

used when the input is fuzzy(E.g. IF it is hot THEN turn on air conditioner,hot没有明确指明温度)

Membership Funtion(隶属函数):represent a fuzzy set graphically 用图形表示模糊集合

a member of one fuzzy set can also be a part of other fuzzy sets

例子:

两个条件取小

Problem Solving

search strategies for complex graph—to make decision

数据结构

Queue(队列):FIFO先进先出,最先进入队列的元素会最先被移出队列

入队(Enqueue):在队列的末尾添加一个元素。

出队(Dequeue):移除队列开头的元素。

查看队首(Peek/Front):查看队列开头的元素,但不移除它。

判断是否为空(IsEmpty):检查队列是否为空。

Stack(栈):LIFO后进先出,最后进入栈的元素会最先被移出栈

入栈(Push):在栈顶添加一个元素。

出栈(Pop):移除栈顶的元素。

查看栈顶(Peek/Top):查看栈顶的元素,但不移除它。

判断是否为空(IsEmpty):检查栈是否为空。

Breadth-First Search(BFS广度优先)

Queue实现-先进先出,直到队列为空为止停止遍历,Look at all possible paths at the same depth (level) before going into a deeper level

Depth-First Search(DFS深度优先)

Stack实现-先进后出,The search expands to the deepest node of the search tree until we need to backtrack回溯

Depth-Limit Search(DLS深度限制搜索)

深度被限制在一定的限制之内。这种方法可以解决DFS中可能出现的无限路径问题,或是在搜索大图时减少时间和空间消耗

Bidirectional Search(双向搜索)

find a path from initial to goal node

Problem Solving-2

N Queens problem

Maze problem

Tile problem

用曼哈顿距离来求

二维平面上的曼哈顿距离:有两点 A(x1, y1) 和 B(x2, y2),它们之间的曼哈顿距离可以通过以下公式计算得到 d(A, B) = |x1 - x2| + |y1 - y2|

方法:::计算每个贴图距离目标状态的曼哈顿距离

每个瓷砖的曼哈顿距离总和即为启发式函数的值,A*搜索算法会使用这个值来决定其搜索顺序,选择曼哈顿距离最小的移动来执行。

Towers of Hanoi problem

To move n disks from X to Y:

If n>0

    Move n-1 disks from X to other

    Move nth disk from X to Y

    Move n-1 disks from other to Y

Knowledge Representation

1.Semantic Networks

前置知识:继承

2.Frame

描述一个实例或者一个类

Action Frame

Frame的一种,包含如下部分(slot):

Actor slot——defines who or what is to do the action

Object slot——defines the object to be acted upon.

Information slot——tells where action take place such as source and destination slots.

Task slots——sub-frames to perform task.

例:汉诺塔问题的action frame

Machine Learning

与专家系统的比较

types of learning:

1.Associative Learning: based on a stimulus and a response

2.Supervised Learning: The data has raw data and labels (possible outputs)——uses feedback to learn

3.Unsupervised Learning: The model finds the principal features of the dataset and groups that data according to similarities——learning without feedback

数据没有标签,该模型找到数据集的主要特征,并根据相似度对数据进行分组——无反馈学习

4.Semi-supervised Learning

Used when data for supervised learning is Limited, Incomplete and Inaccurate用于监督学习的数据是有限的、不完整的、不准确的

5.Reinforcement

Trains the model using reward and punishment approach——with delayed feedback

It consists of three components:

Agent——the AI learner/decision-maker

Environment——everything the agent has interaction with

Actions——what the agent can do

Neural Computing

Simple Neural Network

Linear Separability(线性可分)

n为空间的点最多可以被n-1的边界分开,则被认为是线性可分的。在二维空间中是点可以被一条直线所分离,这条边界线是通过设置阈值(一般是0.5)得到的线性方程

MCP

这里的x0是bias weight(偏置权重),设置为1。作用:increase the model's ability to fit the new data.

η (eta) is learning rate(学习率)

∑是Threshold,由于输出是0和1,所以取∑=0.5,sum大于0.5时O输出1,反之

线性可分的边界线为w0+w1x1+w2x2+...=0.5(define boundary Output 1 or 0)

More on Perceptrons

MCP works only for linearly separable problems(MCP只适用于线性可分问题)

The MCP outputs 0 or 1, depends on its threshold(MCP输出0或1取决于阈值)

没有threshold的情况

Weightless Neural Nets

Binary Numbers and Memory Locations

n位二进制,内存中就有2的n次方个位置

下面以4bit为例,memory有16个locations:

用Computer memory表示或门:4个位置分别是00 01 10 11,代表这输入,位置中的值代表输出

N-tuples(N元组)——无权重神经网络

n address line memory is neuron with n inputs 在N元组网络中,每个神经元由具有n个输入的地址线内存组成

训练过程:训练这种神经元涉及在训练集中的位置写入'1'。这表示如果一个特定的输入模式导致输出应该是'1',相应的内存地址就会被设置为'1'。

N元组网络常用于图片识别

CV

Computational Vision: Theory of Object Detection, Tracking & Re-identification

Object Detection(对象检测)

Detectors take images as input, generates target(s)’ positions

运动检测的方法:

Method: Background Subtraction

∆F =Fn−F0(只与F0作比较)

F0 is the first frame(可能什么都没有),称为reference frame 或 background

阈值处理:为了避免由于环境光线变化等因素引起的小变化被检测为运动,通常对差异帧∆F进行阈值处理。只有当像素值的变化大于某个特定的阈值时,这些变化才会被视为运动。

这种方法需要一个好的reference frame,need to have nothing that can move in the frame

Method: Change Dection

∆F =Fn−Fn−1(与之前的frame作比较)

也需要进行阈值处理

变化检测的一个优点是它连续地更新参考帧,因此不需要担心是否选择了一个“好”的参考帧。这使得算法能够适应光照变化和动态场景。

Method:Feature-Based Dectection

Object Tracking(对象追踪)

Definition: following object(s) of interest over time across a video sequence

Trackers take positional information, and generate a “trajectory” 跟踪器获取位置信息,并生成“轨迹”

Tracker

-Single-target (follows a single object as it moves around a scene)

-Multi-target (follows many objects, whilst not mixing them up!)

Building a tracker

Object Re-identification

Identifying the same object in different camera views

challenges:

-Appearance changes 外观变化

-Illumination changes 光照变化

-Pose changes 姿势变化

-Occlusions 遮挡

-Resolution changes 分辨率变化

-Different camera viewpoints 不同计算机视角

Biometric Recognition-1 Theory

生物识别系统

Biometric modalities(生物识别形式)

可以被分为四类

Anatomical/Physiological - refer to a part of the human body 解剖/生理-指的是人体的一部分

OR

Behavioural -relate to the conduct of a person 行为-与一个人的行为有关

Genotypic -genetically defined 基因型-基因定义的

OR

Fenotypic -change over time, depend on the surrounding environment. 非典型性——随时间变化,取决于周围环境

人脸识别系统

人脸识别的挑战

Short term variability such as expression, pose, illumination, …

Long term variability such as aging, facial hair, make-up, occlusions by clothes/glasse

人脸识别的方法

眼周识别

虹膜识别

Daugman’s system

流程:

    1. 虹膜图像捕获:首先,系统捕获眼睛图像。
    2. 虹膜规格化和标准化:接着对捕获的虹膜图像进行规格化和标准化处理,以保证识别过程的一致性。
    3. 特征提取/编码:然后,系统从标准化的虹膜图像中提取特征,并将这些特征编码成二进制虹膜签名。
    4. 比较:这个编码与虹膜签名模板数据库中的模板进行比较
    5. 决策:最终,系统将基于比较结果做出识别决策

受限虹膜识别

非受限虹膜识别

指纹识别

识别流程:

  1. 登记(Enrollment):首先进行个人指纹的登记,过程中捕获指纹并生成生物识别样本。
  2. 模板提取(Template Extraction):从生物识别样本中提取特征,并创建一个模板。
  3. 模板存储(Template Storage):将提取的模板存储在数据库中。
  4. 系统访问(System Access):当需要验证身份时,再次捕获指纹并生成生物识别样本。
  5. 模板比较(Template Comparison):新捕获的生物识别样本与存储的模板进行比较。
  6. 结果(Result):最终根据比较结果确定身份是否验证,结果为“身份验证”或“未验证”。

Unimodal Biometrics(单模态生物特征)

Unimodal systems perform the recognition based in a single source of biometric information - a single trait. 单模态系统基于单一生物特征信息进行识别

Unimodal systems can be affected by:

Noise in the acquired biometric data; 在获取的生物特征数据中的噪声

Non-universality of a certain trait; 某一特征的非普遍性

Lack of individuality; 缺乏个体差异

Lack of invariant representation; 缺乏不变表示

Susceptibility to circumvention. 容易被规避

Multimodal Biometrics(多模态生物特征)

Overcome some limitations by combining multiple sources of biometric information.

Address the problem of non-universality.

Increase the resistance against spoofing.

Design of such system should consider:

-choice and number of biometric traits;

-level at which information is fused;

-methodology adopted to fuse;

-cost versus matching performance trade off.

通过结合多种来源的生物特征信息来克服一些限制。

解决非普遍性问题。

增加抗欺骗能力。

该系统的设计应考虑:

-生物特征的选择和数量;

-信息融合的层次;

-融合所采用的方法;

-成本与匹配性能的权衡。

Biometric recognition evaluation这里省略

Challenges and threats

There are many possible attacks on biometric systems

Anti-spoofing techniques(防欺骗技术)

  • 图表显示了防欺骗技术分为硬件级别(Hardware-based)和特征级别(Feature-based,即软件基础)。
  • 硬件级别进一步细分为:
    • 内在属性证明生物体活性(Intrinsic properties proving live body)
    • 非自愿信号的捕获(Involuntary signal capture of living body)
    • 挑战响应(Challenge-response)
    • 多模态(Multimodality)
  • 特征级别进一步细分为:
    • 静态(Static)
    • 动态(Dynamic)

Biometric Recognition-2 Applications

为什么使用生物特征

Currently most used methods:

-Based on Passwords, or ID/Swipe cards

-Can be Lost

-Can be forgotten

Biometrics:

-Uniqueness of individual physiological properties

-Robust

-Convenience

-Usability

-Speed

生物特征的特性

Universality: all people should possess this trait

Uniqueness: there should not be two persons with the same characteristic

Permanence: a characteristic should not change with time

Measurability: a characteristic needs to be measured quantitatively

Performance: relates to identification accuracy, time of identification and effects of technology on accuracy

Acceptability: depends on people’s willingness to accept a biometric system, e.g. not every culture allows for showing face

Circumvention: easiness of falsification

其中有很多应用场景,这里不作详细叙述

生物识别技术的挑战

  1. 生物特征获取的挑战:
  • 在非约束环境中获取生物特征的挑战,例如长距离、移动中、小目标、户外等情况。
  • 确保图像质量足够以进行识别。
  • 如何在图像质量较低的情况下保持识别精度。
  1. 安全性问题:
  • 防止假身份(例如,传感器级别的攻击,纸张、手持设备、硅胶、乳胶3D面具、隐形眼镜等欺骗攻击)。
  • 如何增强边境安全并阻止犯罪行为。
  • 检测各种欺骗尝试,并开发处理所有类型材料制作生物特征副本的算法。
  1. 可用性、隐私和伦理问题:
  • 处理损坏、变形身体部位、老化、化妆等问题。
  • 生物识别系统如何为所有年龄段的用户提供友好的使用体验,不引入侵扰性。
  • 如何确保用户的隐私和伦理权利,包括所有背景下的用户。

衰老

指纹采集挑战

虹膜采集挑战

欺骗

Behaviour Analysis Part I – Theory

Behaviour extraction methodologies(行为提取方法)

Rule-based methods: 略

Probabilstic methods:

前置概率知识

joint probability(联合概率)

Markov chains(马尔科夫链)

有初始概率和转移概率两种概率,计算公式如下

例1:

要计算一个序列的概率:

这里计算的四个球的颜色序列是 “红色, 红色, 绿色, 绿色”。这对应于观测序列 O = {S1, S1, S3, S3} 注意顺序!!!!!!

P (O|A, Π)  =  P (S1 ) · P (S1 |S1 ) · P (S3 |S1 ) · P (S3 |S 3 )

=  π 1 · a11 · a13 · a33

=  0.5 · 0.4 · 0.3 · 0.8 = 0.048

例2:

Bayesian Networks(贝叶斯网络)

The edges of the graph must form a directed acyclic graph (DAG)—a graph with no cyclic paths (no loops)

图的边必须形成一个有向无环图(DAG)——一个没有循环路径(没有环路)的图。

Arrows (directed edges) in the DAG can represent causal relations/dependencies between variables

DAG中的箭头(有向边)可以表示变量之间的因果关系/依赖关系

贝叶斯网络联合概率计算

一个例子

Soft computing methods

图中展示了三个集合X、Y和Z,以及它们之间的关系R1和R2,R1表示集合X到Y的关系,R2表示集合Y到Z的关系,这个示例说明了如何通过R1和R2的复合得到集合X到Z的关系。

这个公式表示在复合关系R1∘R2中,元素x和z之间隶属度的计算是通过取所有可能的中间y值,计算μ_R1(x, y)和μ_R2(y, z)的最小值,然后取这些最小值中的最大值。

一个例子:

Introduction to Deep Learning / Deep Neural Networks

什么是深度学习?与传统神经网络的区别——深度

每一层的节点都基于前一层的输出对不同的特征集进行训练

神经网络越深入,节点能够识别的特征就越复杂

深度学习

Deep nets can discover latent structures within unlabelled, unstructured data

-Input is a million images

-Cluster according to similarities

Convolutional Neural Net(卷积神经网络CNN)

Training Methodologies(训练方法):

Dropout:

全连接层容易过拟合(测试机上表现好,训练集上表现不好)

Dropout was introduced to prevent this dropout用来防止这个

-At each training iteration

-Nodes are randomly dropped 节点被随机丢弃

-Dropped nodes from previous iterations are re-added with their original weights 从先前迭代中删除的节点将重新添加其原始权重

Significantly decreases training time 极大减少了训练时间

Autoencoders(自编码器)

原因:传统分类过程(特征检测-特征提取-分类)的问题:1.例如 SIFT(尺度不变特征变换)这类传统特征计算成本高。 2.需要手动调整参数。3.计算复杂度高。

Autoencoders are a type of neural network used for unsupervised learning of efficient codings 自编码器是一种用于无监督学习高效编码的神经网络

Aims to reduce input data to ‘get rid’ of redundant data 旨在减少输入数据,以“摆脱”冗余数据

Dimensionality reduction 降维

Can be used as a replacement for traditional features 可以用来代替传统特征

Autoencoder网络结构

Create a network with multiple layers

Number of neurons must be less than number of inputs

Final layer has number of neurons equal to number of inputs

自编码器的数据处理:

中间层(通常是隐藏层)的数据量小于输入数据的数量,这意味着自编码器在这些层中压缩数据。

自编码器的训练方式:

网络被训练以复现原始输入,这是一种无监督学习,因为它使用输入数据作为标签。

自编码器的功能:

有效地训练网络以减少/压缩输入到有意义的编码形式。

New types of layers:

Convolutional Layers(卷积层)

Convolution Layer has a bank of filters/kernels that convolve with the inputs to the layer to produce an output

卷积层包含一组过滤器/核(filters/kernels),这些过滤器与输入层进行卷积操作以产生输出。

过滤器/核(Filter/Kernel):

  • 描述为一组可以只处理输入子集的小型权重集。例如,一个4x4的过滤器可以用于一个640x480像素的图像。

卷积(Convolve):

  • 一个更小的过滤器/核在整个输入上以特定的步幅(stride)进行乘法操作,例如,每两个像素点。

卷积层通过在整个图像上滑动过滤器来工作,过滤器中的每个权重与其覆盖的像素值相乘,并将结果求和得到一个输出值。这个过程在整个图像上重复,步幅决定了过滤器移动的像素数。这样的卷积操作能够有效提取图像的特征,用于后续的分类或其他视觉任务。通过这种方式,卷积神经网络能够学习到图像的空间层次特征。

Pooling(池化)

池化层的功能:

  • 减少后续层的计算量。

最大池化(Max Pooling):

  • 最常见的池化类型。
  • 对输入表示进行下采样,减少维度,对特征做出假设。

池化层与卷积层的协同作用:

  • 与卷积层中多组过滤器一起工作效果很好。

池化层通常跟在卷积层后面,用于降低特征图的空间大小,从而减少参数的数量和计算量,同时也使特征表示更加紧凑。最大池化是一种特别常见的池化技术,它通过从每个小区域(如2x2像素)中取最大值来下采样输入。这样做可以保持特征的显著性,同时提高模型对于小的位置变化的鲁棒性。

Rectified Linear Units (ReLU) - 一种激活函数

other activation function(激活函数) for a neuron:Linear Activation、Sigmoidal Activation

Relu公式:如果输入x为正,则输出x;如果为负,则输出0。

-f(x)=max(0,x)

ReLU的应用:

  • 经常在卷积层之后使用。
  • 证明了它可以简化训练并且不影响整体性能。

变体Relu

Problem

Applications of Deep Learning / Deep Neural Networks

Deep Fake (Visual)

Manipulating facial expressions in videos to either:

Change their face entirely

Change their expressions/facial movement

Semantic Style Transfer

Converts between different art styles

Generative algorithm based on combination of Markov Random Fields and Convolutional Neural Net aka Neural Patches

Originally published in early 2016, with many people iterating on design since for many uses

Neural Doodle – Implementation

Uses a Semantic Map to create drawings

Colourisation

Uses multiple Convolutional Networks to achieve coloration of greyscale images

Fusion of multiple networks

One network classifies an image (global)

One network extracts low level features (local)

Final set of layers produces a chrominance mapping to original image

Sketch Simplification(草图简化)

Turn raster graphics into vector graphics

Use lines/shapes instead of pixels

Clean up a sketch

Uses an innovative fully convolutional network

Downscales and upscales with convolution

Trained with pairs of drawings

Mitosis Detection

Deep and wide GPU-based multi-Column max-pooling convolutional neural network

Achieved 87.3% Accuracy

Better than consultants!   (in this study)

Zoom and Enhance

Technique using deeply-recursive convolutional network to perform super resolution

Combination of convolution and recursion

Stable Diffusion(稳定扩散)

Many possible tasks:

Text-to-Image synthesis

Image-to-image synthesis

Image-Inpainting

Style Change

  • 18
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值