This post was originally published on the AWS Startups Blog.

Guest post by Ammar Syatbi, Data Scientist, Fares Hasan, Data Scientist, Piyush Palkar, Chief Data Officer, Carsome

Carsome is Southeast Asia’s largest integrated car ecommerce platform. With operations across Malaysia, Indonesia, Thailand, and Singapore, we aim to digitize the region’s used car industry by reshaping and elevating the car buying and selling experience. We provide end-to-end solutions to consumers and used car dealers, from car inspection to ownership transfer to financing, promising a service that is trusted, convenient and efficient. Carsome currently transacts around 100,000 cars annually and has more than 2,000 employees across all our offices.

The value Carsome wants to achieve by innovation in this sector goes in two ways. First, it’s important for us that our customers have an excellent experience when they use our service, so the innovation we bring must keep the good work up and carry on making it better. Second, our operations will be more efficient and evolve to manage our growth plans.

Streamlining Inspections with Machine Learning

At Carsome, we understand the importance of thorough checks to offer the best prices and build buyer confidence. Typically, a car takes up to 30 minutes of inspection where our professional inspector will generate 175 points and take pictures annotating various notes about the car condition and appearance. As our business has grown rapidly, it’s critical to streamline this process while maintaining high quality.

Inspection is a strategic step in the car journey, and we are aware of the sheer innovation this step deserves to pioneer and transform the industry. For instance, among the images taken will be front and back images of the car where the inspector has to manually blur the car plate numbers to preserve the privacy of our customers. This small part takes time though a few minutes only but it adds up when you have 100 cars and execution takes place on the small screen of a phone, which is less than ideal.

There are several ongoing efforts to transform this segment of the journey leveraging artificial intelligence (AI) and machine learning (ML). The team has proposed automation of the process with deep learning, completely freeing the inspector from the arduous work of blurring the car plate numbers from images manually and saving the time spent doing this. This will increase the inspection capacity and efficiency in terms of the number of cars the inspector can inspect. There have been several use cases on this front and our small prototype propelled the plans to go ahead and bring artificial intelligence into the center of the inspection process.

However, due to Carsome growing rapidly, it was challenging to predict the adequate compute resources needed for this project deployment. We needed something that is easy to scale up and scale down depending on market demand and operation plans. The conventional method of building everything directly into a vanilla Amazon EC2 instance cannot adequately address the needs. Though we can manage the resources efficiently using Amazon EKS, we needed a solution that is quick and easy to set up and maintain so we can focus more on data science and machine learning instead of managing the infrastructure.

Solution

We ran our experiment on Amazon SageMaker, which is a fully managed service for the whole workflow from training a deep neural network model into inference. It provides us with just what we need. SageMaker helps data scientists and developers to prepare, build, train, and deploy ML models quickly by bringing together a broad set of capabilities purpose-built for ML. We can build, train, tune, and deploy our model without having to think much about managing the infrastructure. The diagram below shows the high-level architecture.

all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth

Figure 1: High level model training architecture

The evaluation of the results can be carried out in multiple ways based on the use case. For this particular case, we have used the SageMaker Batch Transform to run an evaluation for the model performance. The evaluation that’s carried out looked at both aspects of the accuracy and the actual image masking quality. Since the model is stored in S3, we can always come back to it when we need to or in the case of comparing improvements.

For our modeling approach, we initially tried YOLOv3 to quickly streamline the process and build a successful test run using Tensorflow framework. YOLOv3 is a real-time object detection system. It takes the matrix representation of the image as input and generates a list of detected objects in the image, along with their coordinates and bounding boxes. In our context, the image refers to car images and the objects refer to the car plates. The image below illustrates some of the use cases of the YOLOv3 being limited in producing aesthetically pleasing results, which was the reason for us exploring another algorithm.

all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth

Figure 2: Result samples for YOLOv3 model

You can look at the plate area and recognize the following limitations:

  • Inability to scale to car plate number size without masking neighboring regions that are not part of the plate.
  • Inability to work with diagonally aligned objects which is a problem because that’s how most people take pictures naturally.

The limitations in the YOLOv3 model were obvious based on the aesthetic of the results we have obtained, which were always in bounding boxes instead of polygonal with unconstrained orientation. This means that we have to use a model that provides better results. We decided to adopt the Mask R-CNN (Masked Region Based Convolutional Neural Network), as it is proven to excel in solving such problems. In our context, Mask R-CNN goes a step above the bounding boxes into segmentation based output which has proven to be solving the limitations we observed working with YOLOv3.

