cent ultraiso

ML Model Deployment with fastai and Binder

使用fastai和Binder进行ML模型部署

Centipedes and millipedes are two creatures that one can encounter in the garden. Centipedes are beneficial to you because they feed on mites, insect larvae, insects, baby snails, and slugs. Millipedes, on the other hand, can be harmful and feed on plant roots, germinating seeds, and seedlings. Therefore it is beneficial to any gardener to be able to distinguish between the two.

mill和千足虫是一种可以在花园中遇到的两种生物。 they对您有好处,因为它们以螨,昆虫幼虫,昆虫,小蜗牛和为食。 另一方面,千足虫可能有害,并以植物根,发芽的种子和幼苗为食。 因此,能够区分两者对任何园丁都是有益的。

Being inspired by the beautiful book “Deep Learning for Coders with fastai and PyTorch: AI Applications Without a PhD” by Jeremy Howard and Sylvain Gugger, I decided to make a simple AI app for my wife, who is an avid gardener, that would help with the classification of centipedes and millipedes.

受到杰里米·霍华德(Jeremy Howard)和席尔文·古格(Sylvain Gugger)的一本精美的书《 使用Fastai和PyTorch进行代码深度学习:没有博士学位的AI应用程序 》的启发,我决定为我的妻子(一个狂热的园丁)制作一个简单的AI应用程序,这将对您有所帮助与ipe和千足虫的分类。

Dataset: I used Microsoft Bing Image Search API to collect images. After data cleanup, I ended up with 80 images of centipedes and 68 images of millipedes, split 80/20 for training and validation.

数据集:我使用Microsoft Bing图像搜索API来收集图像。 数据清理后,我得到80张images图像和68张千足图像,将80/20分割以进行训练和验证。

Machine learning model: I used the fastai vision library to build and train my model. Initially, I used ResNet34 as my pretrained model, but the resulting pickle file (file containing the trained model with weights) was too big for the app’s proper function. I downsized this file from 81 MB to 47 MB by going with ResNet18 instead.

机器学习模型:我使用fastai视觉库来构建和训练我的模型。 最初,我使用ResNet34作为预训练模型,但是生成的pickle文件(包含带有权重的训练模型的文件)对于应用程序的正常功能而言太大。 通过使用ResNet18,我将该文件的大小从81 MB减小到47 MB​​。

After only ten epochs, the model achieved 93% accuracy.

仅十个星期之后,该模型就达到了93%的准确性。

