鸽子 迷信_人工智能如何帮助我战胜鸽子

鸽子 迷信

鸽子回避系统 (Pigeon Avoidance System)

Disclaimer: You are reading Part 1 that gives an overview of the project. Part 2 describes the technical setup and data collection. Part 3 is about how to train the Pigeon Recognition Model and run it on Raspberry Pi.

免责声明:您正在阅读第1部分,该部分概述了该项目。 第2部分 介绍了技术设置和数据收集。 第3部分 介绍如何训练Pigeon识别模型并在Raspberry Pi上运行它。

Imagine a beautiful summer morning. The sun is shining through the leaves, the birds are singing happy songs, and everything is full of cheerful colors. You make your first cup of coffee and step on the balcony to enjoy the peace and harmony that only Sunday mornings can provide. Suddenly something disrupts you from the contemplation of the beauty of terrestrial life. In my world, it is the pigeon poop that I find on my balcony almost every day. I am a busy woman. I like enjoying my morning coffee in peace, but what I do not like — to clean the balcony from pigeon’s feces.

想象一个美丽的夏日早晨。 阳光穿过树叶,鸟儿唱着快乐的歌,一切都充满了欢快的色彩。 您冲泡第一杯咖啡,踏上阳台,享受只有周日早晨才能提供的和平与和谐。 突然间,某些事情干扰了您对地球生命之美的沉思。 在我的世界中,几乎每天我都会在阳台上发现鸽子便便。 我是忙碌的女人。 我喜欢安宁地享受早晨的咖啡,但是我不喜欢这样-清洁鸽子粪便上的阳台。

This morning I decided to start a war against the pigeons and Artificial Intelligence is the right weapon for this.

今天早上,我决定发动一场与鸽子的战争,而人工智能是解决这一问题的正确武器。

Now I set the emotional part aside and jump straight to the business of engineering, wiring, modeling, and soldering.

现在,我将情感部分搁置一旁,直接进入工程,布线,建模和焊接业务。

问题陈述 (Problem statement)

Pigeons regularly visit my balcony and left certain traces there. I want to get rid of pigeons without harming them, but by delivering a clear message that they are not welcomed here.

鸽子定期拜访我的阳台,并在那留下一些痕迹。 我想摆脱鸽子而不伤害他们,但是要传达一个明确的信息,那就是这里不欢迎他们。

解决方法 (Solution approach)

I have built a Pigeon Avoidance System that detects pigeons and shoos them away. The initial hardware setup includes:

我建立了一个避免鸽子的系统,该系统可以检测并驱赶鸽子。 初始硬件设置包括:

  • Raspberry Pi. I used Raspberry Pi 4 Model B 8GB RAM

    Raspberry Pi 。 我使用了Raspberry Pi 4 Model B 8GB RAM

  • Camera module for Raspberry

    覆盆子相机模组

  • Two motion sensors

    两个运动传感器

  • Stepping motor

    步进马达

Software stack:

软件堆栈:

  • Python for the automation

    自动化的Python
  • Keras for the Deep Learning part

    深度学习部分的Keras
  • PHP, JavaScript, HTML for data labelling solution

    PHP,JavaScript,HTML数据标签解决方案

架构概述 (Architecture overview)

The overall solution works in the following way. Whenever a pigeon lands on the balcony, the motion sensor detects a light change. It triggers the Main Pipeline, which in return activates the camera. The camera takes a picture and stores it on the Raspberry. The Main Pipeline sends the picture to the Pigeon Recognition Model that calculates the probability of a pigeon being on the picture and returns back the class. If a pigeon was detected, the Main Pipeline activates the stepping motor that shoos pigeon away by lifting up a stick with ribbons. Sounds pretty straightforward, though effective.

整体解决方案以以下方式工作。 每当鸽子降落在阳台上时,运动传感器就会检测到光线变化。 它触发了主管道,而主管道反过来又激活了摄像机。 相机拍摄照片并将其存储在Raspberry上。 主管道将图片发送到“鸽子识别模型”,该模型计算鸽子出现在图片上的概率,并返回该类。 如果检测到鸽子,则主管道会通过抬起带有色带的棍子来激活步进电机,以驱赶鸽子。 听起来很简单,虽然有效。