Since Mask R-CNN is not among the built-in algorithms in SageMaker yet, there comes the need to build a custom container for it. In our case, we prefer using our own container image since we find it easier to adopt the existing code with many dependencies rather than using SageMaker prebuilt container images. The custom container feature adds value to us where some of the models might be new or innovated by teams working on various problems. Having the ability to build customized containers for them to be orchestrated in SageMaker is a real advantage. The following image compares the result from both models for the same car and you will see how Mask R-CNN scores high in all aspects of comparison. You almost will think the images were edited by software.

all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth

Figure 3: Car plate blurring comparison between YOLOv3 and Mask R-CNN

The image on the left is masked by YOLOv3 while the image on right is masked by Mask R-CNN. You can see the difference in the size of the blurred region and that precision and the ability to zoom into pieces and details are achieved by using Mask R-CNN segmentation capabilities.

SageMaker provides us with various options for deploying the model for inference at scale including SageMaker Hosting Services, SageMaker Asynchronous Inference, and SageMaker Batch Transform. The SageMaker Hosting Services simply means that we will have a persistent endpoint that will receive masking requests at any time and fulfill those requests.  For our use case, we opted for SageMaker Batch Transform. We don’t need the car plate to be processed in real-time. Furthermore, we can save costs by leveraging the pay-as-you-go pricing of the SageMaker Batch Transform, which is based on the duration of the resources being used. Batch processing moves along with our operations so we can respond in time for requests and support business in sufficient time.

Workflow & Performance

Leveraging our automation infrastructure and Apache Airflow orchestration we have built the workflow as a Directed Acyclic Graph (or DAG). The task starts with reading all car images that will be due in the next window and preparing them for the model. Since the workflow is scheduled, we trigger it at times agreed upon beforehand with our business and product stakeholders. So batch transformation will be invoked and all the images qualified will be masked and stored to be available for retrieval at any time needed. The diagram below shows the inference pipeline architecture.

all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth

Figure 4: The inference pipeline architecture

We have tested the model on Malaysian car plates. Over 100 car images, 99 of the images were correctly blurred. Only one image showed a slight issue as a result of the sun glare in the background which made the car plate region dim. However, such a case is niche and in our research, we only found one image taken in the aforementioned condition. Overall performance is impressive and we are confident in the results obtained.

The impact of such a solution in terms of time is spectacular. We have allowed inspectors to perform more by trimming time off such tasks. In our moderate estimations, our inspector spends at least 1 minute masking the plate number of a car (times evaluated in the ground based on 2 images per car performed by an experienced inspector). On the other hand, our automated system takes 2.4 seconds to mask images of one car. To put this in perspective we have reduced processing time by approximately 29x.

Future

Growth in Carsome is multiplying and therefore, we are building systems that multiply human productivity. We have a wide range of problems to solve via deep learning and artificial intelligence to improve our products and services. Our dealer auction recommendation engine went live earlier this year and with it, we set the tone of innovation with data. The vision is to embed intelligence in every stage of the business operations. This is our first round of optimizing the inspection process and we aim to build diagnostics that aid the human inspector.

Carsome’s operations focus on 3 countries: Malaysia, Indonesia, and Thailand. This makes it a requirement for any solution we build to be able to perform at scale in all 3 countries. Operating in these regions with the potential to grow beyond brings about the locality challenge where the same solution needs to be tweaked further before it can work on a different country or region. It’s always the case where we build solutions locally with the intention of deploying this solution regionally to touch every business branch and reap the positive impacts in all our operations.

The time is ticking for us to bring this solution to our regional operations and that is our priority now. This solution gave us a long view of the opportunities we can bring into our process and how AWS services like SageMaker aids in reducing the complexity often faced when building machine/deep learning solutions.

Author Biographies

all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth
Ammar Syatbi is a Data Scientist at Carsome. He started as a Software Engineer to be a full-stack Data Scientist leveraging deep neural networks in providing a business solution. He always has Python for breakfast and loves solving problems with machine learning.
all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth
Fares Hasan is an impact-driven lead data scientist with an affinity for building recommendation engines and customer-facing data products. Enjoys working with startups and building pioneering data teams.
all articles, autos, cars, amazon, amazon, carsome: leveraging automatic car plate masking on amazon sagemaker to focus on growth

