ydui倒计时:time

What do you call an awesome project that is never shared with the world? — You don’t. Unless the project is yours, you won’t ever know about its existence. Research is not only about having ideas and writing scientific articles. Research is about sharing those ideas, is about solving the everyday problems and aiming towards a better world and an inspiring future.

您如何称呼一个从未与世界共享的优秀项目? —不。 除非项目是您的,否则您永远不会知道它的存在。 研究不仅涉及有想法和撰写科学文章。 研究是分享这些想法,是解决日常问题,并致力于建立一个更美好的世界和鼓舞人心的未来。

Over the past two weeks, I embraced this mission of putting a Deep Learning project into production and share it with the world. This project is a model to map regions affected by wildfires on a daily basis, using satellite images. How difficult can it be to put in production? Well, there are some considerations to keep in mind.

在过去的两个星期中,我接受了将深度学习项目投入生产并与世界分享的使命。 该项目是一个使用卫星图像每天绘制受野火影响区域的地图的模型。 投入生产有多困难? 好吧,要记住一些注意事项。

表中的内容 (Table of content)

  • Some background about the project有关项目的一些背景
  • Downloading the data下载数据
  • Preprocessing the data and generating the model outputs预处理数据并生成模型输出
  • Creating and deploying a website with Django使用Django创建和部署网站

有关该项目的一些背景 (Some background about the project)

As I mentioned above, this project consists of a model to generate daily maps of regions burned by wildfires using satellite images as inputs. The research led to the publication of a scientific paper that I describe in the following two stories in case you are interested to find more details about the topic.

如上所述,该项目由一个模型组成,该模型使用卫星图像作为输入来生成野火燃烧区域的每日地图。 该研究导致发表了一篇 科学论文 ,如果您有兴趣查找有关该主题的更多详细信息,我将在以下两个故事中进行介绍。

下载数据 (Downloading the data)

Any model needs some input data to generate the outputs. In my case, the input data — the daily satellite images — need to be downloaded from a web server. This consists of using an API to make requests, wait for the requests to be processed and finally download the images. It’s very easy when everything goes well but often there are unexpected problems.

任何模型都需要一些输入数据来生成输出。 就我而言,需要从Web服务器下载输入数据(每日卫星图像)。 这包括使用API​​发出请求,等待请求被处理并最终下载图像。 当一切顺利时,这很容易,但是经常会出现意想不到的问题。

  • The request to the server may take some time to be processed and there’s a limit of files per request;发送到服务器的请求可能要花一些时间,每个请求的文件数是有限的。
  • The connection may fail and as a result, the download interrupted — leading to corrupted files;连接可能会失败,结果,下载将中断,从而导致文件损坏;
  • The data may be delayed or missing for some unpredictable reason.由于某些不可预测的原因,数据可能会延迟或丢失。

To make the request/download process work robustly I had to write a Python package to manage the download process with features including:

为了使请求/下载过程稳健地工作,我不得不编写一个 Python软件包 来管理具有以下功能的下载过程:

  • Splitting the request to the API in case the number of files is too large for a single request;如果单个请求的文件数量太大,则将请求拆分为API;
  • Taking note of which files have been already downloaded;注意哪些文件已经下载;
  • Checking the hash of the downloaded files to make sure they are not corrupted;检查下载文件的哈希值,以确保它们没有损坏;
  • Being able to restart the process without having to make a new request in case the connection is lost.万一失去连接,就可以重新启动进程而不必发出新的请求。

It is time-consuming to test and debug all this code but a necessity when moving to production. The process needs to be as reliable as possible and requiring the least human intervention.

测试和调试所有这些代码非常耗时,但是在投入生产时则是必不可少的。 该过程必须尽可能可靠,并且需要最少的人工干预。

预处理数据并生成模型输出 (Preprocessing the data and generating the model outputs)

Fortunately, this step is more straight forward as the preprocessing functions used during research to prepare the data can be used. However, there are often some modifications required:

幸运的是,由于可以使用在研究中准备数据的预处理功能,因此这一步骤更为直接。 但是,通常需要进行一些修改:

  • The code should be fast and memory-efficient to reduce the computing costs and processing time;该代码应快速且内存有效,以减少计算成本和处理时间;
  • The code should be robust to problems such as missing data;该代码应对诸如数据丢失之类的问题具有鲁棒性。
  • The code should be able to run either on CPU or GPU depending on the machine specifications — something that, fortunately, Pytorch makes very easy.

    该代码应能够根据计算机规格在CPU或GPU上运行-幸运的是, Pytorch使此操作非常容易。

After the preprocessing of the data, it’s time to load the model, generate the predictions and save the results. The results, however, need to be saved in a format that is friendly to the website. In my case this led to some additional steps:

