github

Architecting the SKU AI Project

Designing the Structure

For this project, I was tasked with designing an AI system that would return prediction on sneaker SKUs. The client needed support for 10+ sneaker models, and all the recent SKUs released for those models. This ended up being around 500+ SKUs that the AI would need to predict.

After doing some research and testing, I decided on using a structure where there was 2 models that would be used in the prediction process. The first model would be used to make predictions on the model of the sneaker, and the second model would be used to make predictions on the SKU of the sneaker. This was helpful, as when predicting on models, only the shape of the shoe was needed, and when predicting on SKUs, the color was also needed. This meant the first model would use grayscale images, and the second model would use colored images.

Gathering Data

Now to make a model that could predict on these images, I needed data. Since this was a unique project, there wasn't any pre-existing data set I could use. I had to create my own data set. I did this by scraping images from the internet, and then manually labeling them. This was a very time consuming process, but it was necessary to ensure that the model would be able to predict on the images.

Each sku had about 100 total images spread across train, val, and test sets. Luckily some of these images could be used when training the model to predict on the sneaker model, so that saved some time. I gathered these images from mainly Nike and Shopify websites, as they had the most consistent images.

Technical Details

The information I will share in this section is not meant to be a tutorial, but rather a high level overview of how SKU AI works. If you are interested in learning more about SKU AI, I would recommend checking out the repository.

I went through multiple iterations of the code behind the models, and ultimately landed on using VGG16 for the models. This was because VGG16 was able to predict on the images with a high accuracy rate, and was able to predict on the images fairly quickly. It took about 10 minutes to train the model on the images, and the predictions were nearly instant.

The client wanted to have this be an API where they could send images to and get predictions back. I decided on using Python and Django for the API, as I had experience with these technologies and knew they would be able to handle the requests. The API was able to process over 10,000 daily predictions with a 99.99% uptime, and was able to return predictions in under 1 second.