<路径 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近邻算法.

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

图片:机器学习数据样本排列在一个平面上
< / 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 邻居是黑色三角形. 如果我们增加 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
从瓶.views import MethodView, View

从瓶.views import视图

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

类IndexView(观点):
    def dispatch_request(自我):
        return render_template('index.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="M33.3773 4.57431C32.6681 3.82937 31.7836 3.44824 30.7443 3.44824C29.7438 3.44824 28.7509 4.11893 28.1397 4.7822L28.1423 3.54229L26.2753 3.53981L26.2546 13.7091V13.8427L28.132 13.8452L28.1397 10.665C28.7071 11.2763 29.6045 11.6351 30.6025 11.6376C31.7011 11.6376 32.6243 11.2614 33.3489 10.5214C34.0787 9.7765 34.4501 8.72468 34.4527 7.51941C34.4552 6.28692 34.0942 5.29697 33.3773 4.57431ZM30.2956 5.12373C30.9326 5.12373 31.4716 5.3539 31.8971 5.8068C32.3355 6.24485 32.5598 6.81902 32.5572 7.51446C32.5547 8.21485 32.338 8.84347 31.8893 9.30132C31.4613 9.73938 30.9249 9.96212 30.2879 9.96212C29.6612 9.96212 29.1377 9.74185 28.689 9.29637C28.2429 8.83605 28.0263 8.2099 28.0263 7.50704C28.0289 6.8116 28.2532 6.23743 28.6942 5.79937C29.1377 5.344 29.6612 5.12373 30.2905 5.12373H30.2956Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M35.4042 5.05701L35.3965 9.34845C35.3939 10.2741 35.6595 10.9348 36.1805 11.311C36.5054 11.5461 36.918 11.6649 37.408 11.6649C37.7845 11.6649 38.375 11.5189 38.375 11.5189L38.2074 9.95479C38.2074 9.95479 37.7767 10.0884 37.5679 9.94489C37.3693 9.80877 37.2713 9.51674 37.2713 9.07869L37.279 5.05701L39.0171 5.05949L39.0197 3.56714L37.2816 3.56466L37.2868 1.42142L35.412 1.41895L35.4068 3.56219L33.8337 3.55971L35.4042 5.05701Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M20.0164 1.30518H10.7714L10.7688 3.08214H14.4642L14.4488 11.3779V11.5413L16.4035 11.5437L16.3958 3.08461L20.0164 3.08214V1.30518Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M10.0597 5.844L7.27721 3.16619C7.25142 3.14144 4.01502 0.0305176 4.01502 0.0305176L2.60957 1.37438L4.66488 3.3518L0.154541 7.66551L6.2199 13.4963L7.6073 12.1698L5.53393 10.175L10.0597 5.844ZM4.27548 8.70001C4.23422 8.71238 4.19295 8.71238 4.15169 8.70001C4.11043 8.68763 4.07691 8.67031 4.00212 8.59854L3.18464 7.81153C3.11243 7.74223 3.0918 7.70758 3.07891 7.66799C3.06601 7.62839 3.06601 7.58879 3.07891 7.54919C3.0918 7.50959 3.10985 7.47742 3.18464 7.40565L5.76087 4.9382C5.83308 4.8689 5.86918 4.8491 5.91044 4.8392C5.9517 4.82683 5.99296 4.82683 6.03422 4.8392C6.07548 4.85158 6.10901 4.8689 6.18379 4.94067L7.00128 5.72768C7.07348 5.79698 7.09411 5.83163 7.10443 5.87123C7.11732 5.91082 7.11732 5.95042 7.10443 5.99002C7.09153 6.02962 7.07348 6.06179 6.9987 6.13356L4.42247 8.60101C4.35284 8.67031 4.31674 8.68763 4.27548 8.70001Z" fill="#204ECF" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M24.3541 4.6215C23.5882 3.86172 22.5464 3.44346 21.4788 3.47316C20.3983 3.47316 19.4467 3.83697 18.6498 4.55716C17.8452 5.28229 17.4352 6.28957 17.4326 7.54928C17.4301 8.80899 17.8375 9.81627 18.6395 10.5439C19.4364 11.2665 20.3905 11.6353 21.471 11.6378C21.5123 11.6403 21.5536 11.6403 21.5948 11.6403C22.6057 11.6403 23.6063 11.2245 24.3438 10.5018C24.8828 9.96971 25.5275 9.02926 25.5301 7.56413C25.5327 6.099 24.8931 5.15608 24.3541 4.6215ZM23.7636 7.56166C23.761 8.29174 23.5367 8.89561 23.0931 9.35594C22.6521 9.81379 22.1029 10.0464 21.4607 10.0464C20.8315 10.044 20.2874 9.81132 19.8464 9.34852C19.4157 8.89809 19.1965 8.29174 19.1965 7.55176C19.1965 6.81177 19.4183 6.2079 19.8516 5.75747C20.2925 5.29962 20.8367 5.06698 21.4685 5.06698C22.108 5.06698 22.6573 5.30209 23.0983 5.7649C23.5418 6.22522 23.7662 6.82909 23.7636 7.56166Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M41.1498 6.32424C41.1498 5.86638 41.3999 4.85911 42.7822 4.85911C43.2722 4.85911 43.5507 5.0175 43.7853 5.20559C44.0123 5.38626 44.1257 5.83174 44.1257 6.20049V6.37373L41.8435 6.71527C40.0358 6.98008 38.9991 7.91311 38.9939 9.27924C38.9913 9.98705 39.2595 10.5934 39.7701 11.0389C40.273 11.4769 40.9615 11.7096 41.7739 11.712C42.7977 11.712 43.5661 11.3581 44.1154 10.628C44.118 10.9374 44.118 11.2492 44.118 11.5388H46.0212L46.0341 6.29206C46.0366 5.43575 45.7452 4.60667 45.1702 4.15129C44.6028 3.70334 43.8601 3.47318 42.7848 3.4707H42.7693C41.9492 3.4707 41.0802 3.67859 40.4948 4.16614C39.8062 4.73784 39.4684 5.64364 39.4684 6.34403L41.1498 6.32424ZM42.0137 10.138C41.3381 10.1355 40.8997 9.76679 40.9022 9.20004C40.9048 8.61102 41.3329 8.26701 42.2484 8.11852L44.1232 7.81411V7.83143C44.118 9.19014 43.2541 10.138 42.0214 10.138H42.0137Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M46.9316 1.42627L46.9136 11.4842V11.5287L48.5975 11.5337L48.6156 1.47329V1.42874L46.9316 1.42627Z" fill="#191E28" fill-rule="evenodd"><路径 clip-rule="evenodd" d="M49.5852 10.9175C49.5852 10.7442 49.6471 10.5957 49.776 10.472C49.905 10.3482 50.0597 10.2864 50.2376 10.2864C50.4182 10.2864 50.5755 10.3482 50.7018 10.472C50.8308 10.5957 50.8952 10.7442 50.8952 10.9175C50.8952 11.0932 50.8308 11.2392 50.7018 11.3605C50.5729 11.4842 50.4182 11.5436 50.2376 11.5436C50.0571 11.5436 49.9024 11.4842 49.776 11.3605C49.6497 11.2392 49.5852 11.0932 49.5852 10.9175ZM49.6935 10.9175C49.6935 11.0635 49.7451 11.1897 49.8508 11.2937C49.9566 11.3951 50.0855 11.4471 50.2402 11.4471C50.3924 11.4471 50.5213 11.3951 50.627 11.2937C50.7328 11.1897 50.7869 11.066 50.7869 10.9175C50.7869 10.769 50.7328 10.6452 50.627 10.5438C50.5213 10.4398 50.3924 10.3878 50.2402 10.3878C50.0881 10.3878 49.9591 10.4398 49.8534 10.5438C49.7477 10.6452 49.6935 10.769 49.6935 10.9175ZM50.395 11.2615L50.2196 10.962H50.101V11.2615H49.9927V10.5735H50.2841C50.4285 10.5735 50.5136 10.6551 50.5136 10.769C50.5136 10.8655 50.4388 10.9373 50.3382 10.9571L50.5162 11.2615H50.395ZM50.101 10.665V10.8754H50.2686C50.3614 10.8754 50.4078 10.8407 50.4078 10.7715C50.4078 10.6997 50.3614 10.665 50.2686 10.665H50.101Z" fill="#191E28" 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 >

Subscription implies consent to our 隐私政策

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

World-class articles, delive红色的 weekly.

< / div >

Subscription implies consent to our 隐私政策

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

Toptal开发者

< / div >< / div >

加入总冠军® 社区.

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