在对数据进行预处理之后,该加载模型,生成预测并保存结果了。 但是,结果必须以对网站友好的格式保存 。 就我而言,这导致了一些附加步骤:

  • Converting the image data to vectorial format and separating the individual burned regions.将图像数据转换为矢量格式,并分离各个刻录区域。
  • Saving also GeoTiff images corresponding to each individual event.还保存与每个事件对应的GeoTiff图像。

The data can then be added to a database. I opted for using PostGIS that can handle geographical data types such as polygons and rasters.

然后可以将数据添加到数据库。 我选择使用可以处理地理数据类型(例如多边形和栅格)的PostGIS 。

In practice, I’m running the download and preprocessing steps on a Google Cloud Platform virtual machine. To reduce costs the instance is only turned on once every day to compute the outputs and send them to the server where the website is hosted.

实际上,我正在Google Cloud Platform虚拟机上运行下载和预处理步骤。 为了降低成本,该实例每天仅打开一次以计算输出并将其发送到托管网站的服务器。

使用Django创建和部署网站 (Creating and deploying a website with Django)

Django is a web framework for rapid development using Python. The problem is, two weeks ago I didn’t know how to use it. I read about it before but I never found the right opportunity to use it. I figured it could be a good and useful challenge. After all, learning is fun! Or at least it is fun after you finally understand how things work. The learning process was something like this:

Django是一个使用Python快速开发的网络框架。 问题是,两个星期前我不知道如何使用它。 我之前曾读过它,但从未找到使用它的正确机会。 我认为这可能是一个很好且有用的挑战。 毕竟,学习很有趣! 至少在您最终了解事物的工作原理之后,这才是有趣的。 学习过程是这样的:

  • On the first two days, I started by looking at some tutorials on YouTube;在头两天,我首先看了YouTube上的一些教程;
  • As I learned the basics, I started to create my website project;在学习基础知识之后,我开始创建我的网站项目。
  • The next few days I gradually added more features, as I started to understand how the framework works.接下来的几天,随着我开始了解框架的工作原理,我逐渐添加了更多功能。

This is a process characterized by a lot of Google searches, an unreasonable amount of open tabs in the browser, and patience — a lot of it.

这个过程的特点是Google搜索很多,浏览器中打开标签的数量不合理,而且耐心-很多。

The good thing is that the most I learn the more I realise the potential Django brings. Over time, the progress starts to accelerate — climbing the learning curve!

好消息是,我学到的知识越多,我就越能体会Django带来的潜力。 随着时间的流逝,进度开始加速- 攀登学习曲线!

After having a working example I decided it was time to deploy it. I found this process quite more challenging than anticipated. Often, tutorials on YouTube only cover the development part and lack an explanation about the deploying process. It took me about three days just to make this step work. I had to figure out what are Nginx and Gunicorn and how to make everything work. But well, like in everything, when the task is more challenging is when we learn the most.

在有了一个可行的示例之后,我决定是时候部署它了。 我发现此过程比预期的更具挑战性。 YouTube上的教程通常只涵盖开发部分,而缺乏对部署过程的解释。 我花了大约三天时间才使此步骤生效。 我必须弄清楚什么是Nginx和Gunicorn,以及如何使一切正常 。 但是,就像在所有事情中一样, 当任务更具挑战性时,就是我们学到最多的东西。

Enough talk! Let me show you the webpage (meteo-ai.com) and describe the main functionality.

聊够了! 让我向您展示该网页( meteo-ai.com )并描述主要功能。

website showing extreme fires that affected Portugal in 2017.网站的打印屏幕显示了2017年影响葡萄牙的极端大火。
website showing the overview for the past year.网站的打印屏幕显示了过去一年的概述。

Nice features the website has:

网站的不错功能:

  • Burned areas data and active fires data are stored in a PostGIS database that plays well with GeoDjango;

    燃烧区数据和活跃火灾数据存储在PostGIS数据库中,该数据库可与GeoDjango配合使用 ;

  • The user can select the time range for the visualization that will result in a query for the database;用户可以选择可视化的时间范围,以查询数据库。
  • Results on the website are displayed on Leaflet maps, making use of the nice marker cluster extension that allows to aggregate close markers in a clean and efficient way (see the map in Figure 2).

    网站上的结果显示在Leaflet地图上,利用了不错的标记簇扩展 ,该扩展允许以干净有效的方式聚合关闭标记(请参见图2中的映射)。

  • The burned area maps are displayed by rendering each pixel as a polygon, using the dates of burning or the confidence level of the model to colour the regions. This allows me to have a colourmap spanning the range selected by the user (see the map in Figure 1);

    通过使用燃烧日期或模型的置信度为每个区域着色,将每个像素渲染为多边形来显示燃烧区域图。 这使我可以得到一个色彩图,该色彩图跨越了用户选择的范围 (请参见图1中的图)。

  • Statistics of the selected time period or fire event are shown with dynamical plots made with Plotly.js (see the bar plots in both Figures 1 and 2).

    使用Plotly.js绘制的动态图显示了所选时间段或火灾事件的统计信息 (请参见图1和2中的条形图)。

