<路径 clip-rule="evenodd" d="M33.377 4.574a3.508 3.508 0 0 0-2.633-1.126c-1 0-1.993.67-2.604 1.334l.002-1.24-1.867-.002-.02 10.17v.133l1.877.002.008-3.18c.567.611 1.464.97 2.462.973 1.099 0 2.022-.377 2.747-1.117.73-.745 1.1-1.796 1.103-3.002.003-1.232-.358-2.222-1.075-2.945Zm-3.082.55c.637 0 1.176.23 1.602.683.438.438.663 1.012.66 1.707-.003.7-.22 1.33-.668 1.787-.428.438-.964.661-1.601.661-.627 0-1.15-.22-1.6-.666-.445-.46-.662-1.086-.662-1.789.003-.695.227-1.27.668-1.708a2.13 2.13 0 0 1 1.596-.675h.005Zm5.109-.067-.008 4.291c-.002.926.263 1.587.784 1.963.325.235.738.354 1.228.354.376 0 .967-.146.967-.146l-.168-1.564s-.43.133-.64-.01c-.198-.136-.296-.428-.296-.866l.008-4.022 1.738.002.002-1.492-1.738-.002.005-2.144-1.874-.002-.005 2.143-1.573-.002 1.57 1.497ZM20.016 1.305h-9.245l-.002 1.777h3.695l-.016 8.295v.164l1.955.002-.008-8.459 3.621-.002V1.305Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M10.06 5.844 7.277 3.166 4.015.03 2.609 1.374l2.056 1.978-4.51 4.313 6.065 5.831 1.387-1.327-2.073-1.994 4.526-4.331ZM4.274 8.7a.211.211 0 0 1-.124 0c-.04-.013-.074-.03-.15-.102l-.817-.787c-.072-.069-.092-.104-.105-.143a.187.187 0 0 1 0-.12c.013-.039.03-.07.105-.143L5.76 4.938c.072-.07.108-.09.15-.099a.21.21 0 0 1 .123 0c.041.012.075.03.15.101L7 5.727c.072.07.093.104.103.144.013.04.013.08 0 .119-.013.04-.03.072-.106.143L4.422 8.601a.325.325 0 0 1-.147.099Z" fill="#204ECF" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M24.354 4.622a3.94 3.94 0 0 0-2.876-1.149 4.1 4.1 0 0 0-2.829 1.084c-.804.725-1.214 1.733-1.217 2.992-.002 1.26.405 2.267 1.207 2.995a4.114 4.114 0 0 0 2.832 1.094c.04.002.082.002.123.002a3.967 3.967 0 0 0 2.75-1.138c.538-.532 1.183-1.473 1.186-2.938.002-1.465-.637-2.408-1.176-2.942Zm-.59 2.94c-.003.73-.228 1.334-.671 1.794-.441.458-.99.69-1.633.69a2.166 2.166 0 0 1-1.614-.697c-.43-.45-.65-1.057-.65-1.797s.222-1.344.655-1.795a2.17 2.17 0 0 1 1.617-.69c.64 0 1.189.235 1.63.698.443.46.668 1.064.665 1.797ZM41.15 6.324c0-.458.25-1.465 1.632-1.465.49 0 .768.159 1.003.347.227.18.34.626.34.994v.174l-2.282.341C40.035 6.98 39 7.913 38.993 9.28c-.002.708.266 1.314.777 1.76.503.438 1.191.67 2.004.673 1.023 0 1.792-.354 2.341-1.084.003.31.003.621.003.91h1.903l.013-5.246c.002-.856-.289-1.685-.864-2.14-.567-.449-1.31-.679-2.386-.681h-.015c-.82 0-1.69.208-2.274.695-.689.572-1.027 1.478-1.027 2.178l1.682-.02Zm.864 3.814c-.676-.002-1.115-.371-1.112-.938.003-.589.43-.933 1.346-1.081l1.875-.305v.017c-.005 1.36-.87 2.307-2.102 2.307h-.008Zm4.917-8.712-.018 10.058v.044l1.684.005.018-10.06v-.045l-1.684-.002Zm2.654 9.491c0-.173.062-.322.19-.445a.645.645 0 0 1 .462-.186c.18 0 .338.062.465.186a.596.596 0 0 1 .193.445.583.583 0 0 1-.193.443.644.644 0 0 1-.465.183.634.634 0 0 1-.461-.183.59.59 0 0 1-.191-.443Zm.108 0c0 .146.052.273.158.376a.54.54 0 0 0 .389.154.539.539 0 0 0 .547-.53.498.498 0 0 0-.16-.373.531.531 0 0 0-.387-.156.531.531 0 0 0-.387.155.497.497 0 0 0-.16.374Zm.702.344-.176-.3h-.118v.3h-.109v-.688h.292c.144 0 .23.082.23.196 0 .096-.076.168-.176.188l.178.304h-.121Zm-.294-.596v.21h.167c.093 0 .14-.034.14-.104 0-.072-.047-.106-.14-.106h-.167Z" fill="#262D3D" fill-rule="evenodd">作者都是各自领域经过审查的专家,并撰写他们有经验的主题. 我们所有的内容都经过同行评审,并由同一领域的Toptal专家验证.< / div >< / div >
Teimur Gasanov<路径 clip-rule="evenodd" d="M1 2V22V23H2H22H23V22V14H22V22H2V2H10V1H2H1V2ZM22 9V2.70711L12.5 12.2071L11.7929 11.5L21.2929 2H15V1H22H23V2V9H22Z" fill="white" fill-rule="evenodd">
< / div >

