CategoryMachine Learning
Date Published
April 11, 2023

Khalil Adib Explores Amazon SageMaker and YOLOv5 for Object Detection and Tracking

Meet Khalil Adib, one of Firemind's Data Scientists, with a passion for artificial intelligence (AI) and machine learning (ML). Customer projects aside, Khalil has been experimenting with AWS services such as Amazon SageMaker, and API additions of YOLOv5, for object detection and tracking. Read on below to find out more about this collaboration of services, and how they can be used for a number of smart applications across multiple industries and sectors.

So before we delve into Khalil’s own test use of both YOLOv5 and Amazon SageMaker (using some of our past team event footage), let’s first look at object segmentation, detection and their uses.

Object detection and segmentation are two important tasks in computer vision that have a wide range of real-life applications. Object detection is the process that identifies the location of objects within an image or video stream, while segmentation involves dividing an image into multiple segments or regions based, on their visual properties.

One of the most common applications of object detection is in autonomous vehicles, where the technology is used to detect obstacles on the road, helping the vehicle navigate safely. Object detection can also be used in surveillance systems to detect and track individuals or objects of interest. In the retail industry, object detection can be used to track inventory and monitor shopper behaviour. Additionally, object detection and segmentation can be used in medical imaging to detect and diagnose diseases such as cancer.

As an Amazon Web Services (AWS) all-in consultancy, we work closely with a number of services related to object detection and segmentation. For example, Amazon Rekognition is a cloud-based image and video analysis service that can detect objects and scenes, as well as analyse faces and detect text. Amazon SageMaker is another AWS service that offers machine learning capabilities, including training your custom object detection and segmentation models that can be trained and deployed on AWS. That’s why Khalil opted for using SageMaker, as it works incredibly well with object detection and alternative software such as YOLOv5.

By leveraging these services, businesses can quickly and easily incorporate object detection and segmentation into their applications and workflows. For example, computer vision and object detection can be used in homes and commercial buildings for increased security and automated alerts when human motion detected. A healthcare provider could use object detection and segmentation to quickly and accurately analyse medical images, improving patient outcomes.

An example using our own test footage

To put this object detection work into practice, Khalil loaded up some footage from a previous Firemind team event. Footage that had a mixture of slowed movement as well as faster scenes, to present more of a challenge to YOLOv5. As you’ll see when you view the footage below, the model has been trained to recognise people and factor in a scoring based on recognisable facial features, body types, limb positioning and other data sets. These data types score a person as ‘1’ for a 100% match to trained data, to a ‘0’ (for no match – never occurs).

As you’ll see from the video, SageMaker and YOLOv5 does a remarkably good job at classifying the people within each scene, even when only partial elements of a person are visible. It also detects and segments each person within a reliable framework, for easy to view accuracy when viewing the footage.

Get in touch

So, what do studies and tests like these mean for the use of object classification, detection and segmentation in the future? Simple. There is a growing need for solutions like these across many industries and use cases. We’ve already mentioned a few earlier in this article, but you could go on to explore live video feedback to look at correct posture and training for sports/athletes. You could apply this software to monitor footfall in high density shopping areas, providing further insight in security and safety during high traffic times.

The possibilities are limitless. And as a cloud consultancy with a natural inclination towards these types of ML projects, we’re ready to get involved with customers on utilising the best of SageMaker, Rekognition and additives like YOLOv5 and YOLOv8.

Want to find out more?

Got questions? We’ve got answers! Find out how our team can use object classification, detection and segmentation for your business use cases.

Get in touch