Being able to aggregate all this information in a visual and dynamical form is quite useful for monitoring and studying the fires.

能够以视觉和动态的形式汇总所有这些信息对于监视和研究火灾非常有用。

There are webpages showing a similar type of information, however, the burned areas produced by this Deep Learning model are state-of-the-art for this type of product. By analysing the spatio-temporal correlations in sequences of input images with 3D convolutions and an LSTM layer, the trained model is very good at identifying burned regions and determining at which day the pixel burned — with particular emphasis for the latter.

有些网页显示了类似的信息,但是,这种深度学习模型产生的烧伤区域是此类产品的最新技术。 通过使用3D卷积和LSTM层分析输入图像序列中的时空相关性, 训练后的模型非常擅长识别燃烧的区域并确定像素在哪一天燃烧 -特别是后者。

结束? (The end?)

Not at all. There are many aspects to improve in the current state of the website. Furthermore, there are many more research paths to further explore in the burned areas field. One hot topic is higher resolution (30m pixel size or less) burned area maps using publicly available satellite images. The high spatial resolution trades off with less frequent images. This is a problem I’m working on. Working with such big volumes of data is a challenge by itself! I will make sure to write about the results in the future.

一点也不。 网站的当前状态有许多方面需要改进。 此外, 在燃烧区领域还有更多的研究途径可进一步探索 。 一个热门话题是使用公开提供的卫星图像,以更高的分辨率(小于或等于30m像素大小)刻录区域图。 高空间分辨率与频率较低的图像权衡。 这是我正在解决的问题。 处理如此大量的数据本身就是一个挑战! 我一定会在以后写结果。

Maybe this is just the beginning.

也许这仅仅是开始。

关于我 (About me)

Thanks for reading! Have a great day!

谢谢阅读! 祝你有美好的一天!

翻译自: https://towardsdatascience.com/the-final-countdown-deploying-my-deep-learning-project-29bf970e320b

ydui倒计时:time


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

相关文章:

  • YDUI Touch InfiniteScroll无限加载数据测试
  • 【Ydui.js】------ ydui.js 中的 util 中的方法讲解如何调用使用 例如:获取地址栏信息,js 倒计时,cookie, 获取图片地址等
  • VUE YDUI 使用文档
  • ydui的datetime日期选择组件
  • ydui移动端UI
  • YDUI的移动端页面rem适配方案使用方法记录
  • 【Ydui.js】------- JavaScript 判断手机终端 例如:移动终端,苹果终端,ipad 终端 等;
  • pr获取无字幕视频素材和常用素材的网站
  • Thinkphp仿众图网图片素材下载站源码+自适应手机端
  • python爬虫跳过付费数据_Python爬虫教程:包图网免费付费素材爬取!
  • 素材网站整合
  • 图片素材大全
  • Thinkphp仿众图网图片素材/资源下载站源码 自适应手机端
  • 最新二次开发仿包图网素材图片源码
  • java b s用户管理系统_基于B/S的教务信息管理系统
  • java基于教务系统管理总结_基于JAVA的教务管理系统的设计与实现
  • 软件测试教务系统测试用例,教务管理系统测试用例.doc
  • 教务管理系统数据字典mysql_数据库大作业_-教务管理系统
  • java sql编写教务系统_教务管理系统的设计与实现(SQLServer)
  • android教务系统框架,基于android的面向学生的移动教务管理系统设计与实现
  • 基于C#的学生综合教务管理系统
  • 正方教务系统对服务器的要求,正方软件教务系统功能介绍.docx
  • 教务管理系统
  • php做教务系统管理,基于PHP-MYSQL技术的网络教务管理系统设计
  • 教务管理系统设计与实现
  • 教务系统自动评教_FAFU教务管理系统
  • python学生教务管理系统
  • java通用教务管理系统_基于java的教务管理系统.doc
  • 教务信息管理系统的设计与实现
  • 软件工程关于教务系统的测试,软件工程课程设计——教务成绩管理系统摘要.doc...

