Seven hundred women a year die during childbirth in the United States, and about half of those deaths are considered preventable.
>> Read more trending news
Uncontrollable bleeding is the most common problem.
Winnie Palmer Hospital for Women and Babies in Orlando, Florida, is now using artificial intelligence to monitor blood loss in real time.
A robot simulates what it is like for a mother to experience a postpartum hemorrhage.
Like thousands of new moms a year, Allison de Villiers almost died.
"After the C-section, I woke up in recovery, and things kind of went downhill after that," she said.
De Villiers said she lost 3 liters of blood, and her obstetrician told her family she might not make it.
"I don't think they realized I had lost so much blood," she said.
For years, the measurement has been a visual judgment call, as in de Villiers' case.
"It involved weighing and doing math and coming up with this number often while they're trying to do a lot of other things," said Lorraine Parker, of Winnie Palmer Hospital for Women and Babies.
Hospital staff now use a system called Triton, which uses an iPad to do the work for them.
"This product takes the guessing out of it," Parker said.
The hospital's version scans the towel, instantly telling the doctor how much blood it soaked up.
"We're using artificial intelligence computer vision, very similar to facial recognition technology," said Jack Kropilak, of Gauss Surgical, the company that produces Triton.
To measure the amount of blood suctioned from the body, they use a canister, which shows the volume of liquid taken out.
They then use an iPad to take a picture of white squares, and the technology can tell how much is blood and how much is other fluid by looking at how dark red the square is.
By knowing the exact numbers, obstetricians may now respond in the best way possible -- putting more babies back in their mothers' arms, where they belong.
"It's a risk in any deliveries," Parker said. "Some may say, how do you know which moms are going to bleed? You don't."
The hospital, which delivers about 14,000 babies each year, said it has been using the technology for about three weeks and has already noticed a difference. It said it will also use the technology during some surgeries.