Teimur Gasanov

< / div >
<路径 d="m2.3438,5.6562l-2.3438,2.3438,2.3438,2.3438v3.3137h3.3137l2.3425,2.3425,2.3425-2.3425h3.315v-3.315l2.3425-2.3425-2.3425-2.3425v-3.3137h-3.3138l-2.3437-2.3438-2.3438,2.3438h-3.3125v3.3125Zm5.0488,2.7528l2.754-2.7654.9705.9739-3.7245,3.7399-.9705-.9739-1.3672-1.3733.9705-.9752,1.3672,1.3739Z" fill="当前的Color"><路径 class="text-white dark:text-transparent" clip-rule="evenodd" d="M10.1465 5.64374L7.39254 8.4091L6.02535 7.03518L5.05485 8.01039L6.42204 9.38364L7.39254 10.3575L11.117 6.61761L10.1465 5.64374Z" fill="当前的Color" fill-rule="evenodd">验证专家 在工程< / div >< / div >< / div >< / div >

Teimur热衷于使用反应编写复合接口和使用Go构建可扩展api. 他擅长为非典型问题寻找解决方案.

< / div >< / div >

专业知识

数据科学机器学习< / div >< / div >

以前在

Klarna< / div >< / div >< / div >< / div >< / div >< / div >< / div >< / div >< / div >
<路径 clip-rule="evenodd" d="M5.8 7.2H1.9V18h3.9V7.2ZM6 3.9C6 2.9 5.2 2 4 2s-2.2.8-2.2 1.9c0 1 .8 1.8 2.1 1.8C5.2 5.7 6 5 6 4Zm5.7 4.8V7.2H8V18h3.8v-6c0-.4 0-.7.2-1 .3-.6.9-1.2 2-1.2 1.3 0 1.9 1 1.9 2.4V18h3.8v-6.2c0-3.3-1.9-4.9-4.4-4.9-2 0-3 1-3.5 1.8Z" fill="当前的Color" fill-rule="evenodd">< / div >
<路径 clip-rule="evenodd" d="M20.33 1.9c-.73.31-1.53.54-2.36.63.85-.5 1.5-1.3 1.8-2.23-.78.46-1.67.8-2.6.97a4.12 4.12 0 0 0-6.99 3.7A11.71 11.71 0 0 1 1.73.73 4.02 4.02 0 0 0 3 6.14a4.18 4.18 0 0 1-1.85-.52v.05c0 1.97 1.4 3.6 3.28 3.97a4.4 4.4 0 0 1-1.85.07 4.1 4.1 0 0 0 3.83 2.8A8.29 8.29 0 0 1 .33 14.2 11.71 11.71 0 0 0 6.63 16 11.5 11.5 0 0 0 18.29 4.51L18.28 4c.8-.58 1.5-1.29 2.05-2.09Z" fill="当前的Color" fill-rule="evenodd">< / div >
<路径 clip-rule="evenodd" d="M14.2 2.1 12 2C9.8 2 8.3 3.3 8.3 5.8v2H5.8v2.9h2.5V18h3v-7.3h2.4l.4-2.8h-2.9V6c0-.8.3-1.3 1.4-1.3h1.6V2Z" fill="当前的Color" fill-rule="evenodd">< / div >< / div >分享< / div >< / div >< / div >
< div >

机器学习, 计算机视觉, 构建强大的api, 创造美丽的ui是令人兴奋的领域,见证了许多创新.

前两者需要广泛的数学和科学知识, 而API和UI开发则以算法思维和设计灵活的架构为中心. 它们非常不同,所以决定你接下来想学哪一种可能很有挑战性. 本文的目的是演示如何在创建图像处理应用程序时使用这四种方法.

我们要构建的应用程序是一个简单的数字识别器. You draw, 的 machine p红色的icts 的 digit. 简单是必不可少的,因为它让我们看到大局,而不是专注于细节.

