鴿子 迷信_人工智能如何幫助我戰勝鴿子

鴿子 迷信

鴿子回避系統 (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.pswp.cn/news/392024.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/392024.shtml
英文地址,請注明出處:http://en.pswp.cn/news/392024.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

華為鴻蒙會議安排,2020華為HDC日程確定,鴻蒙、HMS以及EMUI 11成最關注點

原標題:2020華為HDC日程確定,鴻蒙、HMS以及EMUI 11成最關注點HDC:華為開發者大會,目前已經確定將在9月10日正式開幕。日前華為已經在其官網公布了HDC的日程,從現在的消息看華為開發者大會有三大點最受業內關注。鴻蒙操…

反射、元類

一、反射 1、什么是反射:就是反省,自省的意思 反射指的是一個對象應該具備,可以增、刪、改、查屬性的能力,通過字符串來操作屬性 涉及的四個函數,這四個函數就是普通的內置函數,只是沒有下劃線而已&#xf…

Java—簡單的圖書管理系統

簡單的圖書管理系統 通過數據源和DAO對象訪問數據庫。其中JavaBeans實現模型,訪問數據庫,Servlet實現控制器,JSP頁面實現視圖。 ? 模型包括2個JavaBean:BookBean用于存放圖書信息,BookDAO用于訪問數據庫。 ? 控制器包…

成功的秘訣是什么_學習編碼的10個成功秘訣

成功的秘訣是什么This post was originally published on Coder-Coder.com.該帖子最初發布在Coder-Coder.com上 。 If you’re teaching yourself how to code, you may have more questions than answers when you’re starting out.如果您正在教自己如何編碼,那么…

ZJUT 地下迷宮 (高斯求期望)

http://cpp.zjut.edu.cn/ShowProblem.aspx?ShowID1423 設dp[i]表示在i點時到達終點要走的期望步數,那么dp[i] ∑1/m*dp[j] 1,j是與i相連的點,m是與i相鄰的點數。建立方程組求解。重要的一點是先推斷DK到達不了的點。須要bfs預處理一下進行…

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 ^迎閱讀所有! 在本系列的第一集中 &#…

程序員如何學習更好的知識_如何保持學習并成為更好的程序員

程序員如何學習更好的知識by Kevin Gardner凱文加德納(Kevin Gardner) 如何保持學習并成為更好的程序員 (How to keep learning and become a better coder) Coding has come a long way since the days of Robert Taylor and ARPANET and Sir Tim Berners-Lee and CERN — an…

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…

Java—stream以及集合框架使用

1) 編寫Student類,主要屬性包括學號、姓名、性別、班級 2) 編寫Score類,主要屬性包括:學號、課程名、分數 3) 模擬期末考試的成績統計應用場景,要求 (1) 所有學生名單及對應科目成績已經初始化在數組中 (2) 要求輸出每門課程的所有…

山東省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…

leetcode 888. 公平的糖果棒交換(set)

愛麗絲和鮑勃有不同大小的糖果棒:A[i] 是愛麗絲擁有的第 i 根糖果棒的大小,B[j] 是鮑勃擁有的第 j 根糖果棒的大小。 因為他們是朋友,所以他們想交換一根糖果棒,這樣交換后,他們都有相同的糖果總量。(一個…

如何使用JavaScript檢查輸入是否為空

by Zell Liew由Zell Liew 如何使用JavaScript檢查輸入是否為空 (How to check if an input is empty with JavaScript) Last week, I shared how to check if an input is empty with CSS. Today, let’s talk about the same thing, but with JavaScript.上周,我分…

數學哲學與科學哲學和計算機科學的能動作用,數學哲學與科學哲學和計算機科學的能動作用...

3 數學哲學與計算機科學的能動作用數學哲學對于計算機科學的影響主要表現于以下的事實:一些源于數學哲學(數學基礎研究)的概念和理論在計算機科學的歷史發展中發揮了十分重要的作用。例如,在此可以首先提及(一階)謂詞演算理論:這是由弗雷格(…

AngularDart4.0 指南- 表單

2019獨角獸企業重金招聘Python工程師標準>>> 表單是商業應用程序的主流。您可以使用表單登錄,提交幫助請求,下訂單,預訂航班,安排會議,并執行無數其他數據錄入任務。 在開發表單時,創建一個數據…

(轉載)分享常用的GoLang包工具

分享常用的GoLang包工具 包名 鏈接地址 備注 Machinery異步隊列 https://github.com/RichardKnop/machinery Mqtt通信 github.com/eclipse/paho.mqtt.golang go文檔http://www.eclipse.org/paho/clients/golang/ 微信開發 https://github.com/chanxuehong/wechat fasthttp包 gi…

邁向數據科學的第一步:在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…