Object Detection and OOP in Python

This week, I started working on an outline of the perception pipeline and I implemented a first version of object detection. The Jetson Nano image includes the NVIDIA Jetpack SDK which makes developing and deploying AI solutions a breeze. All I really had to do was specify which object detection model I wanted to use and figure out the inputs and outputs required by the API and the Nano handled the rest.

In addition, while building the perception pipeline and especially since we are all working remotely, I really wanted to focus on using OOP best practices so that integrating the perception stack with the rest of the software is easier down the line. However, because Python isn’t a typed language, things like interfaces and inheritance are a bit more abstract and happen behind the scenes. As such, I hacked my own way of defining interfaces by defining base classes that throw not implemented errors unless overwritten by child classes. This was important to me since I wanted to abstract away the details of how different image sources were defined so that object detection could be run on any type of image source by simply asking for a frame from said source. The details of whether this is a video or a still image or feed from the camera become invisible to people developing other parts of the system and I loved how this all turned out, check it out in our repo.

Anyway, on a more exciting note, here’s me flying a drone in my backyard and what the Nano was able to detect when using a 30% confidence threshold. I am happy to report that I do indeed look like a person <3


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *