This study studies about how to use imitate network to choose automatic garbage by applying with the intelligent bin. Furthermore, it is a depth study and multifunction, especially using for a smart farm and a smart family. Besides, this study can be used further for POC (Proof-of-Concept) development. This can use for creating a prototype and apply for practical use in the future.
1. 1
Using the Deep Learning for Garbage Detection with the Applied
of Smart Bin
Natthasath Saksupanara (5920421008)
Graduate School of Applied Statistics, Computer Science
National Institute Development Administration
natthasath.sak@gmail.com
Abstract: This study studies about how to use imitate network to choose automatic garbage by
applying with the intelligent bin. Furthermore, it is a depth study and multifunction, especially using
for a smart farm and a smart family. Besides, this study can be used further for POC (Proof-of-
Concept) development. This can use for creating a prototype and apply for practical use in the
future.
1. INTRODUCTION
ปจจุบัน ปญหาขยะถือเปนปญหาสำคัญที่ทั่วโลกกำลังเผชิญ ซึ่งสงผละกระทบตอระบบนิเวศและสิ่งแวดลอม สืบ
เนื่องมาจากปริมาณขยะที่เพิ่มมากขึ้นในแตละป ตามรายงานสถานการณขยะมูลฝอยของกรมควบคุมมลพิษ ป 2559 ประเทศ
ไทยมีขยะมูลฝอยประมาณ 27 ลานตัน / ป ถูกนำกลับมาใชใหม 22%, ถูกนำไปกำจัด 35% สวนอีก 43% ถูกนำไปกำจัดไม
ถูกตอง ซึ่งอาจเกิดจากกระบวนการในการคัดแยกขยะที่ไมถูกตอง ซึ่งเราตองการทำใหอัตราสวนการนำกลับมาใชใหมเพิ่มขึ้น จึงมี
การรณรงคแยกขยะกอนทิ้ง เพื่อลดปริมาณขยะและกำจัดขยะไดอยางถูกวิธี อีกทั้งถังขยะที่มีการใชอยูในปจจุบัน การทิ้งขยะลง
ทั้งขยะจะตองสัมผัสฝาถังขยะดวยมือ ซึ่งฝาถังขยะควรจะเปนแบบ Swing Bin ทำใหการใชงานถังขยะในปจจุบันไมถูกสุขอนามัย
ผูทำวิจัยจึงเล็งเห็นถึงปญหาและอุปสรรค และเห็นวาสามารถนำโครงขายประสาทเทียม (Neural Network) สำหรับการทำ
Object Detection มาใชในการคัดแยกขยะแบบอัตโนมัติ เชน Bottle, Paper, Battery และอื่นๆ โดยใชขอมูลรูปภาพ Dataset
ทั้งจากการถายขอมูลรูปภาพเพื่อทำ Dataset เอง และจากการดาวนโหลด Open Source โดยใช Raspberry Pi รวมกับ
Raspberry Pi Camera ในการตรวจจับวัตถุ และนำมาประยุกตเขากับถังขยะอัจฉริยะ ดวยบอรด Arduino เพื่อสั่งงาน Servo
Motor ในการควบคุมการเปดปดของถังขยะผานสาย Serial ระหวาง Raspberry และ Arduino มาใชในการแกไขปญหาขางตน
2. RELATED WORK
2.1 Neural Network
Neural Network โครงขายประสามเทียมที่เกิดจากการจำลองสมองของมนุษย ซึ่งเปนหนึ่งใน Algorithm ของ
Machine Learning มีรูปแบบการทำงานที่ซับซอน โดยใช Multiple Hidden Layer และใชฟงกชั่น Non-Linear Activation
นำขอมูลเขาไปใน Input Layer สงตอไปยัง Multiple Hidden Layer ซึ่งจะมีฟงกชั่น (Mini Function) และคาสัมประสิทธที่
ไมซ้ำกัน (Unique Coefficients) ในการเรียนรูซึ่งจะได Output ออกมา Neural Network จะทำการเพิ่มประสิทธิภาพโดย
การ Train ซ้ำไปซ้ำมา ซึ่งจะใชเทคนิคที่เรียกวา Gradient Descent เมื่อสิ้นสุดแตละรอบในการ Train ก็จะทำการคำนวณ
Derivatives ของ Error Metric และสงคากลับไปผานเทคนิคที่เรียกวา Backpropagation สวนคา Coefficients (Weight)
คาสัมประสิทธิ์หรือน้ำหนักในแตละ Neuron จะถูกปรับโดยเทียบกับ Error ทั้งหมด Adjusted Relative ซึ่งกระบวนการนี้จะ
ทำซ้ำจนกวา Error จะลดลงจนถึงจุดที่สามารถยอมรับได
7. 7
5. SUMMARY AND FUTURE WORK
การทำงานภาพรวมของระบบ สวนของ Model ที่ใชในการตรวจจับวัตถุและคัดแยกขยะ สามารถทำการตรวจจับวัตถุ
ไดอยางแมนยำโดยเฉพาะวัตถุที่อยูใน Class ที่ไดผานการ Train Model และสวนของอุปกรณที่ใชในการสั่งงานถังขยะ
สามารถทำงานไดอยางครบกระบวนการ แตก็ขึ้นอยูกับสถานที่ที่ใชในการติดตั้งระบบดวย เนื่องจากการตรวจจับวัตถุแบบ
Real-Time จะตองแยกวัตถุออกจากพื้นหลัง หากนำไปวางไวในที่มีพื้นหลังกลืนกับวัตถุจะไมสามารถแยกไดดีเทาที่ควร
ปญหาที่พบ ไมสามารถทำการ Run Model ที่ไดจากการ Train แบบ Faster R-CNN บน Raspberry Pi ได อาจะเปน
เพราะตอน Allocate Memory อุปกรณ Raspberry Pi มี Memory ไมเพียงพอทำใหโดน Terminate หรือโดน Kill Process
วิธีแกคือใหถอยไปใช SSD หรือทำการเปลี่ยน Hardware ที่มี Memory เพียงพอ
ขอเสนอแนะ การติดตั้ง Package ของ Python ที่ใชในการ Run Model จะมี Compatible ของแตละ Package
เยอะพอสมควร ควรตรวจสอบ Version และ Compatible ของแตละ Package รวมถึงอุปกรณ Hardware วารองรับหรือไม
สุดทายผูเขียนหวังวา สามารถนำโปรเจกตไปตอยอดพัฒนาเพื่อสรางถังขยะอัจฉริยะที่สามารถแยกขยะไดดียิ่งขึ้น
8. 8
Reference
[1] Amariei, Cornel. (2015). Arduino development cookbook : over 50 hands-on recipes to quickly
build and understand Arduino projects, from the simplest to the most extraordinary.
[2] Bonaccorso, Giuseppe. (2017). Machine Learning Algorithms.
[3] Bonnin, Rodolfo. (2016). Building Machine Learning Projects with TensorFlow.
[4] Cox, Tim. (2016). Raspberry Pi for Python Programmers Cookbook - Second Edition.
[5]Gollapudi, Sunila. (2016). Practical Machine Learning. Tackle the real-world complexities of modern
machine learning with innovative and cutting-edge techniques.
[6]Kurniawan, Agus. (2016). Making Your IoT Project Smart.
[7]Mcclure, Nick.(2017).TensorFlow Machine Learning Cookbook Explore machine learning concepts using
the latest numerical computing library-TensorFlow-with the help of this comprehensive cookbook.
[8] Soediono, Budi. (1989). Make-Arduino, Journal of Chemical Information and Modeling.
[9]Yang, Mindy and Thung, Gary. (2016). ClassificationofTrash forRecyclability Status
[10]Yang, Mindy and Thung, Gary. (2016). Waste Classification & Localization Based on Convolutional Neural
Networks
[11]Zaccone, Giancarlo.(2017). Deep Learning with Tensorflow.
[12]Zaccone, Giancarlo.(2016). Getting Started with TensorFlow Get up and running with thelatest
numerical computing library by Google anddive deeperinto your data.