Salt Pepper噪声以及使用median filter来减少噪声

处理图像时,我们用的图片往往都会有很多噪声。在黑暗中或是设备感光器受到影响,拍出来的图像就会有很多噪声,俗称“噪点”,Salt & Pepper就是其中一种。为什么会叫盐和胡椒粉?因为这些噪声不是白的就是黑的,看起来很像是在图片上撒了盐和胡椒粉,而更专业点的会叫它脉冲噪声,这是在图像信号中突然且尖锐的(sudden and sharp)扰动导致图片变得粗糙。

Read More

神经网络-初识Perceptron感知器

人工神经网络的实现和背后的思想,都是来自于人类大脑,初中生物课上讲膝跳反射其实就能很好地解释人脑是如何工作的。

上图可知,人类神经系统由三部分构成,Receptors接收到外部环境的刺激后,将这种刺激转换成电脉冲信号传送到Neural net,经过处理,将电脉冲信号发送给Effectors,最后生成可识别的响应。整个环节中有两个方向:

Read More

What are the difficulties in avoiding direct discrimination on the basis of a protected characteristic (e.g. gender) when creating AI systems?

This is my formative writing task in Ethics and Regulation of Artificial Intelligence(LAWM161) at University of Surrey.

Professor: Mikolaj Barczentewicz

Over the past few years, lots of services or products with artificial intelligence have come to people’s life. After several waves of research in Artificial Intelligence, some AI technologies have been emerging like Machine Learning, Deep learning and Neural Networks. Although great progress has been made, research on ethics and laws still lags behind the development of technology. Besides, it turns out that prejudice and discrimination between people will also appear in AI systems easily due to the wide spread of AI systems. There are many reasons for discrimination. In the training process of the AI model, some inappropriate training data may be used, which may contain discrimination information. At the same time, the designer of the AI system will also entrain some personal emotions when designing. Or the idea that the decision made by the Ai system is discriminatory. Even the wrong use of the AI system by users will make them feel treated differently. In this article, I will focus on the direct discrimination when creating an AI system, and discuss some difficulties to decrease direct discrimination.

Read More

关于Laravel框架中Guard的底层实现

1. 什么是Guard

Laravel/Lumen框架中,用户的登录/注册的认证基本都已经封装好了,开箱即用。而登录/注册认证的核心就是:

  1. 用户的注册信息存入数据库(登记)
  2. 从数据库中读取数据和用户输入的对比(认证)

上述两步是登录/注册的基本,可以看到都会涉及到数据库的操作,这两步框架底层已经帮我们做好了,而且考虑到了很多情况,比如用户认证的数据表不是user表而是admin_user,认证字段是phone而不是email,等等一些问题都是Guard所要解决的,通过Guard可以指定使用哪个数据表什么字段等,Guard能非常灵活的构建一套自己的认证体系。

Read More