Piyush Palkar is a data thought leader and has an experience of covering a range of areas and responsibilities, both technical and non-technical in nature in order to create and execute data & analytics programs to drive business value and embed data driven innovations in products. He holds the position of Chief Data Officer at Carsome and heads 4 departments viz. Business Intelligence, Data Science & Advanced Analytics, Insights, and Data Engineering. He is also the Country CDO Ambassador for the nation of Malaysia as part of the global partnership representing the Massachusetts Institute of Technology CDOIQ, the International Society of Chief Data Officers, Institute for Chief Data Officers, and CDO Magazine.

Keyword: Carsome: Leveraging Automatic Car Plate Masking on Amazon SageMaker to Focus on Growth

CAR'S NEWS RELATED

Would You Pay RM6 for a Liter of RON95? Malaysia’s Petrol Subsidy Explained

Currently, oil prices are at a five-year high as a result of geopolitical tensions. This has translated into rising fuel prices at the pump around the world. In case you’re wondering, our neighbors in Thailand are indeed paying roughly RM6 for a liter of RON95 petrol, or 47.36 baht per ...

View more: Would You Pay RM6 for a Liter of RON95? Malaysia’s Petrol Subsidy Explained

History of Toyota: The Largest Carmaker in the World

Toyota is the largest carmaker in the world, and for good reason. It is known for making affordable, reliable vehicles that can run for years without major issues. And this reputation has helped it secure a strong presence in Malaysia with well-loved models such as the Corolla, Vios, Land Cruiser, ...

View more: History of Toyota: The Largest Carmaker in the World

Run-Flat Tires: A Complete Guide

Run-flat tires are getting more common, but many drivers still don’t understand what they are and how they work. Do they drive the same as regular tires? Can you install them on your car? In this article, we’ll answer these questions and help you determine if you should get run-flat ...

View more: Run-Flat Tires: A Complete Guide

7 Defensive Driving Tips That May Just Save Your Life

Contrary to what many people think, defensive driving is not a specific technique. Rather, it is a state of mind. You, the driver, must always consciously think about minimizing the risks of the road every time you get behind the wheel. Defensive driving is closely related to safe driving. A ...

View more: 7 Defensive Driving Tips That May Just Save Your Life

Bahaya Membeli Kereta Tenggelam Banjir

Bagi mereka yang kurang berpengalaman, tanda-tanda kerosakan banjir pada kereta mungkin agak sukar untuk dilihat dengan mata kasar. Tetapi, sebuah kereta yang pernah ditenggelami banjir boleh dibelenggu dengan banyak masalah yang mendatangkan risiko kepada pemilik dan bakal pembeli. Sebab itulah pembeli kereta terpakai harus berwaspada dengan tawaran yang tidak masuk ...

View more: Bahaya Membeli Kereta Tenggelam Banjir

What is It Like Working as a Woman in the Car Industry? Stories from Women Carsomers

The car industry is commonly perceived as male-dominated. Think of car mechanics, car dealers, even the technicians that carry out vehicle inspections – you would automatically picture a man. Yet half of all licensed drivers on the road in Malaysia are female. As gender equality is increasingly becoming a norm, ...

View more: What is It Like Working as a Woman in the Car Industry? Stories from Women Carsomers

Chinese New Year: Carsomer Stories That Celebrate Prosperity, Love, and Sacrifice

Love is truly the greatest prosperity. Without love, we would not be who we are today, pursue our dreams, and reach our goals.  This is why this Carsome New Year, we are celebrating our loved ones who have sacrificed their dreams, so we can have ours. Here are some stories ...

View more: Chinese New Year: Carsomer Stories That Celebrate Prosperity, Love, and Sacrifice

Car Shock Absorbers: What You Need to Know & Signs They Are Worn Out

Shock absorbers are an important part of your car’s suspension system as it functions to absorb the impact as you drive on uneven surfaces. By properly absorbing the shock and vibration from the road, your car’s shock absorbers and suspension system ensure a comfortable and safe ride for you and ...

View more: Car Shock Absorbers: What You Need to Know & Signs They Are Worn Out

Making It Through the Rain: Car Care & Driving Tips for the Rainy Season

Carsome Certified Lab: Here’s How Carsome Refurbishes Pre-owned Cars to Be as Good as New

Here’s How We Give Quality Carsome Certified Cars

Repaying a Sacrifice: How Carsome Helped Brandon Repay His Father’s Love

A Sacrifice to Be Together: John and Yoke Leng’s Carsome Story

A Closer Look At The Toyota C-HR! (Gallery)

Flux Aims To Redefine Car Ownership

Most Bought Used Luxury Cars in 2019

5 Reasons Why BMW’s 740Le Delivers Electrified Driving Luxury

5 Reasons Why The Volvo S60 T6 Stands Out From The Rest

Best Used Hatchbacks Cars in Malaysia

Malaysian Car Launches in 2020

OTHER CAR NEWS

; Top List in the World https://www.pinterest.com/newstopcar/pins/
Top Best Sushi Restaurants in SeoulTop Best Caribbean HoneymoonsTop Most Beautiful Islands in PeruTop Best Outdoor Grill BrandsTop Best Global Seafood RestaurantsTop Foods to Boost Your Immune SystemTop Best Foods to Fight HemorrhoidsTop Foods That Pack More Potassium Than a BananaTop Best Healthy Foods to Gain Weight FastTop Best Cosmetic Brands in the U.STop Best Destinations for Food Lovers in EuropeTop Best Foods High in Vitamin ATop Best Foods to Lower Your Blood SugarTop Best Things to Do in LouisianaTop Best Cities to Visit in New YorkTop Best Makeup Addresses In PennsylvaniaTop Reasons to Visit NorwayTop Most Beautiful Islands In The WorldTop Best Law Universities in the WorldTop Richest Sportsmen In The WorldTop Biggest Aquariums In The WorldTop Best Peruvian Restaurants In MiamiTop Best Road Trips From MiamiTop Best Places to Visit in MarylandTop Best Places to Visit in North CarolinaTop Best Electric Cars For KidsTop Best Swedish Brands in The USTop Best Skincare Brands in AmericaTop Best American Lipstick BrandsTop Michelin-starred Restaurants in MiamiTop Best Secluded Getaways From MiamiTop Best Things To Do On A Rainy Day In MiamiTop Most Instagrammable Places In MiamiTop Interesting Facts about FlorenceTop Facts About The First Roman Emperor - AugustusTop Best Japanese FoodsTop Most Beautiful Historical Sites in IsraelTop Best Places To Visit In Holy SeeTop Best Hawaiian IslandsTop Reasons to Visit PortugalTop Best Hotels In L.A. With Free Wi-FiTop Best Scenic Drives in MiamiTop Best Vegan Restaurants in BerlinTop Most Interesting Attractions In WalesTop Health Benefits of a Vegan DietTop Best Thai Restaurant in Las VegasTop Most Beautiful Forests in SwitzerlandTop Best Global Universities in GermanyTop Most Beautiful Lakes in GuyanaTop Best Things To Do in IdahoTop Things to Know Before Traveling to North MacedoniaTop Best German Sunglasses BrandsTop Highest Mountains In FranceTop Biggest Hydroelectric Plants in AmericaTop Best Spa Hotels in NYCTop The World's Scariest BridgeTop Largest Hotels In AmericaTop Most Famous Festivals in JordanTop Best European Restaurants in MunichTop Best Japanese Hiking Boot BrandsTop Best Universities in PolandTop Best Tips for Surfing the Web Safely and AnonymouslyTop Most Valuable Football Clubs in EuropeTop Highest Mountains In ColombiaTop Real-Life Characters of Texas RisingTop Best Beaches in GuatelamaTop Things About DR Congo You Should KnowTop Best Korean Reality & Variety ShowsTop Best RockstarsTop Most Beautiful Waterfalls in GermanyTop Best Fountain Pen Ink BrandsTop Best European Restaurants in ChicagoTop Best Fighter Jets in the WorldTop Best Three-Wheel MotorcyclesTop Most Beautiful Lakes in ManitobaTop Best Dive Sites in VenezuelaTop Best Websites For Art StudentsTop Best Japanese Instant Noodle BrandsTop Best Comedy Manhwa (Webtoons)Top Best Japanese Sunglasses BrandsTop Most Expensive Air Jordan SneakersTop Health Benefits of CucumberTop Famous Universities in SwedenTop Most Popular Films Starring Jo Jung-sukTop Interesting Facts about CougarsTop Best Hospitals for Hip Replacement in the USATop Most Expensive DefendersTop Health Benefits of GooseberriesTop Health Benefits of ParsnipsTop Best Foods and Drinks in LondonTop Health Benefits of Rosehip TeaTop Best Air Fryers for Low-fat CookingTop Most Asked Teacher Interview Questions with AnswersTop Best Shopping Malls in ZurichTop The Most Beautiful Botanical Gardens In L.A.Top Best Mexican Restaurants in Miami for Carb-loading rightTop Best Energy Companies in GermanyTop Best Garage HeatersTop Largest Banks in IrelandTop Leading Provider - Audit and Assurance In The USTop Best Jewelry Brands in IndiaTop Prettiest Streets in the UKTop Best Lakes to Visit in TunisiaTop Highest Mountains in Israel