Only two images were misclassified in the validation set (see confusion matrix above.

验证集中只有两张图像被错误分类(请参阅上面的混淆矩阵。

Making a Jupyter notebook widget: Using widgets, I created a simple prediction app following Jeremy’s book’s instructions (please see my GitHub repository for the notebook file).

制作Jupyter笔记本小部件:使用小部件,我按照Jeremy的书的说明创建了一个简单的预测应用程序(请参阅我的GitHub存储库中的笔记本文件)。

The next step was to deploy a local app to the web. One of the easiest ways to do that is to use Binder. Binder allows running Jupyter notebooks in an executable environment on the web.

下一步是将本地应用程序部署到Web。 最简单的方法之一就是使用Binder 。 活页夹允许在网络上的可执行环境中运行Jupyter笔记本。

Source: https://mybinder.org/
资料来源: https : //mybinder.org/

You can upload your GitHub repository straight to the Binder website.The GitHub repository must contain at least free files: Jupyter notebook with code, pickle file with your model and weights, and requirements.txt file to create your python environment. To bypass a 10 MB file upload limit on GitHub, you have to use Git Large File Storage (LFS) service. Git LFS replaces large files with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

您可以直接将GitHub存储库上传到Binder网站.GitHub存储库必须至少包含免费文件:带有代码的Jupyter笔记本,带有模型和权重的pickle文件以及用于创建python环境的requirements.txt文件。 要绕过GitHub上10 MB的文件上传限制,您必须使用Git大文件存储(LFS)服务。 Git LFS使用Git内部的文本指针替换大文件,同时将文件内容存储在GitHub.com或GitHub Enterprise等远程服务器上。

Source: https://mybinder.org/
资料来源: https : //mybinder.org/

To build and launch your GitHub repository, you provide your repository name or URL and Jupyter notebook file name. If you want your app to execute without displaying the code, you can use voila by putting “/voila/render/” before the Jupyter notebook file name. Voila turns Jupyter notebooks into standalone web applications. It is crucial to change the dropdown menu from file to URL to be able to access the app on the internet. Don’t forget to copy the Binder URL for your app to share it with your friends. After that, you press the “Launch” button and wait.

要构建和启动GitHub存储库,请提供存储库名称或URL以及Jupyter笔记本文件名。 如果您希望您的应用程序,而不显示要执行的代码,你可以使用瞧由Jupyter笔记本文件名前把“/瞧/渲染/”。 Voila将Jupyter笔记本变成了独立的Web应用程序。 将下拉菜单从文件更改为URL至关重要,以便能够在Internet上访问该应用程序。 不要忘记为您的应用程序复制活页夹URL,以便与您的朋友共享。 之后,您按下“启动”按钮并等待。

Unfortunately, since Binder has to build your environment, it may take up to ten minutes to launch your site. If the site is frequently used, the loading time is much shorter. The final version of my site looks like this:

不幸的是,由于Binder必须构建您的环境,因此可能最多需要十分钟才能启动您的网站。 如果该站点是经常使用的,则加载时间要短得多。 我网站的最终版本如下所示:

演示地址

Conclusion: a combination of fastai, voila, and Binder enables creative individuals to code and deploy simple web applications with not much effort. The good is that Binder is easy and free to use. Not so good is that it takes a long time to launch your application on Binder. The fact that Binder cannot handle substantial file sizes (I could not load 81 MB pickle file) is also a significant negative. The best is that my wife was thrilled with this app and that what counts the most for me.

结论:fastai,voila和Binder的组合使富有创造力的个人可以轻松编写代码并部署简单的Web应用程序。 这样做的好处是,活页夹易于使用且免费。 不好的是,它需要很长时间才能在Binder上启动您的应用程序。 Binder无法处理大量文件(我无法加载81 MB的pickle文件)这一事实也是一个明显的负面影响。 最好的是,我的妻子对这个应用程序感到非常兴奋,这对我来说最重要。

Thank you for your time in reading this post.

感谢您抽出宝贵的时间阅读这篇文章。

Best wishes in these difficult times,

在这些困难的日子里表示最良好的祝愿,

Andrew@tampapath

安德鲁@tampapath

翻译自: https://medium.com/the-innovation/web-ai-app-for-gardeners-centipedes-vs-millipedes-6f61ff9156c6

cent ultraiso


http://www.taodudu.cc/news/show-2568678.html

相关文章:

  • 国家代码查询(Country codes)
  • 泰戈尔《园丁集》选段
  • 园丁集
  • Unicode \u 编解码
  • 输入整形 matlab仿真
  • [其他] 书签自用
  • esp32 物联网应用 01
  • [iuud8]ios不同版本下推送本地通知
  • 2020年国赛密码学湖湘杯密码学第一题writeup
  • vue面试总结
  • c语言之联合体
  • UR 2 密码锁
  • python 基础
  • 国外的一些开源网站汇集以及优秀博客的博客
  • I.MX6Q(TQIMX6Q/TQE9)学习笔记——新版BSP之u-boot移植
  • c运算符与优先级
  • linux 上supervisor的进程管理工具的使用
  • KubeEdge入门到精通-KubeEdge v1.3部署指南!
  • VHDL 仿真出现 UUUUUUUU 红线
  • PE系统纯净(可以识别nvme固态)
  • 插画艺术家IUU DAI “寒随今夜走Sorrow ends tonight”个人展
  • KUBERNETES安装及访问web页面
  • 基于arduino单片机的室内温度控制
  • Rundll32.exe 转自5iuu.com
  • 杭州电商java招聘_2021年IUU旅行 JAVA开发工程师J11179招聘-IUU旅行 JAVA开发工程师J11179招聘求职信息-拉勾招聘...
  • C++引用---纯属娱乐
  • 解决:Adobe Flash Player已不再受支持
  • 怎么在计算机修复flash,请修复adobe flash player 提示反复出现的最佳解决方法
  • Adobe Flash Player已不再受支持 解决方案
  • 必要的系统组件未能正常运行,请修复Adobe Flash Player

cent ultraiso_园丁cent vs千足的web ai应用相关推荐

  1. Python Web 深度学习实用指南:第一、二部分

    原文:Hands-On Python Deep Learning for the Web 协议:CC BY-NC-SA 4.0 译者:飞龙 本文来自[ApacheCN 深度学习 译文集],采用译后编辑 ...

  2. 第6章 Linux目录文件与系统启动知识

    第6章 Linux目录文件与系统启动知识 6.1 Linux系统目录结构介绍 6.1.1 Linux与Windows目录结构对比 相信很多读者已经熟悉了Linux的目录结构,图6-1可以进一步帮助读者 ...

  3. 服务器虚拟化北向,KVM虚拟化的部署及使用

    一.关于虚拟化 1.什么是虚拟化 虚拟化就是把硬件资源从物理的方式转变为逻辑的方式,打破原有物理结构,使用用户可以灵活管理这些资源,并且允许1台物理机上运行多个操作系统,以实现资源利用率最大化和灵活管 ...

  4. 饥荒 死亡后不删存档的办法

    饥荒是个自由度很高的游戏,shark工作组确实厉害,不过新手面对无穷尽的死亡还是很头疼. 下面两句mod里的代码注释后可以防止删档,当任务死亡后只需要按esc正常quit,小退下重进就可以了从最近的存 ...

  5. pythongps聚类_python实现K聚类算法

    参考:<机器学习实战>- Machine Learning in Action 一. 基本思想 聚类是一种无监督的学习,它将相似的对象归到同一簇中.它有点像全自动分类.聚类方法几乎可以应用 ...

  6. 分布式存储-ceph

    1. ceph 简介 Ceph是一种为优秀的性能.可靠性和可扩展性而设计的统一的.分布式文件系统().ceph 的统一体现在可以提供文件系统.块存储和对象存储,分布式体现在可以动态扩展.在国内一些公司 ...

  7. hdu1085Holding Bin-Laden Captive!组合问题

    题目连接 题目意思:有单位价值为1 2 5的三种硬币,分别给出他们的数量,求用这些硬币不能组成的最小的价值 解题思路:普通的母函数 普通的母函数: 利用母函数的思想可以解决很多组合问题,下面举例说明: ...

  8. 二分平均值聚类 java_二分K-均值聚类算法

    #K-means聚类 from numpy import * importmatplotlib.pyplot as plt plt.ion()#开启交互模式,实时绘制 plt.subplots() p ...

  9. K-均值对地图上的点进行聚类(2)

    3. 对地图上的点进行聚类 示例:对于地理数据应用二分K-均值算法 (1)收集数据:使用Yahoo! placeFinder API收集数据. (2)准备数据:只保留经纬度信息. (3)分析数据:使用 ...

  10. K-均值聚类算法对未标注数据分组(1)

    1. K-均值聚类算法 优点:容易实现. 缺点:可能收敛到局部最小值,在大规模数据集上收敛较慢. 适用数据类型:数值型数据. K-均值算法的工作流程是这样的.首先,随机确定&个初始点作为质心. ...

最新文章

  1. 钉钉、支付宝合种树,2-4天领证,限量9个名额
  2. MultipartResolver实现文件上传功能
  3. 经典教材《模式识别和机器学习》官方免费下载!
  4. axis使用wsdl生成客户端
  5. mysql 打印_故障分析 | MySQL:5.6大事务show engine innodb status故障一例
  6. lwbt的内存分配详解
  7. 为什么猫王不应该访问Java
  8. static代码块什么时候运行_健康的代码:什么时候该注释?
  9. 格雷码基础和生成的几种方法
  10. qt createtor 中文乱码
  11. python用户标识符条件_使用sum(if…)或条件语句操作两个数据集,这些语句没有hivehadooppython的公共标识符...
  12. 海康信号灯控制机服务器,交通信号控制硬件设备简介
  13. 十种QQ在线客服代码
  14. 台式win10系统你要来自Trustedinstaller的权限才能对此文件进行更改?
  15. JQ实现多checkbox选一清其它
  16. 让电脑说话vbs程序
  17. 光学系统像差的计算机模拟实验报告,RLE-ME01-光学系统像差测量实验-实验讲义要点.doc...
  18. iOS 视频播放(AVPlayer)
  19. 蓝牙服务器维修理地址,云服务器蓝牙
  20. 适合长时间佩戴的耳机有哪些、六款适合久戴的运动耳机推荐

热门文章

  1. 《阿里巴巴JAVA开发手册》超过三张表禁止join
  2. ADSL上网常见故障解答
  3. 星巴克 销售数据分析_星巴克大数据科学家纳米级推广战略顶峰项目
  4. 魔兽争霸lostTemple地图
  5. 如何使用jquery插件
  6. 团灭Leetcode打家劫舍问题
  7. 荣耀 MagicBook 14 2022配置怎么样 值不值得买
  8. python qq模块_用python写一个QQ机器人
  9. 多维度分析评价体系:高校教学质量大数据应用解决方案
  10. 基于51单片机的秒表设计