Image for post
Pigeon Avoidance System Architecture Diagram
鸽子回避系统架构图

为什么您可能需要鸽子火种 (Why you might need a Pigeon Tinder)

There is one element on the architecture diagram that hasn’t been explained so far, the Pigeon Tinder. That is exactly the moment when people usually raising their eyebrows asking: “What the hell is the Pigeon Tinder?” Pigeon Tinder is an essential part of the overall solution. Apparently, in order to train the Pigeon Recognition Model, I need to feed labeled data into it. Pigeon Tinder is a web app hosted on the Raspberry that helps me to manually label the images. Initially, I wanted to implement a mobile app where the left swipe would label the picture as “Not a Pigeon” and the right swipe as “Pigeon”. However, shortly I realized that first, mobile app development is a bit of overkill for the Minimal Viable Product (MVP). Second, in reality, I need three classes, as whenever I drink coffee on the balcony I would produce a lot of motion and the Raspberry would go off by making hundreds of pictures and then trying to classify them. Therefore I introduced a class “Human” that causes a two minutes delay before the next picture is taken. My main hope is that pigeons are not impudent enough to get on the balcony while I am already there. Because of these reasons, I settled for a web app running on Apache HTTP Server installed on the Raspberry. That how the interface of the Pigeon Tinder looks like.

到目前为止,尚未解释的架构图上有一个要素。 这正是人们通常扬起眉毛问:“鸽子火种到底是什么?”的时刻。 Pigeon Tinder是整个解决方案的重要组成部分。 显然,为了训练Pigeon Recognition Model,我需要将标记的数据馈入其中。 Pigeon Tinder是Raspberry上托管的Web应用程序,可帮助我手动标记图像。 最初,我想实现一个移动应用程序,其中向左滑动将图片标记为“不是鸽子”,向右滑动将标签标记为“鸽子”。 但是,我很快意识到,首先,移动应用程序开发对于最小可行产品(MVP)有点过大。 其次,实际上,我需要三个课程,因为每当我在阳台上喝咖啡时,我都会产生很多动作,而Raspberry会通过制作数百张图片然后尝试对其进行分类而消失。 因此,我引入了“人类”类,该类在拍摄下一张照片之前会造成两分钟的延迟。 我的主要希望是,在我已经呆在阳台上的时候,鸽子还不够轻率。 由于这些原因,我决定在Raspberry上安装的Apache HTTP Server上运行一个Web应用程序。 鸽子火种的界面是什么样的。

Image for post
Pigeon Tinder
鸽子火种

As I prefer to tinder pigeons on my phone, the web page is adapted for mobile usage. The app is very simple. Whenever I assign a label to the image, it moves the picture into one of the folders: “pigeon”, “human”, or “nothing”. That is also a proper directory structure for future training. The Delete button temporarily moves the picture into a “trash” folder that is regularly emptied by the clean_directories.py script that is run by a cron job every night.

由于我更喜欢​​在手机上打鸽子,因此该网页适合移动应用。 该应用程序非常简单。 每当我为图像分配标签时,它就会将图片移动到以下文件夹之一:“鸽子”,“人”或“无”。 这也是将来培训的合适目录结构。 “删除”按钮将图片临时移动到“垃圾箱”文件夹中,该文件夹定期由cron作业每晚运行的clean_directories.py脚本清空。

By the way, all code, including training routine, inference, Pigeon Tinder, and Raspberry automation is available on GitHub.

顺便说一下,所有代码,包括训练例程,推理,Pigeon Tinder和Raspberry自动化,都可以在GitHub上获得 。

Even though I didn’t go for the original idea of the mobile app, I still kept the original name of the labeling module. I hope Tinder will not sue me for this, otherwise you will hear about me in the news.

即使我没有使用移动应用程序的原始想法,但仍保留了标签模块的原始名称。 我希望Tinder不会为此起诉我,否则您会在新闻中听到关于我的消息。

