微软认知服务 入门篇

本文介绍微软认知服务的基础知识,涵盖AI、ML、ANN、DL概念,以及如何在云端创建并使用通用服务,包括决策、视觉、语音、语言和网络搜索等五大类服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

微软认知服务 入门篇

本文将介绍微软认知服务的基本知识以及如何在云端创建、应用程序中使用基础的通用服务。

在开始了解微软认知服务(azure cognitive service)之前,有必要简单理清以下几个流行术语。AI, ANN,DL, ML。以下基于网上一些材料,总结个人理解。

AI(Artificial Intelligence), 人工智能,是普罗大众都能听到的一个概念,应该说它是这几个概念里最终让终端用户触及的技术成果。

ML(Machine Learning),机器学习, 在基于数学算法构建出解决问题的数学模型基础上,通过测试或使用过程中持续的数据输入而持续、自动地优化模型的技术过程。是实现人工智能的途径。而ANN(Artificial Neural Networks), 人工神经网络和DL(Deep Learning), 深度学习可以认为是 ML机器学习的其中两种算法。

微软认识服务(Azure cognitive service

以SDKs ,API,service的形式,使开发者可以很方便在应用程序中集成视、听,理解、和决策等人工智能的功能而不需要专注人工智能实现细节。Cognitive service会负责数据,机器学习算法和模型训练,有些情况下,也可以根据特定领域的业务需求,提供定制的数据。

类似的服务不止是微软公司有。继IBM 在2015年9月推出这种理念的服务后,微软于2016 年3月推荐出了Azure cognitive service, google也在同一时间推出类似的服务,Amazon于同年11月紧随其后。

 

能够做什么

Cognitive service 提供的服务

到目前为止,微软认知服务通过以下五个大类来提供服务。

Decision, 构建能够体现建议的应用程序,以进行明智和有效的决策。

Vision, 包含分析图像和视频的服务;

Speech, 可以执行诸如将音频转换为文本以及进行语音验证之类的操作。

Language, 可帮助您处理自然语言.

Web search, 专用的Bing Search API,可帮助您完成诸如如何建议和搜索图片之类的操作。

如何使用这些服务

每个服务类别都有通用服务和自定义服务。

通用服务可以定义为预定义数据和模型的服务,如人脸识别,OCR, 语言翻译等常规应用,cognitive service 已使用数据集(training set)构建好完善的模型,用户可只需要通过 API 上传待识别的数据,直接获取识别结果。在“创建账号订阅服务”这一章节详细介绍如何使用这种服务。

自定义服务可以让你在特定的用例中使用自己的数据来重新构建模型。(比如 vison 类别的定制服务叫 “定制视觉服务(custom vision)”, 您可以通过上传自己的数据来创建(train)自定义视觉模型,以用于特定目的图像识别。若想在定制服务中使用自己数据时,得允许微软使用你上传的数据。在下一节 “使用 custom vision service 识别字母” 中将介绍如何使用这种服务)

以上五大类服务的定制化都是指基于数据的定制化,即通过定制化的数据构建(train)出定制化的模型,这种方式还是无法满足需求,那么则需要自己实现算法。

 

创建账号订阅服务

创建账号激活定阅

要想使用azure认识服务服务,必须有微软账号,这前提与其它azure服务是一样的。

访问 https://azure.microsoft.com/en-us/free/ 创建免费的账号(国内网络可能打不开网页,可以使用https://azure.microsoft.com/zh-cn/free/),创建过程需要输入手机号码和信用卡信息,但是不输入以上两种信息也可以输入,个人建议输入手机号码,在激活定阅服务时,以及后面在不同设备登录时可以接收登录验证码。(已有账号还未激活的,可以直接激活azure 订阅信息)。

创建cognitive service 资源服务

访问 Https://potal.azure.com,在搜索框中输入 cognitive service,然后选中,如下

点击 “create”,在弹出的对话框,输入资源名称,,然后点击“create new” button, 进入以下界面

 

以上面界面会停留一会,初始化完成后是这样的:

点击服务名“firstCognitiveService” 进入以下页面

从”quick start”这里,可以看到key 和EndPoint两个关键的信息,这就是程序中使用cognitive service(通用服务,及“能够做什么”章节提到的预定义数据和模型的服务模式)的凭据。

在程序中使用服务

为了快速说明如何通过key和endpoint来使用通用服务,可以从这里

https://github.com/Microsoft/Cognitive-Vision-Windows.git clone (clone而不是下载)示例代码,在visual studio 2015(最低版本)打开VisionAPI-WPF-Samples.slnnuget restore 后运行,在弹出的窗口中输入上面的keyendpoint,然后就可以开始运行示例中所有功能。

 

费用

激活了订阅之后,可以免费使用,但是API与通讯次数和资源使用会有一定限制,但是作为开发学习,免费已经够用了。具体每一项服务的限制也不一样,比如对custom-vision这一项的规则是这样的:

https://azure.microsoft.com/en-us/pricing/details/cognitive-services/custom-vision-service/

商业使用的费用具体可以参考

https://azure.microsoft.com/en-us/pricing/details/cognitive-services/

参考资料

https://docs.microsoft.com/en-us/azure/cognitive-services/welcome

https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows

资料从这里开始

https://docs.microsoft.com/en-us/azure/cognitive-services/

Learning Microsoft Cognitive Services by Leif Larsen English | 20 Mar. 2017 | ASIN: B01M112FFP | 397 Pages | AZW3 | 7.35 MB Key Features Explore the capabilities of all 21 APIs released as part of the Cognitive Services platform Build intelligent apps that combine the power of computer vision, speech recognition, and language processing Give your apps human-like cognitive intelligence with this hands-on guide Book Description Microsoft has revamped its Project Oxford to launch the all new Cognitive Services platform—a set of 21 APIs to add speech, vision, language, and knowledge capabilities to apps. This book will introduce you to all 21 APIs released as part of Cognitive Services platform and show you how to leverage their capabilities. More importantly, you'll see how the power of these APIs can be combined to build real-world apps that have cognitive capabilities. The book is split into three sections: computer vision, speech recognition and language processing, and knowledge and search. You will be taken through the vision APIs at first as this is very visual, and not too complex. The next part revolves around speech and language, which are somewhat connected. The last part is about adding real-world intelligence to apps by connecting them to Knowledge and Search APIs. By the end of this book, you will be in a position to understand what Microsoft Cognitive Service can offer and how to use the different APIs. What you will learn Identify a person through visual inspection and audio Reduce user effort by utilizing AI-like capabilities Understand how to analyze images and text in different manners Find out how to analyze images using Vision APIs Add video analysis to applications using Vision APIs Utilize Search to find anything you want Analyze text to extract information and explore the structure of the text About the Author Leif Henning Larsen is a software engineer based in Norway. After earning a degree in computer engineering, he went on to work with the design and configuration of industrial control systems, for the most part, in the oil and gas industry. Over the last few years, he has worked as a developer, developing and maintaining geographical information systems, working with .NET technology. In his spare time, he develops mobile apps and explores new technologies to keep up with a high-paced tech world. You can find out more about him by checking his blog (http://blog.leiflarsen.org/) and following him on Twitter (https://twitter.com/leif_larsen) and LinkedIn (https://www.linkedin.com/in/lhlarsen). Table of Contents Getting Started with Microsoft Cognitive Services Analyzing Images to Recognize a Face Analyzing Videos Letting Applications Understand Commands Speak with Your Application Understanding Text Extending Knowledge Based on Context Querying Structured Data in a Natural Way Adding Specialized Searches Connecting the Pieces LUIS Entities and Intents Additional Information on Linguistic Analysis License Information
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值