Leveraging Deep Reinforcement Learning in real time apparel manufacturing environment: An Example

Using Amazon’s apparel manufacturing patent for this example

You may be familiar that in 2015, Amazon filed for a patent for an automated apparel manufacturing system. The system, which the company submitted its patent application for in December 2015, is founded on data and automation. A “computing device” would collect orders and organize them according to how they could be most efficiently produced. They could be grouped by geographic location, for instance, or by the type of fabric required, or by the assembly processes involved.

As Amazon explains it in the patent, ”By aggregating orders from various geographic locations and coordinating apparel assembly processes on a large scale, the networked environment provides new ways to increase efficiency in apparel manufacturing.”

We will explore the planning and scheduling side of Amazon’s apparel in-house manufacturing plans which I believe in the future may have the same effect on apparel factories as it did on physical bookstores and all types of shops. 

Overview of apparel manufacturing process outlined in the patent

Amazon’s apparel manufacturing process, at a very high level, can be summed up as follows. This is NOT directly from the patent but my own recreation.

  • P1: Grouping apparel customer orders by products and sizes. This process is around since the origins of industrial apparel manufacturing centuries ago.
  • P2: Automatically cutting lays(such as cutting a circle in several pieces of paper at the same time).
  • P3: Moving the packs of the parts of clothing to the assembly lines on conveyor belts
  • P4: Other operations depending on the products (packaging or printing or other).
  • P5: Storing and optimizing the distribution process through warehouses and deliveries and many more processes (tracking and data analysis, for example, finding late deliveries and optimizing their routes).

To summarize,first, the fabric is cut; then it is stacked in piles and sent by a conveyor belt to sewing stations to assemble the clothing:


This P1 to P5 flowchart provides a general idea of an apparel manufacturing process. In a real-life company, many more processes are required: market studies, designing products, testing prototypes, adding manufacturing processes for jeans (making holes with a laser, for example), and much more.

Leveraging Deep Learning for Aggregated Planning in a real time apparel manufacturing environment : An Example

Apparel manufacturing and manufacturing, in general, follow an advanced planning and scheduling process today. Amazon’s manufacturing department in the patent, just like Elon Musk’s Tesla self-driving cars require automated planning and scheduling, not advanced planning and scheduling.

An advanced planning and scheduling system mostly imports data from ERPs to make plans in the future. An automated planning and scheduling program mostly detects data with sensors to react and optimize in real time.  

This whole process above needs to be controlled by more than one Neural Networks, which will be collectively monitored by one central algorithm. As you can tell by now that planning in advance has moved up to planning in real time as shown in the following equation.

zx.png in which

  • x is a quantity to produce or any unit event
  • tx is the time (t) it takes for x to start and end
  • A logistic function squashes tx
  • λ (lambda) is the learning factor; the more a task is carried out, the more it is optimized

To illustrate this further, let’s formulate an AI solution that optimizes P3, the conveyor belt.  Though other solutions can be applied as well, my perspective is that the best algorithm in this case Many solutions already exist as well, but Deep Q- Learning can most probably beat them just as it will in many fields. We will use a specific type of DQN, called Convolutional Neural Network (CNN).

Deep Q-Network (DQN) that is the first deep reinforcement learning method proposed by DeepMind.  DQN essentially builds Deep Neural Networks into the realm of Reinforcement Learning.

Integrating Deep Learning Algorithm in the conveyor belt part of the process

A webcam is set up right over P3, the conveyor belt. The following image represents the webcam above the conveyor belt.


The webcam freezes a frame (within the red rectangle) every n seconds. This image is a representation of the concepts. In reality, the webcam might be located at the beginning of the conveyor belt or even over the output of the cutting process. For the purpose of the prototype in this chapter, just keep in mind that every n seconds a frozen frame is sent to the trained CNN.

  • A convolutional network that will analyze each frame it receives from the webcam that is located right over the pieces of garment packs on the conveyor belt coming from the cutting section.
  • An optimizer using a modified version of the Z(X) described above that plans how the assembly stations will be loaded in real-time.
  • Markov Decision Process that will receive the input of the optimizer function and schedule the work of the assembly stations. It also produces the modified Z(X) updated value of the weights of each assembly station for the next frame.

In the physical world, the conveyor belt transports the garment packs, a picture (frame) is taken every n seconds, and the CNN runs. The output of the CNN sends instructions to the conveyor belt and directs the garment backs to the optimized load of the assembly stations as explained before. There is no beginning and no end to the flow of functions in this virtually memory less system.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s