Doom-and-gloom headlines about the shrinking number of stores in malls, closing department stores, and thinning foot traffic have been everywhere lately, and not without good reason. If one were to venture a guess based on brick-and-mortar store performance, it would appear the U.S. consumer has stopped spending.

But in fact, consumer spending has been rising steadily every year since 2009. It's just that an ever-greater number of people are choosing to do their shopping online. According to the U.S. Census Bureau's monthly retail report, retail sales were up 4.5% year over year in April, but online sales grew 12%. That would imply online stores are stealing market share. It explains the flood of store closures being reported, and the trend has made reports claiming that the physical store is here to stay seem silly.

One such report by Gartner, a technology research and consulting firm, says that traditional stores will have a place in the future with a new model that will blend the digital with the physical. The use of artificial intelligence (AI), or the collection and use of massive amounts of digital data, is one of those technologies that is picking up speed in the traditional retail world as it adapts.

A picture of a brain made of electrical connections.

Image source: IBM.

1. Data collection by video surveillance

Online retailers have long had an information advantage over their brick-and-mortar peers, as they are able to gather vital data about their customers (such as their age, gender, and location) as well as data on things like what people are looking at and how long they are staying on a page. And now,  cameras and AI -- tools that big retailers like Wal-Mart have been using to identify shoplifters -- are increasingly being used to gather the same kind of data in physical stores.

Facial recognition software can be used to track specific visitor activity, but less intrusive means of tracking have also been developed. For example, floor-level cameras can track traffic and where people are spending time in stores, and can predict information like age and gender by analyzing video of shoes. IBM's (IBM 1.05%) work with AI has produced things like natural language analytics that can judge vocalized consumer reaction to products. While it would mean businesses eavesdropping on conversations in the store with microphones and computers, gathering consumer reactions to things on the shelf could help retailers adjust marketing strategies and determine what inventory will sell.

2. In-store help using big data

Other retailers are using big data to reimagine how their stores help shoppers find what they need. Target (TGT -0.70%), which unveiled a multibillion-dollar plan early this year to play catch-up in e-commerce, is planning to arm floor associates with new technology to help visitors. The new point-of-sale system will be able to search real-time inventory across the organization, arrange for shipping, and take payment from the customer. The tech is expected to be in all stores by the end of the year.

Home improvement chain Lowe's (LOW -1.40%) has taken things one step further with mobile LoweBots. Now operating in the San Francisco Bay area, LoweBots are able to answer simple questions from customers and locate items as they roam around the store. The machines also keep track of inventory and track shopper patterns to help the company make better business decisions.

A LoweBot with a shopper walking alongside it. LoweBots look like a rolling aisle display, but have a touch screen on their front for shoppers to interact with them.

A LoweBot in action in a Lowe's home improvement store. Image source: Lowe's.

3. Leveraging the internet to customize experiences

The Gartner report also mentioned other ways retailers may soon adapt to the changing industry. One shows retailers using AI to pull data about customers from online profiles on websites like Pinterest to deliver personalized in-store offers to customers. Perhaps a little closer to today's reality, though, is showcasing customer's custom orders to other shoppers to judge mass popularity, or monitoring online trends to customize in-store displays and inventory levels.

More innovations using AI are sure to come as traditional retailers continue to announce new ideas and tech to enhance the shopper experience. Wal-Mart launched a new tech incubator called Store No. 8, headed up by former Jet.com CEO Marc Lore, with the purpose of nurturing and growing retail start-ups that it can use to enhance its business.

The world of retail is quickly changing. While many businesses in the industry are getting left behind and struggling as a result, many are innovating a new brand of physical and online store experience. Tech like AI is beginning to change brick-and-mortar stores and is keeping them relevant.