接下来是什么? (What is next?)

I am documenting this project in a few articles under the name “Pigeon Avoidance System”. Part 2: “How to set up data collection for the pigeon avoidance system” will explain how to access external Raspberry components like camera, motion sensor, and stepping engine. It will also provide details about the data collection and how to set up the overall system on the balcony. The Deep Learning part is described in: “How to use Deep Learning to shoo the pigeons from the balcony”. However, I would recommend reading the article about the data collection first. So stay updated and in the meantime, a sneak peek for Part 2: me soldering cables in my kitchen. I indeed need a lot of cables for this project.

我正在以“ Pigeon躲避系统”的名义在几篇文章中记录该项目。 第2部分:“ 如何为鸽子回避系统设置数据收集 ”将说明如何访问外部Raspberry组件,例如摄像头,运动传感器和步进引擎。 它还将提供有关数据收集以及如何在阳台上设置整个系统的详细信息。 深度学习部分在“ 如何使用深度学习从阳台上射击鸽子 ”中进行了描述。 但是,我建议您先阅读有关数据收集的文章。 因此,请保持更新,与此同时, 第2部分 :我在厨房焊接电缆。 对于这个项目,我确实需要很多电缆。

Image for post
Me soldering cables in my kitchen
我在厨房里焊接电缆

If you got any questions about this project, please feel free to reach me via LinkedIn.

如果您对此项目有任何疑问,请随时通过LinkedIn与我联系。

翻译自: https://towardsdatascience.com/how-artificial-intelligence-helped-me-to-win-the-war-against-the-pigeons-9458293983a1

鸽子 迷信

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/392024.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

华为鸿蒙会议安排,2020华为HDC日程确定,鸿蒙、HMS以及EMUI 11成最关注点

原标题:2020华为HDC日程确定,鸿蒙、HMS以及EMUI 11成最关注点HDC:华为开发者大会,目前已经确定将在9月10日正式开幕。日前华为已经在其官网公布了HDC的日程,从现在的消息看华为开发者大会有三大点最受业内关注。鸿蒙操…

反射、元类

一、反射 1、什么是反射:就是反省,自省的意思 反射指的是一个对象应该具备,可以增、删、改、查属性的能力,通过字符串来操作属性 涉及的四个函数,这四个函数就是普通的内置函数,只是没有下划线而已&#xf…

html收款页面模板,订单收款.html

订单收款$axure.utils.getTransparentGifPath function() { return resources/images/transparent.gif; };$axure.utils.getOtherPath function() { return resources/Other.html; };$axure.utils.getReloadPath function() { return resources/reload.html; };…

pandas之时间数据

