Aleks Gabrič
Published

Let's Play Waste Sorting!

Using a garbage truck-mounted camera and machine learning algorithms to detect waste sorting and encourage people to do better.

IntermediateWork in progress254
Let's Play Waste Sorting!

Things used in this project

Hardware components

Raspberry Pi 4 Model B
Raspberry Pi 4 Model B
The main computer of the on-board unit.
×1
Wio LTE - Cat M1/NB1
Seeed Wio LTE - Cat M1/NB1
Enables LTE communication between the on-board unit and the server. Also serves as a GNSS receiver for positioning.
×1
Wi-Fi Camera
Takes pictures of bins to identify them by QR code and pictures of bin contents in order to assess the 'quality of recycling'.
×1
Coral USB Accelerator
Google Coral USB Accelerator
Hardware accelerator for TensorFlow.
×1

Software apps and online services

AWS EC2
Amazon Web Services AWS EC2
Communication and database server.

Story

Read more

Schematics

System Overview

Mobile app idea

Code

QR Identification Script

Python
The script used for identifying QR codes.
cv2.namedWindow("Poplava Smeti")
vc = cv2.VideoCapture(0)

if vc.isOpened(): # try to get the first frame
    rval, frame = vc.read()
else:
    rval = False

scanned_codes = []

while rval:
    rval, frame = vc.read()
    try:
        retval, points, straight_qrcode	 = qrDetector.detectAndDecode(frame)
    except e:
        print(e)
    if points is not None:
        rct = getRectangle(points)
        cv2.rectangle(frame, (rct['x0'], rct['y0']), (rct['x1'], rct['y1']), (0, 0, 255), 2)
        cv2.putText(frame, str(retval), (rct['x0'], rct['y0']), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 0))
        if not scanned_codes.__contains__(retval):
            scanned_codes.append(retval)
            cv2.imwrite('scanned_codes/{0}.png'.format(retval), frame)
    cv2.imshow("Poplava Smeti", frame)
    key = cv2.waitKey(20)
    if key == 27:
        break
cv2.destroyWindow("Poplava Smeti")
vc.release()

Credits

Aleks Gabrič

Aleks Gabrič

1 project • 0 followers
Thanks to Valeska Rimele and Martin Pevec.

Comments

Add projectSign up / Login