Lesson 19: Waste Management System

Lesson Description

In this lesson, you will learn about Computer Vision, Object Detection, and Waste Management. You will learn to create a Waste Management that can tell us if the waste is biodegradable or non-biodegradable.

Computer Vision

Computer vision deals with how computers can be made to gain a high-level understanding of digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human vision can do.

Computer vision tasks include methods for acquiring, processing, analyzing, and understanding digital images.

Object Detection

Locate the presence of objects with a bounding box and types or classes of the located objects in an image.

  1. Input: An image with one or more objects, such as a photograph.
  2. Output: One or more bounding boxes (e.g., defined by a point, width, and height), and a class label for each bounding box.

Waste & its Types

Nobody likes to live surrounded by waste. Not only does it make the surroundings look dirty but, if not managed properly, it can also spread diseases and even cause pollution.

Waste: Waste is any unwanted substance or object that is no longer useful to us. People also call it trash, junk, garbage, or rubbish.

We can commonly classify waste into two types:

  1. Biodegradable: This type of waste includes substances that decompose naturally over time. Biodegradable waste can be used to make manure and is therefore helpful for the environment. E.g., fruits, vegetables, paper, and dead plants.
  2. Non-Biodegradable: This type of waste includes substances that don’t decompose naturally. Non-biodegradable waste causes pollution and harms the environment. E.g. plastic, metals, and rubber.

What is Waste Management?

Waste management or waste disposal are all the activities and actions required to manage waste from its inception to its final disposal. This includes amongst other things collection, transport, treatment, and disposal of waste together with monitoring and regulation.

As it has a big important impact on our lives and the environment. Waste management is a burning issue in the modern world. The avoidance and reduction of waste are a very important parts of waste management.

Advantages of Waste Management: There are many advantages of waste management. Some of them are:

  1. It keeps the environment clean and fresh
  2. It reduces environmental pollution
  3. Waste management helps keep the surroundings clean
  4. It can also help reuse or recycle resources, such as; paper, cans, glass, and so on.
  5. Reducing waste will not only protect the environment but will also save on costs or reduce expenses for disposal.

Object detection helps in locating and identifying objects in digital photographs. It is a computer vision technique that helps to detect objects as well as classify them. The object to be detected may appear once or several times in the image. One of the applications of Object detection includes Self-driving vehicles which
detect objects in real-time and act accordingly.

Activity: Making a Waste Management System

Our system will differentiate the waste based on its type. If it detects biodegradable waste, the LEDs of Quarky’s matrix will turn green. If it’s non-biodegradable waste, the LEDs will turn blue.

Coding Steps

Follow the steps below:

  1. Create a New file in PictoBlox App.
  2. Connect Quarky to PictoBlox.
  3. Go to the Events palette and add a when flag clicked block into the scripting area. To detect the objects, we need the Object Detection extension.
  4. Add the Object Detection extension from the Extension palette.
  5. Add a turn () video on stage with () % transparency block below the when flag clicked block.
  6. Add a () bounding box block from the Object Detection extension. This block will create a bounding box around the object that our system will detect.
  7. Add a set detection threshold to () block. Here the number is the confidence level. We’re going to set it as 0.5.
  8. Go to the Control palette and add a forever block below the set detection threshold to ()
  9. Inside the forever block, add an analyse image from () block. Camera is set as the default source.
  10. Camera Setting: We would want to use the back camera of the Mobile / Tab. Change it from settings.
  11. Classifying the Waste: There is no direct way of detecting if an object is biodegradable or non-biodegradable. PictoBlox can detect a range of different objects of which some are biodegradable and some are non-biodegradable. We must beforehand which waste is of which type. In the script, we can use blocks from the Object Detection palette to detect a particular object, e.g. a banana. We’ll use a banana and a bottle as examples. You can add any number of different objects to your script.
    1. In the same script, add an if () then block below the analyse image from ().
    2. Inside the diamond-shaped space, drop an is () detected ? block. Select banana from the drop-down.
    3. Now, add display matrix as () blocks from the Display palette inside the if arm. Make all the LEDs as GREEN color.
    4. Now, we’ll make our system say out loud the type of waste it has detected. For that, we’ll use the Text-to-Speech extension.
    5. After adding the Text to Speech extension from the extension palette, add a speak () block under the if arm of the if block and write Biodegradable Waste.
    6. Repeat steps 11.1 to 11.5 for a bottle and this time, write Non-Biodegradable Waste in the speak () block and make all LEDs BLUE color.
  12. Click the green flag to test the script.

Save the file as Waste Classifier.

Activity: Output

Make sure you finish and submit the assignment, as well as take the quizbefore moving on to the next lesson.

Table of Contents