ydui倒计时:time_最后的倒计时:部署我的深度学习项目相关推荐

  1. 通过NVIDIA-Docker部署深度学习项目环境

    原文地址为:https://zhuanlan.zhihu.com/p/78541520 深度学习环境部署的方法有很多种,其中Docker化深度学习环境和项目是一个很不错的选择.这里写过一些深度学习主机 ...

  2. 【杂谈】如何从数据准备,模型设计与调优,训练到部署完成整个深度学习算法流程...

    文/编辑 | 言有三 对于一个深度学习算法工程师来说,拥有丰富的项目经历当然是重要的,但是拥有完成整个从数据准备到模型上线的能力更加重要.这意味着可以独立承担项目,也是全栈工程师那么招人爱的原因了. ...

  3. 听Alluxio小姐姐讲述:Alluxio云上K8S部署如何加速深度学习训练

    Alluxio云上K8S部署如何加速深度学习训练 在2021 Alluxio Day V中,Alluxio核心研发工程师邱璐,为我们带来[Alluxio云上K8S部署如何加速深度学习训练]的分享 邱璐 ...

  4. 【物体检测快速入门系列 | 03】Windows部署Docker GPU深度学习开发环境

    这是机器未来的第3篇文章 原文首发链接:https://blog.csdn.net/RobotFutures/article/details/124815912 1. 概述 在<物体检测快速入门 ...

  5. AI部署:聊一聊深度学习中的模型权重

    点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 作者丨Oldpan 来源丨Oldpan博客 编辑丨极市平台 导读 本文简要介绍了模型权重的统计方法,以 ...

  6. 【直播课】6小时教你掌握轻量级网络,在安卓部署第一个深度学习模型

    前言 想要设计自己的神经网络,却不知道如何下手完成搭建? 想获得更高的任务指标吗?想获得更快的运行速度吗? 想获得更小的模型体积吗?想获得稳定可靠的性能吗? 跑通了经典模型却不知道模型结构是什么样的? ...

  7. Ubuntu 21.04 使用Docker部署深度学习项目(cuda11.2+cudnn8.8+deepface)

    文章目录 1.安装Docker 1.1 确定系统版本 1.2 卸载旧版本 1.3 设置stable镜像仓库 1.4 安装Docker ce 1.5 测试 1.6 阿里云镜像加速 1.7 重启服务器 2 ...

  8. 华为云Linux部署深度学习项目

    踩了几乎能踩的所有坑,真是要命. 直接从1 购买云服务器开始看即可 一些可能用到的命令 nvidia-smi:查看cuda driver的版本 看整个系统当前cuda的版本 nvcc --versio ...

  9. Django部署深度学习项目-1

    如何使用pycharm社区版创建django项目? 安装相关依赖库之后: 创建一个空文件夹,在此文件夹路径下使用命令 django-admin startproject mysite 即可成功创建di ...

  10. 从理论到实战|深度学习项目从训练到部署全流程技术

    假期总是过的很快,刷刷抖音,说没就没了. 说到抖音,就不得不提它的推荐系统,太 NB 了.刷了啥,立刻记住你的偏好,推荐相似内容,一不小心 2 小时就过去了,让人欲罢不能,要么日活 6 亿呢. 其实& ...

最新文章

  1. python使用笔记:pynput库控制键盘鼠标
  2. Python生成html邮件
  3. 算法练习day8——190326(猫狗队列、转圈打印矩阵、旋转正方形矩阵、反转单向双向链表、数N的加法组合)
  4. Android(3_2)-----模仿微信界面:通讯录页面
  5. 使用 JavaScript 上传 PDF 和 Excel 等二进制文件到 ABAP 服务器并进行解析
  6. 使用prototype特性编程中的效率问题
  7. 关于Mac重启之后壁纸总是恢复默认的解决办法
  8. java n 转换_自己写的Java N进制互相转换(2=N=16)
  9. Android 学习笔记 databinding简单使用:使用databinding在listview加入不同类型的view
  10. Python实现经典七种排序算法
  11. ASP.NET Core 中文文档 第二章 指南(4.10)检查自动生成的Detail方法和Delete方法
  12. 几张图说明男女之间的秘密(ZT)
  13. pagefile.sys这个文件怎麽能删除
  14. c语言编程统计磁盘文件,C语言编程题经典40题(附解答).ppt
  15. 伦敦艺术大学创意计算机学院,伦敦艺术大学专业详细设置
  16. 基于HFSS的圆形左旋圆极化贴片天线仿真分析
  17. Java聊天室——实现多人聊天、私聊、群聊
  18. freeSurfer颅骨剥离
  19. 怎么撰写一份优秀的数据分析报告(六)
  20. 温故而知新--Java基础(三):Java常用集合类(上)

热门文章

  1. windows微信协议|PC微信协议829版
  2. C语言 Mkl 矩阵乘法,MKL库矩阵乘法
  3. laravel-model实现复杂的查询语句
  4. Deepin-WPS更新字体
  5. 网络安全基础——对称加密算法和非对称加密算法(+CA数字证书)
  6. 20年前的人机大战,IBM“深蓝”耍了花招
  7. Python汉诺塔递归算法实现
  8. Android即时智能聊天软件
  9. Jlink接口引脚定义
  10. linux怎么从超级用户切换,linux怎么切换到超级用户