Let's use Python and OpenCV for object detection! And what I did with conditional branching.

By Lina KATAYOSE(selina)

Elevator Pitch

Using Python and the OpenCV library, we will talk about how to not only detect objects (mainly human faces) from a PC’s web camera, but also what action to take when a face or person is recognized, incorporating conditional branching. I will also talk about this year’s PyCon APAC 2023 chairperson.

Description

Background

These days, there is a lot of talk about AI. And there is a growing need for object detection from cameras and images.

Summary

In this talk, we will use the open source Python and OpenCV libraries to detect objects (mainly human faces) from PC web cameras and see what kind of results we can get. We will use a cascade classifier as the material for object detection, and we will use data that has already been annotated to detect objects from the camera while giving an example of Python code.

Using Python and the OpenCV library, I will talk about not only detecting objects (mainly human faces) from a PC web camera, but also incorporating conditional branching to see what action will be taken if a face or person is recognized. As a simple example, when a face is detected, the print statement “Face detected! when a face is detected. We will also explain how to use video and still images, as well as real-time methods, in a slightly more in-depth manner than last time.

Table of contents

  • Introduction
  • Why did you want to do this
  • About OpenCV
  • What is a cascade classifier
  • object detection
  • Detect from videos and still images
  • Real-time detection
  • I tried with conditional branching.
  • Other practical examples
  • Finally

What the listener will gain

  • Using camera devices in Python
  • Object Detection Methods
  • The basics of face detection
  • Fundamentals of IoT
  • Learn how to use the OpenCV library
  • What is a cascade classifier
  • What is Annotation

Other

I was the PyCon JP 2022 and I am PyCon APAC 2023 chairperson. I will also talk about the preparation and content of this year’s conference as the PyCon APAC 2023 chairperson.

Notes

Hello, I am Lina Katayose and my primary location is Japan.
My nickname is Selina.
I am currently the chairperson of PyCon APAC 2023.
I have been interested in Python since 2016 and attended PyCon JP 2016 for the first time.
I have been a general speaker at PyCon JP 2017,2018 and an invited speaker in 2020.
I attended PyCon US for the first time in 2018 and regularly attend PyCons in Thailand, Taiwan, and other Asian countries.
I am also a staff member of PyLadies Tokyo, helping to organize and manage the event.
In 2018, we supported the launch of PyLadies BKK and expanded the opportunities to interact with each other. Thanks to this, I was able to meet many Asian Python community activists.

My Python experience.

I am developing my own hardware using Python. I mainly worked with drones and raspberry pi as my subject matter. There are not many Python engineers doing hardware development, but I really enjoy it. Fortunately, Japan has Akihabara, an electronic parts store, where you can buy parts and get started right away.
I have also published other programming code using drones and Python, and am now teaching at a university.

About Community Activities

I have been involved in community activities not only for my own Python study, but also to support the community and help many Python users gain a broad and large knowledge base.
To this end, I started my own company, increased my free time, and helped with PyLadies Tokyo and Python Boot Camp.
More recently, through PyCon JP 2022 and PyCon APAC 2023, I have chaired the largest events held in Japan, and have been active in promoting the diversity, collaboration, and inclusiveness of Python and other IT technologies.