Sewing simple items of clothing is one of those repetitive, labor-intensive tasks that seems like it would have been automated ages ago. But getting a robot to do it right is tricky. Fabric stretches, especially the comfy, flexible knits used for t-shirts. A human can easily adjust on the spot, guiding the fabric as it moves around to make sure seams stay straight, but robots aren’t always great at that sort of improvisation. (Putting shoelaces on sneakers is similarly challenging.)

In 2015, after years of research, SoftWear Automation introduced LOWRY, a sewing robot, or sewbot, that uses machine vision to spot and adjust to distortions in the fabric. Though initially only able to make simple products, such as bath mats, the technology is now advanced enough to make whole t-shirts and much of a pair of jeans. According to the company, it also does it far faster than a human sewing line.

SoftWear Automation’s big selling point is that one of its robotic sewing lines can replace a conventional line of 10 workers and produce about 1,142 t-shirts in an eight-hour period, compared to just 669 for the human sewing line. Another way to look at it is that the robot, working under the guidance of a single human handler, can make as many shirts per hour as about 17 humans.

The company has emerged as a leader among those trying to automate sewing, drawing the interest of businesses that make home goods and of course clothing manufacturers, including Tianyuan Garments Company, a Chinese firm that produces for brands such as Adidas and Armani. Tianyuan Garments has invested $20 million in a 100,000-square foot factory in Little Rock, Arkansas, planned to open in 2018. The factory will be staffed with 21 robotic production lines supplied by SoftWear Automation, and will be capable of making 1.2 million t-shirts a year.

Normally, manufacturing in the US would be much more expensive than producing in China because of the higher labor costs. But Tang Xinhong, chairman of Tianyuan Garments, told World Textile Information Network (paywall) that, in a completely automated production line, the cost of human labor works out to about $0.33 per shirt. For context, to produce something like a denim shirt in Bangladesh, you might pay about $0.22 in labor costs, according to an estimate from the Institute for Global Labour and Human Rights. That same labor would be $7.47 in the US, putting the labor cost for Tianyuan Garments’ American-made shirt about on par with one of the cheapest labor markets in the world.

SoftWear Automation actually started as a way to make it financially feasible to produce clothes and other items locally in the US. Pete Santora, the company’s chief commercial officer, says it got its first grants from the Defense Advanced Research Projects Agency (DARPA), in the US Department of Defense. By law, the US military must buy US-made goods when possible, and would obviously welcome a way to outfit soldiers more cheaply than it currently does.

Understandably, the rise of automated sewing has raised concerns that it could displace countless low-wage garment workers in Asia in the coming decades. Last year, the International Labour Organization (ILO) estimated that around 64% of textile, clothing, and footwear workers in Indonesia could eventually be replaced by robots. In Vietnam the number was 86%, and in Cambodia, 88%. The report noted that workers could get better wages if governments and employers start preparing them for new high-tech jobs. If they don’t, the consequences could be dire.

For now, SoftWear Automation only sells its automated t-shirt work line in the US. Santora says the company needed to start local because it would be too difficult to service all its technology if it opened up internationally. They still need time to scale. (The home-goods robot is already available internationally.) But if foreign firms, like Tianyuan Garments Company, want to produce in the US, SoftWear Automation is happy to supply them with their sewbots.