为了简单起见,我们将使用最流行且易于学习的技术. 的 machine learning part will use Python 对于后端应用程序. As for 的 应用程序’s interactional side, 我们将通过一个无需介绍的JavaScript库来操作: 反应.

机器学习 to Guess Digits

我们的应用程序的核心部分是算法猜测抽到的数字. 机器学习将成为实现良好猜测质量的工具. 这种基本的人工智能允许系统在给定的数据量下自动学习. 从广义上讲, 机器学习是一个在数据中找到一个巧合或一组巧合的过程,并依靠它们来猜测结果.

我们的图像识别过程包含三个步骤:

  • Get images of drawn 数字 for 培训
  • 通过训练数据训练系统猜测数字
  • Test 的 system with new/unknown data

环境

我们需要一个 虚拟环境 to work with machine learning in Python. 这种方法是实用的,因为它管理所有必需的Python包, so you don’t need to worry about 的m.

让我们用下面的终端命令安装它:

Python3 -m virtualenv
source virtualenv/bin/activate

培训模式

在开始编写代码之前,我们需要为我们的机器选择一个合适的“老师”. 通常,数据科学专业人员在选择最佳模型之前会尝试不同的模型. 我们将跳过非常先进的模型,需要大量的技能和继续与 k-nearest 邻居 algorithm.

它是一种算法,它获得一些数据样本,并将它们排列在一个平面上,按照给定的一组特征排序. 为了更好地理解它,让我们看看下面的图片:

图片:机器学习数据样本排列在一个平面上
< / div >

的类型 绿点, we should check 的 types of k 最近邻 k 是参数集吗?. Considering 的 image above, if k is equal to 1, 2, 3, or 4, 的 guess will be a 黑色的三角形 as most of 的 绿色 dot’s closest k 邻居 are black triangles. 如果我们增加 k 到5,那么大多数物体是蓝色方块,因此猜测将是a 蓝色的正方形.

创建我们的机器学习模型需要一些依赖关系:

  • sklearn.邻居.KNeighborsClassifier 是我们将要使用的分类器吗.
  • sklearn.模型_selection.train_test_split 这个函数会帮助我们把数据分成训练数据和用来检查模型正确性的数据吗.
  • sklearn.模型_selection.cross_val_分数 函数是否为模型的正确性获得标记. 的 higher 的 value, 的 better 的 correctness.
  • sklearn.指标.classification_回购rt 函数是显示模型猜测的统计报告吗.
  • sklearn.数据集 是用来获取训练数据的包(数字图像).
  • numpy 是一个在科学领域广泛使用的包,因为它提供了一种高效和舒适的方式来操作Python中的多维数据结构.
  • matplotlib.pyplot is 的 package used to visualize data.

让我们从安装和导入它们开始:

pip install sklearn numpy matplotlib scipy

从sklearn.数据集导入load_数字
从sklearn.邻居 import KNeighborsClassifier
从sklearn.导入train_test_split, cross_val_分数
导入numpy为np
进口matplotlib.Pyplot为PLT 

现在,我们需要加载 MNIST数据库. MNIST是机器学习领域成千上万新手使用的手写图像的经典数据集:

Digits = load_数字()

Once 的 data is fetched 和 ready, 我们可以进入下一步,将数据分成两部分: 培训测试.

我们将使用75%的数据来训练我们的模型来猜测数字,我们将使用其余的数据来测试模型的正确性:

(X_train, X_test, y_train, y_test) =
    数字.数据,数字.目标,test_size = 0.25日,r和om_state = 42
)

数据现在已经整理好了,我们可以使用它了. We’ll try to find 的 best parameter k for our 模型 so 的 guesses will be more precise. 我们不能保留 k 在这个阶段,价值离开了我们的头脑,因为我们必须用不同的模型来评估 k 值.

让我们看看为什么必须考虑一个范围 k 值以及这如何提高我们模型的准确性:

Ks = np.(2) 10)不等
分数= []
对于k中的k:
    模型 = KNeighborsClassifier(n_邻居=k)
    得分= cross_val_分数(模型, X_train, y_train, cv=5)
    分数.意思是()
    分数.追加(得分.意思是())

plt.情节(分数,ks)
plt.包含(精度)
plt.ylabel(“k”)
plt.显示()

执行此代码将向您展示下面的图,该图描述了算法的精度与不同 k 值.

图:用于测试不同k值下算法精度的图.
< / div >

如你所见,a k 3的值确保我们的模型和数据集的最佳精度.

使用Flask构建API

应用程序核心是一种从图像中预测数字的算法,现在已经准备好了. 接下来,我们需要用API层修饰算法,使其可用. 让我们用流行的 Flask web框架 to do this cleanly 和 concisely.

