Annual: 2019

PR044 »
智慧資源回收桶
📁Machine Learning
👤硯 阮
 (長庚大學)
📅Oct 09, 2019
Regional Final



👀 3153   💬 1

PR044 » 智慧資源回收桶

Description

在這強調綠色環保的時代,資源回收顯得重要許多,我們可以透過資源回收來減少溫室氣體的排放量、將要廢棄的材料,分解再製成新產品,像是當初台北花博展的流行館,全部利用寶特瓶建造,是第一座把垃圾變房子的綠建築,證明資源回收是能變成有價值得東西。但多數人不喜歡資源回收分類,或是懶得做回收,這樣會造成垃圾量的增加,也會造成生態破壞,加上現在不管是陸地還是海洋中都有大量的垃圾,甚至已經危害到生物的生存權,為了更有效地進行分類,希望可以透過智慧資源回收桶來解決此問題,且更有效的達到綠色環保,為全世界的環保盡一份心力。

Demo Video

  • URL: https://youtu.be/ZUHF8Bhdvuk

  • Project Proposal

    1. High-level Project Description

    摘要:

      此智慧資源回收桶主要分成不同種類的回收,例如:寶特瓶類,玻璃類,鐵

    鋁類... 等;當把垃圾投入垃圾桶此後,利用裝設的多顆鏡頭來拍攝此物體,得

    到多張圖片後,利用Terasic DE10-Nano 開發板 做圖像分析,分別取出每張圖

    的特徵值後相互比較,再根據我們所建立的資料庫和Terasic DE10-Nano 開發板

    應用,藉由機器學習放入神經網路系統作訓練,增加以其斷精準度。最後辨

    出它是屬於哪一類的品,而丟進相對應的桶子內,達到自動回收分類的目

    的。

     

    設計構思:

      在神經網路部分,先使用架構上的攝影機,取得大量的圖片資料後,在軟體

    上使用 Python 去做神經網路的架構模擬並訓練,再將訓練完的神經系統網

    路使用 Terasic DE10-Nano 開發板上直接以硬體電路實現神經網路的偵測功

    ,以應付快速偵測的需求。 

      在控制垃圾桶啟動分類部分,將Terasic DE10-Nano上之神經網路計算出結

    果連上控制電路板去操作多個馬達,使其完成控制垃圾桶需開啟幾層閘門,達到

    正確分類的目的。其中,垃圾桶內之各零件,以3D列印機列印製造而成,可以

    達到各細節自己設計之目的。

     

    未來展望:

      我們希望此智慧資源回收垃圾桶可取代目前市面上無特別分類的垃圾桶,增

    加資源回收的效率,幫助後其中工作的回收的再利用或是垃圾分解,期待能夠解

    決目前物品分類率不佳的處境。

        由於用Terasic DE10-Nano 開發板製作成本較低廉,適於大量生產,也期許

    未來將在世界各地設立此機器,讓沒有時間進行分類照片的人直接丟垃圾,不需

    擔心亂丟垃圾會產生何種問題,並減能少回收人員的工作時間,他們常因為民眾

    該分類而未分類的原因增加工作時間。這樣,不但能有效的進行回收分類,並能

    減少垃圾以降低對生環境態的破壞。

     

     

    硬體需求:

    1.Terasic DE10-Nano 開發板

    2.多顆D8M-GPIO攝影機。

    3.多顆馬達。

    利用D8M-GPIO攝影機拍攝照片後,傳至Terasic DE10-Nano開發板進行神經網路

    的判斷,決定垃圾的分類照片,並利用多顆馬達來控制分類開關。

     

     

    2. Block Diagram

     

    3. Intel FPGA Virtues in Your Project

    為何選用FPGA來設計?

    1. 製作成本較低。

    2. 可利用鏡頭傳感器達到取樣的目的。

    3. 神經網路分析可應用於Terasic DE10-Nano 開發板上。

    4. 運算速度快,可攜帶性佳,省電。

    5. 垃圾桶設計輕巧。

     

     

     

    4. Design Introduction

    http://www.innovatefpga.com/attachment/member/2019/PR044-F845E064A8E51E0F/image/1570436937941.jpg

    (一) 建立資料庫

    首先,我們將物品分為四類,分別為寶特瓶類、鐵鋁類、鋁箔包類和其他類,並藉由Webcam的照相機來拍攝該分類之物品,為了運算速度和資源的考量,我們對照片進行降解析度和取灰階的做法,並且在較低解析度下,仍能有很高的準確率。為了達到準確度的提升,我們藉由自己建立龐大的資料庫,並且使物體在我們已建構好的背景下拍攝,並使物體後的背景越單調,所得到的準確率也大大提升。

    First of all, we divide the items into four categories, namely, PET bottles, iron & aluminum cans, aluminum foil pack and others, and use the Webcam camera to shoot the items. In order to calculate the speed and resources, we have reduced resolution and use gray level for photos, and it still have high accuracy at lower resolutions. To improve accuracy, we have built a huge database and made the object shot in the background we have built. The more monotonous the background, the higher the accuracy.

     

    (二) 建立神經網路

    在建立神經網路的架構中,我們建構只有兩輸出之神經網路來得到,意旨其神經網路只判斷是否為某一種類並藉由重複使用3個此神經網路架構去分別做訓練,用不同的權重參數去做判斷,每張照片都會先進入其中一個網路進行判斷,若判斷為否則進入到判斷另一種物品的神經網路進行判斷,藉由上述一層層的判斷後就可以判斷出照片中的物品為何種種類了相較於一次判斷四種物體種類之神經網路架構,一次判斷四種物體種類之神經網路架構若為了較高精準度,必定會使神經網路的深度上升,會導致訊連的時間拉長,所需耗費的資源也較大,但精準度卻不一定較高,所以我們認為此方法可以大大節省運算的複雜度和其需儲存的權重數量,又可以達到我們預期的精準度設定,在分別訓練的結果顯示三種神經網路在軟體的準確率高達97%以上,最後的硬體實現也有95%以上。

     

    In the architecture of building a neural network, we construct a neural network with only two outputs, which means that its neural network only judges whether it is a certain kind. And by repeatedly using three of these neural network architectures to do training separately, the different weight parameters are used for judgment, and each photo will enter one of the networks for judgment first, and if it is judged otherwise, it will enter the other for judging item. The network judges, and by the above-mentioned layer of judgment, it can be determined what kind of items in the photo are. Compared with the neural network architecture that judges the four types of objects at a time, if it is for higher precision, it will definitely increase the depth of the neural network, and lead to the time of the communication longer, the resources required are also large, but the accuracy is not necessarily high. So we think that this method can greatly save the complexity of the operation and the amount of weights that need to be stored, and also can achieve our expected accuracy setting. The results of the separate training show that the accuracy of the three neural networks in the software is as high as 97%, and the final hardware implementation is also more than 95%.

    (三) FPGA使用於傳輸訊號與垃圾桶夾板馬達的控制

    利用電腦訓練神經網路系統,而此系統將會作為判斷分類的重要依據,再設計一雙向傳輸之硬體電路架構,將判斷結果傳送至DE10-NANO之主板上,同時DE10-NANO之主板也會結合一硬體電路設計分別控制不同層和不同夾板間的開關和其運作的速率。我們藉由此硬體電路設計,可以使馬達以不同轉速來進行開關夾板之功能,再藉由接一電路板結合DE10-NANO之主板即可完成所有的馬達控制,這樣就不須使用多個微控制器去分別控制6個馬達,可以使設計較為簡單且不須找多個USB插座來提供微處理器之電源問題。所以我們藉由使用DE10-NANO之主板即可以同步處理傳輸訊號和控制馬達速率,還有各夾層開關問題,並使這些繁雜的訊號控制問題能夠以最有效率之方法解決。

    The computer is used to train the neural network system, and this system will be used as an important basis for judging the classification. Then a hardware structure of bidirectional transmission is designed, and the judgment result is transmitted to the motherboard of DE10-NANO, and the motherboard of DE10-NANO is also A hardware circuit design is combined to control the switching between the different layers and the different splints and the rate at which they operate.

    With this hardware circuit design, the motor can be used for the function of the switch clamp at different speeds, and then all the motor control can be completed by connecting the board with the DE10-NANO motherboard, so that it is not necessary to use multiple The microcontroller controls the six motors separately, which makes the design simpler and does not require multiple USB sockets to provide power problems for the microprocessor.

    Therefore, by using the DE10-NANO motherboard, we can simultaneously process the transmission signal and control the motor speed, as well as the mezzanine switch problems, and solve these complicated signal control problems in the most efficient way.


     

     

    5. Function Description

     

    分類路徑:

    進行神經網路判斷 :

     

        將垃圾分為四類,分別為寶特瓶類、鋁箔包類、鐵鋁罐類及一般垃圾,當垃圾投入時,透過攝影機即時拍攝來進行神經網路的AI大數據分析,最後把垃圾分類到對應的垃圾桶內。

        而垃圾桶啟動的機制為:將垃圾放置在上層平台(此平台由上層馬達控制),利用攝影機即時拍攝,將會自動判斷分類的目標,判斷完畢後,上層馬達會開通,而下層馬達也會因答案結果開通,以達到垃圾丟入正確的位置裡。

    The garbage is divided into four categories, namely, plastic bottles, aluminum foil pack, iron & aluminum cans and others. When the object is put on the platform, the AI analysis of the neural network is performed through the instant shooting of the camera, and finally the object is classified. Go to the corresponding trash can.

    The mechanism for starting the trash can is : placing the object on the upper platform (this platform is controlled by the upper motor), and using the camera to shoot immediately, the target of the classification will be automatically judged. After the judgment is completed, the upper motor will be turned on, and the lower motor will also be turned on. The result of the answer was opened to get the object into the correct position.

     

    6. Performance Parameters

     

    1. 鋁箔包測試數據

    predict 0 1
    label    
    0 1586 14
    1 18 1582
    accuracy 0.99  
    aluminum    

    2. 鐵鋁罐測試結果

    predict 0 1
    label    
    0 1582 18
    1 0 1600
    accuracy 0.994375  
    iron    

    3. 寶特瓶測試結果

    predict 0 1
    label    
    0 1600 0
    1 1 1599
    accuracy 0.999688  
    plastic    

     

    7. Design Architecture

    Final product:



    1 Comments

    Zhou Wenyan
    是否有完成设计?期待设计效果!
    🕒 Jun 26, 2019 04:25 PM

    Please login to post a comment.