1.时间戳Timestamp() 参数可以为各种形式的时间,Timestamp()会将其转换为时间。 time1 pd.Timestamp(2019/7/13) time2 pd.Timestamp(13/7/2019 13:05) time3 - pd.Timestamp(2019-7-13) time4 pd.Timestamp(2019 7 13 13:05) time5 pd.Timestamp(2019 July 13 …

scikit keras_Scikit学习,TensorFlow,PyTorch,Keras…但是天秤座呢?

scikit kerasWelcome all! In the first episode of this series, I investigated the four most known machine learning frameworks and discussed which of these you should learn depending on your needs and goals.w ^迎阅读所有! 在本系列的第一集中 &#…

Educational Codeforces Round 25 C. Multi-judge Solving

题目链接:http://codeforces.com/contest/825/problem/C C. Multi-judge Solving time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMakes solves problems on Decoforces and lots of other different onli…

山东省2021年高考成绩查询平台6,山东2021年高考成绩改为6月26日前公布

6月11日,山东省教育厅举行2021年第一次高考新闻发布会,介绍2021年高考基本情况、评卷安排、成绩公布等相关工作。山东省教育招生考试院新闻发言人、普招处处长李春光介绍,根据近期国家有关工作要求和强基计划招生工作需要,原定于6…

如何在vuejs里禁用eslint语法检查工具

eslint好是好,可要求很苛刻,对于我这种写代码很糙的媛。。。。。。 搜索的时候有的说加入 /* eslint-disabled */(有用,但只是部分代码享受此待遇) 还有说删除.eslintrc.js里包含eslint关键字的块,a---o---…

数据结构两个月学完_这是我作为数据科学家两年来所学到的

数据结构两个月学完It has been 2 years ever since I started my data science journey. Boy, that was one heck of a roller coaster ride!自从我开始数据科学之旅以来已经有两年了 。 男孩 ,那可真是坐过山车! There were many highs and lows, and…

数学哲学与科学哲学和计算机科学的能动作用,数学哲学与科学哲学和计算机科学的能动作用...

3 数学哲学与计算机科学的能动作用数学哲学对于计算机科学的影响主要表现于以下的事实:一些源于数学哲学(数学基础研究)的概念和理论在计算机科学的历史发展中发挥了十分重要的作用。例如,在此可以首先提及(一阶)谓词演算理论:这是由弗雷格(…

AngularDart4.0 指南- 表单

2019独角兽企业重金招聘Python工程师标准>>> 表单是商业应用程序的主流。您可以使用表单登录,提交帮助请求,下订单,预订航班,安排会议,并执行无数其他数据录入任务。 在开发表单时,创建一个数据…

迈向数据科学的第一步:在Python中支持向量回归

什么是支持向量回归? (What is Support Vector Regression?) Support vector regression is a special kind of regression that gives you some sort of buffer or flexibility with the error. How does it do that ? I’m going to explain it to you in simpl…

jQuery事件整合

一、jQuery事件 1、focus()元素获得焦点 2、blur()元素失去焦点 3、change() 表单元素的值发生变化(可用于验证用户名是否存在) 4、click() 鼠标单击 5、dbc…

tableau跨库创建并集_刮擦柏林青年旅舍,并以此建立一个Tableau全景。

tableau跨库创建并集One of the coolest things about making our personal project is the fact that we can explore topics of our own interest. On my case, I’ve had the chance to backpack around the world for more than a year between 2016–2017, and it was one…

1.0 Hadoop的介绍、搭建、环境

HADOOP背景介绍 1.1 Hadoop产生背景 HADOOP最早起源于Nutch。Nutch的设计目标是构建一个大型的全网搜索引擎,包括网页抓取、索引、查询等功能,但随着抓取网页数量的增加,遇到了严重的可扩展性问题——如何解决数十亿网页的存储和索引问题。20…

如何实现多维智能监控?--AI运维的实践探索【一】

作者丨吴树生:腾讯高级工程师,负责SNG大数据监控平台建设。近十年监控系统开发经验,具有构建基于大数据平台的海量高可用分布式监控系统研发经验。 导语:监控数据多维化后,带来新的应用场景。SNG的哈勃多维监控平台在完…

使用Python和MetaTrader在5分钟内开始构建您的交易策略

In one of my last posts, I showed how to create graphics using the Plotly library. To do this, we import data from MetaTrader in a ‘raw’ way without automation. Today, we will learn how to automate this process and plot a heatmap graph of the correlation…

请对比html与css的异同,css2与css3的区别是什么?

css主要有三个版本,分别是css1、css2、css3。css2使用的比较多,因为css1的属性比较少,而css3有一些老式浏览器并不支持,所以大家在开发的时候主要还是使用css2。CSS1提供有关字体、颜色、位置和文本属性的基本信息,该版…

ipywidgets_未来价值和Ipywidgets

ipywidgetsHow to use Ipywidgets to visualize future value with different interest rates.如何使用Ipywidgets可视化不同利率下的未来价值。 There are some calculations that even being easy becoming better with a visualization of his terms. Moreover, the sooner…

计算机主机后面辐射大,电脑的背面辐射大吗

众所周知,电子产品的辐射都比较大,而电脑是非常常见的电子产品,它也存在着一定的辐射,那么电脑的背面辐射大吗?下面就一起随佰佰安全网小编来了解一下吧。有资料显示,电脑后面的辐射比前面大,长期近距离在…