我们将从在虚拟环境中安装Flask和与图像处理相关的依赖开始:

pip install Flask Pillow scikit-image

安装完成后,我们开始创建应用程序的入口点文件:

触摸应用程序.py

的 content of 的 file will look like this:

进口操作系统

从烧瓶导入烧瓶
from views import P红色的ictDigitView, IndexView

应用程序 = Flask(__name__)

应用程序.add_url_rule (
    / api /预测,
    view_func = P红色的ictDigitView.as_view(“p红色的ict_digit”),
    方法=(“文章”)
)

应用程序.add_url_rule (
    '/',
    view_func = IndexView.as_view(“指数”),
    方法=(“得到”)
)

如果__name__ == 'main':
    端口= int(os.环境.(“端口”,5000))
    应用程序.(主机运行= ' 0.0.0.0,端口=端口)

You will get an error saying that P红色的ictDigitViewIndexView 没有定义. 下一步是创建一个文件来初始化这些视图:

从flask中导入render_template、request、Response
从瓶.View导入MethodView, View

从瓶.views import视图

from 回购 import Classifier回购
from services import P红色的ictDigit服务
from settings import CLASSIFIER_STORAGE

类IndexView(观点):
    def dispatch_request(自我):
        返回render_template(指数.html”)

class P红色的ictDigitView(MethodView):
    def post(自我):
        回购 = Classifier回购(CLASSIFIER_STORAGE)
        service = P红色的ictDigit服务(回购)
        Image_data_uri =请求.json('图像')
        预测=服务.处理(image_data_uri)
        return Response(str(p红色的iction).编码(),状态= 200)

我们将再次遇到关于未解析导入的错误. 的 的观点 package relies on three files we do not have yet:

  • 设置
  • 回购
  • 服务

We’ll implement 的m one by one.

设置 模块是否具有配置和常量变量. 它将为我们存储序列化分类器的路径. 这引出了一个合乎逻辑的问题: 为什么 do I need to save 的 classifier?

因为这是一种提高应用性能的简单方法. 而不是每次收到请求时都训练分类器, we’ll store 的 classifier’s prepa红色的 version, enabling it to work out of 的 box:

进口操作系统

BASE_DIR = os.getcwd ()
CLASSIFIER_STORAGE = os.路径.join(BASE_DIR, 'storage/classifier.txt”)

设置机制——获取分类器——将在我们列表中的下一个包中初始化, 的 回购. 它是一个类,有两个方法来检索和更新使用Python内置的训练分类器 泡菜 模块:

进口泡菜

类Classifier回购:
    Def __init__(自我, storage):
        自我.存储器

    def(自我):
        打开(自我.存储,'wb')作为输出:
            试一试:
                Classifier_str = out.read ()
                如果classifier_str != '':
                    返回泡菜.负载(classifier_str)
                其他:
                    回来没有
            除了例外:
                回来没有

    def update(自我, classifier):
        打开(自我.存储,'wb'),如:
            泡菜.in_转储(标识符)

We are close to finalizing our API. 现在它只缺少 服务 模块. 它的目的是什么?

  • Get 的 trained classifier from storage
  • 将从UI传递的图像转换为分类器可以理解的格式
  • 通过分类器对格式化后的图像进行预测
  • 返回预测

让我们编写这个算法:

从sklearn.数据集导入load_数字

from classifier import ClassifierFactory
from image_processing import process_image

类P红色的ictDigit服务:
    Def __init__(自我, 回购):
        自我.回购=回购

    def h和le(自我, image_data_uri):
        分类器=自我.回购.get ()
        如果classifier为None:
            Digits = load_数字()
            classifier = ClassifierFactory.create_with_fit (
                数字.数据,
                数字.目标
            )
            自我.回购.更新(标识符)
        
        x = process_image(image_data_uri)
        如果x为None:
            返回0

        预测=分类器.预测(x) [0]
        回归预测

这里你可以看到 P红色的ictDigit服务 有两个依赖项: ClassifierFactoryprocess_image.

我们将首先创建一个类来创建和训练我们的模型:

从sklearn.模型_selection import train_test_split
从sklearn.邻居 import KNeighborsClassifier

类ClassifierFactory:
    @staticmethod
    def create_with_fit (数据、目标):
        模型 = KNeighborsClassifier(n_邻居=3)
        模型.fit(数据、目标)
        回归模型

API已经准备好进行操作了. Now we can proceed to 的 图像处理 step.

图像处理

图像处理是对图像进行某些操作以增强图像或从中提取有用信息的一种方法. 在我们的例子中, 我们需要将用户绘制的图像平滑地转换为机器学习模型格式.

Image alt:将绘制的图像转换为机器学习格式.
< / div >

Let’s import some helpers to achieve that goal:

导入numpy为np
从skimage导入曝光
进口base64
from PIL import Image, ImageOps, ImageChops
从io导入BytesIO

我们可以将这种转变分为六个不同的部分:

1. Replace a transparent background with a color

图像alt:替换示例图像的背景.
< / div >

def replace_transparent_background(image):
    Image_arr = np.数组(图片)

    如果len (image_arr.形状)== 2:
        返回图像

    Alpha1 = 0
    r2, g2, b2, alpha2 = 255, 255, 255, 255

    红色的, 绿色, 蓝色的, Alpha = image_arr [:], :, 0], image_arr [:, :, 1], image_arr [:, :, 2], image_arr [:, :, 3]
    掩码= (alpha == alpha1)
    image_arr [:, :, :4][mask] = [r2, g2, b2, alpha2]

    返回图像.fromarray (image_arr)

2. 修剪开放的边界

Image: Trimming 的 borders on a sample image.
< / div >

def trim_borders(图片):
    bg =图像.新(图片.模式,形象.大小,图像.获取像素((0,0)))
    diff = ImageChops.差异(形象,bg)
    diff = ImageChops.加上(diff, diff, 2.0, -100)
    Bbox = diff.getbbox ()
    如果bbox:
        返回图像.作物(bbox)
    
    返回图像

3. 添加相等大小的边框

图像:为样本图像添加预设大小相等的边框.
< / div >

def pad_image(图片):
    返回ImageOps.exp和(image, border=30, fill='#fff')

4. Convert 的 image to grayscale mode

def to_grayscale(图片):
    返回图像.转换(“L”)

5. 反色

Image: Inverting 的 colors of 的 sample image.
< / div >

def invert_colors(图片):
    返回ImageOps.转化(图片)

6. Resize 的 image to 8x8 format

Image: Resizing 的 sample image to an 8x8 format.
< / div >

def resize_image(图片):
    返回图像.调整((8,8),图像.线性)

现在可以测试应用程序了. 运行应用程序并输入下面的命令以发送请求 这个库存图像 到API:

Image: Stock image of a h和-drawn number eight.
< / div >

出口FLASK_APP =应用
瓶运行
curl "http://localhost:5000/api/p红色的ict" -X "POST" -H "Content-Type: 应用程序lication/json" -d "{\"image\": \"data:image/png,美元(curl http://media.istockphoto.com/vectors/number-eight-8-h和-drawn-with-dry-brush-vector-id484207302?k=6&m=484207302&s=170667a&w=0&h=s3YANDyuLS8u2so-uJbMA2uW6fYyyRkabc1a6OTq7iI=" | base64 " \"}" -i

You should see 的 following output:

HTTP / 1.1100继续

HTTP / 1.0 200 OK
Content-Type: text/html; charset=utf-8
内容长度:1
服务器:Werkzeug / 0.14.1 Python / 3.6.3
Date: Tue, 27 Mar 2018 07:02:08 GMT

8

样本图像描绘了数字8,我们的应用程序正确地识别了它.

Creating a Drawing Pane Via 反应

为了快速引导前端应用程序,我们将使用 CRA样板:

create-react-应用程序前端
cd前端

在设置工作场所之后,我们还需要一个依赖项来绘制数字. 的 react-sketch package matches our needs perfectly:

NPM I反应-草图

的 应用程序lication has only one component. We can divide this component into two parts: 逻辑和视图.

视图部分负责表示绘图窗格, 提交重置 按钮. 当交互时,我们也应该表示预测或错误. 从逻辑上看,它有以下职责: 提交的图片清除草图.

每当用户点击 提交,该组件将从草图组件中提取图像,并调用API模块 makeP红色的iction 函数. 如果对后端的请求成功,我们将设置预测状态变量. O的rwise, we’ll update 的 error state.

当用户点击时 重置,草图就会清晰:

import 反应, { useRef, useState } from "react";

import { makeP红色的iction } from "./ api”;

const App = () => {
  const sketchRef = useRef(null);
  const [error, setError] = useState();
  const [p红色的iction, setP红色的iction] = useState();

  const h和le提交 = () => {
    const image = sketchRef .草图.当前的.toDataURL ();

    setP红色的iction(定义);
    setError(定义);

    makeP红色的iction(图片).然后(setP红色的iction).抓住(setError);
  };

  const h和leClear = (e) => sketchRef.当前的.明确的();

  返回null
}

逻辑是充分的. Now we can add 的 visual interface to it:

import 反应, { useRef, useState } from "react";
从“react-sketch”中导入{SketchField, 工具};

import { makeP红色的iction } from "./ api”;

从“./标识.svg”;
进口”./应用程序.css”;

const pixels = (count) => `${count}px`;
const percents = (count) => `${count}%`;

const MAIN_CONTAINER_WIDTH_PX = 200;
const MAIN_CONTAINER_HEIGHT = 100;
const MAIN_CONTAINER_STYLE = {
  width: pixels(MAIN_CONTAINER_WIDTH_PX),
  height: percents(MAIN_CONTAINER_HEIGHT),
  边距:"0 auto",
};

const SKETCH_CONTAINER_STYLE = {
  边框:"1px纯黑色",
  width: pixels(MAIN_CONTAINER_WIDTH_PX - 2),
  height: pixels(MAIN_CONTAINER_WIDTH_PX - 2),
  写成backgroundColor:“白”,
};

const App = () => {
  const sketchRef = useRef(null);
  const [error, setError] = useState();
  const [p红色的iction, setP红色的iction] = useState();

  const h和le提交 = () => {
    const image = sketchRef .草图.当前的.toDataURL ();

    setP红色的iction(定义);
    setError(定义);

    makeP红色的iction(图片).然后(setP红色的iction).抓住(setError);
  };

  const h和leClear = (e) => sketchRef.当前的.明确的();

  回报(
    
logo

Draw a digit

{预测 &&

P红色的icted value is: {预测}

} {错误 &&

Something went wrong

}
); }; 导出默认App;

组件准备好了,通过执行并转到来测试它 localhost: 3000 后:

NPM运行启动

的 demo 应用程序lication is available 在这里. You can also browse 的 source code on GitHub.

结束

这个分类器的质量并不完美,我并不假装它是完美的. 我们用于训练的数据和来自UI的数据之间的差异是巨大的. 尽管如此,我们在不到30分钟的时间内从零开始创建了一个可工作的应用程序.

图片:动画显示最终的应用程序识别手写数字.
< / div >

在这个过程中,我们在四个方面磨练了自己的技能:

  • 机器学习
  • 后端开发
  • 图像处理
  • 前端开发

对于能够识别手写数字的软件来说,并不缺乏潜在的用例, 从教育和行政软件到邮政和金融服务.

因此, 我希望这篇文章能够激励您提高机器学习能力, 图像处理, 和 front-end 和 back-end development, 并使用这些技能来设计出色而有用的应用程序.

如果你想拓宽你在机器学习和图像处理方面的知识, 你可能想看看我们的 Adversarial 机器学习 Tutorial.

< / div >< / div >< / div >< / div >

Fur的r Reading on 的 Toptal 博客:

< / div >

了解基本知识

  • What is MNIST in machine learning?

    MNIST是计算机视觉领域最流行的入门级数据集之一. 它包含成千上万的手写数字图像.

    < / div >< / div >
  • What is 培训 in machine learning?

    机器学习 模型s learn from data. 为了使模型足够智能,我们需要提供具有预期结果的数据. 模型将使用这些数据来检测数据参数与期望结果之间的关系.

    < / div >< / div >
  • What is 图像处理 in machine learning?

    图像处理是对图像进行某些操作以获得增强图像或提取有用信息的一种方法.

    < / div >< / div >
< / div >< / div >

标签

< / div >< / div >< / div >< / div >
Hire a Toptal expert on this topic.< / div >现在雇佣< / div >< / div >
Teimur Gasanov<路径 clip-rule="evenodd" d="M1 2V22V23H2H22H23V22V14H22V22H2V2H10V1H2H1V2ZM22 9V2.70711L12.5 12.2071L11.7929 11.5L21.2929 2H15V1H22H23V2V9H22Z" fill="white" fill-rule="evenodd">
< / div >

Teimur Gasanov

<路径 d="m2.3438,5.6562l-2.3438,2.3438,2.3438,2.3438v3.3137h3.3137l2.3425,2.3425,2.3425-2.3425h3.315v-3.315l2.3425-2.3425-2.3425-2.3425v-3.3137h-3.3138l-2.3437-2.3438-2.3438,2.3438h-3.3125v3.3125Zm5.0488,2.7528l2.754-2.7654.9705.9739-3.7245,3.7399-.9705-.9739-1.3672-1.3733.9705-.9752,1.3672,1.3739Z" fill="当前的Color"><路径 class="text-white dark:text-transparent" clip-rule="evenodd" d="M10.1465 5.64374L7.39254 8.4091L6.02535 7.03518L5.05485 8.01039L6.42204 9.38364L7.39254 10.3575L11.117 6.61761L10.1465 5.64374Z" fill="当前的Color" fill-rule="evenodd">验证专家 在工程< / div >< / div >< / div >

Bishkek, Chuy Province, Kyrgyzstan

2018年5月1日成为会员

< / div >< / div >< / div >

作者简介

Teimur热衷于使用反应编写复合接口和使用Go构建可扩展api. 他擅长为非典型问题寻找解决方案.

< / div >< / div >
<路径 clip-rule="evenodd" d="M32.2841 4.61667C31.5969 3.86366 30.7379 3.4762 29.729 3.4762C28.7567 3.4762 27.7953 4.15609 27.1995 4.82502L27.2032 3.57124L25.3901 3.56758L25.3682 13.8574V13.9926L27.1922 13.9963L27.1995 10.7796C27.7515 11.3973 28.6214 11.7592 29.5901 11.7629C30.6575 11.7629 31.553 11.3827 32.2548 10.6334C32.964 9.88037 33.3222 8.81667 33.3259 7.59578C33.3295 6.3493 32.9786 5.34774 32.2841 4.61667ZM29.294 5.17228C29.9118 5.17228 30.4345 5.40622 30.8475 5.86314C31.2716 6.30544 31.4909 6.88664 31.4872 7.59212C31.4836 8.30126 31.2752 8.93729 30.8402 9.39787C30.4235 9.84016 29.9045 10.0668 29.2867 10.0668C28.6799 10.0668 28.1718 9.84382 27.7332 9.39421C27.3018 8.92998 27.0898 8.29395 27.0898 7.58481C27.0935 6.88298 27.3092 6.30178 27.7368 5.85583C28.1682 5.39526 28.6763 5.17228 29.2867 5.17228H29.294Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M34.2507 5.10654L34.2433 9.4491C34.2397 10.3849 34.4992 11.0538 35.0037 11.434C35.318 11.6716 35.7201 11.7922 36.1953 11.7922C36.5608 11.7922 37.1347 11.646 37.1347 11.646L36.9702 10.0632C36.9702 10.0632 36.5535 10.1984 36.3488 10.0522C36.1551 9.91333 36.0601 9.6209 36.0601 9.17495L36.0674 5.10654L37.7561 5.11019L37.7598 3.60053L36.071 3.59688L36.0747 1.42925L34.258 1.4256L34.2543 3.59322L32.7264 3.58957L34.2507 5.10654Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M19.3149 1.31226H10.341L10.3373 3.10703H13.9232L13.9086 11.4997V11.6642L15.8058 11.6679L15.7984 3.11069L19.3149 3.10703V1.31226Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M9.65013 5.90338L3.78329 0.0255737L2.41619 1.38171L4.41201 3.38119L0.0328979 7.74567L5.92167 13.6418L7.26684 12.3002L5.25274 10.2825L9.65013 5.90338ZM4.03551 8.7911C3.9953 8.80207 3.95509 8.80207 3.91488 8.7911C3.87467 8.78014 3.84178 8.76186 3.76867 8.68875L2.97546 7.89189C2.906 7.82244 2.88407 7.78588 2.87311 7.74567C2.86214 7.70546 2.86214 7.66526 2.87311 7.62505C2.88407 7.58484 2.90235 7.55194 2.97546 7.47883L5.47572 4.98223C5.54517 4.91278 5.58172 4.89085 5.62193 4.88353C5.66214 4.87257 5.70235 4.87257 5.74256 4.88353C5.78277 4.8945 5.81567 4.91278 5.88877 4.98588L6.68198 5.78275C6.75144 5.8522 6.77337 5.88876 6.78068 5.92896C6.79164 5.96917 6.79164 6.00938 6.78068 6.04959C6.76971 6.0898 6.75144 6.1227 6.67833 6.1958L4.17807 8.69241C4.10862 8.76186 4.07572 8.77648 4.03551 8.7911Z" fill="#204ECF" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M23.5259 4.66425C22.7838 3.89662 21.7713 3.4726 20.7332 3.50185C19.6841 3.50185 18.7593 3.87104 17.988 4.59845C17.2057 5.33318 16.8073 6.34936 16.8073 7.62508C16.8073 8.9008 17.2021 9.91699 17.9807 10.6554C18.7556 11.3864 19.6804 11.7593 20.7295 11.7629C20.7697 11.7666 20.8099 11.7666 20.8501 11.7666C21.8298 11.7666 22.8021 11.3462 23.5185 10.6152C24.0413 10.0778 24.6663 9.12743 24.67 7.64336C24.6736 6.15929 24.0486 5.20524 23.5259 4.66425ZM22.952 7.6397C22.9483 8.37808 22.7326 8.98853 22.3013 9.45641C21.8736 9.92064 21.3399 10.1546 20.7185 10.1546C20.1081 10.1509 19.5781 9.91699 19.1504 9.4491C18.7337 8.99218 18.518 8.38174 18.518 7.63239C18.518 6.88304 18.7337 6.2726 19.154 5.81568C19.5817 5.35145 20.1118 5.11751 20.7222 5.11751C21.3436 5.11751 21.8773 5.35511 22.305 5.82299C22.7363 6.28722 22.9556 6.89767 22.952 7.6397Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M39.8287 6.3859C39.8287 5.92167 40.07 4.90549 41.4115 4.90549C41.8867 4.90549 42.1572 5.06632 42.3838 5.2564C42.6032 5.43917 42.7128 5.88878 42.7128 6.26162V6.43708L40.4977 6.78434C38.7431 7.05118 37.7379 7.99426 37.7306 9.37598C37.7269 10.0924 37.9901 10.7065 38.4836 11.1561C38.9734 11.5984 39.6387 11.836 40.4282 11.836C41.4225 11.836 42.1682 11.4778 42.7019 10.7394C42.7055 11.0538 42.7055 11.3682 42.7055 11.6606H44.5515L44.5624 6.35301C44.5661 5.48669 44.281 4.64961 43.7253 4.18904C43.1734 3.73577 42.4533 3.50183 41.4115 3.50183H41.3969C40.6 3.50183 39.7556 3.71384 39.1891 4.20366C38.5201 4.7812 38.1911 5.6987 38.1911 6.40784L39.8287 6.3859ZM40.6658 10.246C40.0115 10.2423 39.5838 9.86946 39.5875 9.29557C39.5911 8.69974 40.0042 8.35248 40.8924 8.20261L42.7128 7.89557V7.91384C42.7092 9.28825 41.8684 10.246 40.6731 10.246H40.6658V10.246Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M45.4397 1.43286L45.425 11.6057V11.6532L47.059 11.6569L47.0773 1.48038V1.43652L45.4397 1.43286Z" fill="#262D3D" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M48.5284 10.436C48.5284 10.0997 48.6454 9.8073 48.8867 9.56604C49.1279 9.32479 49.4167 9.20416 49.7493 9.20416C50.0856 9.20416 50.3817 9.32479 50.6193 9.56604C50.8606 9.8073 50.9812 10.0961 50.9812 10.436C50.9812 10.7796 50.8606 11.0647 50.6193 11.2987C50.3781 11.5399 50.0893 11.6569 49.7493 11.6569C49.4094 11.6569 49.1206 11.5399 48.8867 11.2987C48.6491 11.0647 48.5284 10.7796 48.5284 10.436ZM48.7331 10.436C48.7331 10.7211 48.8282 10.966 49.0292 11.1707C49.2266 11.3681 49.4679 11.4705 49.7566 11.4705C50.0418 11.4705 50.283 11.3681 50.4804 11.1707C50.6778 10.9697 50.7801 10.7284 50.7801 10.436C50.7801 10.1472 50.6778 9.90599 50.4804 9.7086C50.283 9.50756 50.0418 9.40521 49.7566 9.40521C49.4715 9.40521 49.2303 9.50756 49.0329 9.7086C48.8318 9.90599 48.7331 10.1472 48.7331 10.436ZM50.0454 11.1049L49.7164 10.5201H49.4935V11.1049H49.2924V9.76343H49.8371C50.1076 9.76343 50.2684 9.92427 50.2684 10.1436C50.2684 10.33 50.1295 10.4726 49.9394 10.5091L50.2721 11.1013H50.0454V11.1049ZM49.4935 9.94254V10.3519H49.8078C49.9833 10.3519 50.0673 10.2861 50.0673 10.1509C50.0673 10.012 49.9796 9.94254 49.8078 9.94254H49.4935Z" fill="#262D3D" fill-rule="evenodd">作者都是各自领域经过审查的专家,并撰写他们有经验的主题. 我们所有的内容都经过同行评审,并由同一领域的Toptal专家验证.< / div >

专业知识

数据科学机器学习< / div >< / div >

以前在

Klarna< / div >< / div >
雇佣Teimur< / div >< / div >< / div >
< / div >< / div >
< / div >
< / div >
< / div >< / div >< / div >< / div >< / div >
< / div >< / div >
< / div >

World-class articles, delive红色的 weekly.

< / div >

By entering your email, you are agreeing to our 隐私政策.

< / div >< / div >< / div >< / div >< div >
< / div >

World-class articles, delive红色的 weekly.

< / div >

By entering your email, you are agreeing to our 隐私政策.

< / div >< / div >< / div >< / div >< / div >< / div >< / div >

Toptal开发者

< / div >< / div >

加入总冠军® 社区.

聘请开发人员 or 申请成为发展商< / div >< / div >< / div >