How We Developed an AI Framework for Recommender System on AWS

How We Developed an AI Framework for Recommender System on AWS

In our previous article, we described how to use artificial intelligence to generate an outfit recommendation based on just one image of clothing. To demonstrate our solution and make it accessible, our team of experts at Jazzros has developed an online version of the project. 

 

We have chosen a microservices architecture for its flexibility in independent deployment and scaling. It is also easier to identify and isolate faults in separate services, which can prevent situations in which one error stops the whole application from functioning. 

 

We are running six microservices on Amazon EC2 Instances, which provide high networking throughput of up to 100 Gbps and allow us to avoid data transfer bottlenecks. All microservices use the AMQP protocol to exchange information.

 

To preprocess hundreds of thousands of images from our dataset into a form suitable for deep learning, we developed a convolution microservice on Python3 using Keras, PIL, and NumPy libraries. With EC2’s NVidia GPU acceleration, we were able to reduce the image convolution time significantly.

 

  Jazzros AI Recommender Solution

 

The prediction microservice relies on Keras and NumPy libraries to use existing converted data in vector form or transforms new raw images to make predictions. 

 

The database component of the storage microservice runs on a highly stable relational database system PostgreSQL. Amazon RDS allows us to automate time-consuming administrative tasks and reduce operational overhead. The logical component for the microservice was developed on Python3 using SQLAlchemy and Scikit-learn libraries.  

 

The message exchange microservice was developed using a lightweight message broker RabbitMQ. Using a library called Pika, we can facilitate the transfer of messages in Python. 

 

Data flow diagram

 

 

The data flow diagram above demonstrates how our system works from top to bottom, problem to solution. 

 

The API microservice was realized using a WSGI web application framework Flask and its Flask-RESTful extension that supports building REST APIs. The web microservice was built with Django. 

 

The six microservices described above allow us to seamlessly run our artificial intelligence project, which you can access and try out for yourself here. By choosing an item of clothing, our recommender solution will suggest clothes and accessories to generate an outfit that best suits the selected item. 

 

To learn more about our project and how our expertise in artificial intelligence can improve your business, please do not hesitate to contact our team of specialists at Jazzros