Pinterest and Amazon are on a collision course. On the face of it, a social media company facing off with an e-commerce juggernaut might seem odd. But Pinterest, which appears to be struggling to justify its $12.3 billion valuation, is anxious not to be viewed as a social media company. Toward that end, Pinterest is all in on visual search and venturing into AR territory. The company is counting on mastering e-commerce -- which means going head-to-head with Amazon.

Here's how the competition is shaping up.

Visual Shopping on Pinterest

Pinterest's service is oriented toward collecting images rather than communicating with other users. Intuitively, there seems to be an easy path from curating a digital version of your ideal lifestyle to actually purchasing the accoutrements.

A company spokesperson described Pinterest as "a visual discovery engine focused on helping people discover ideas" that is "not [meant for] socializing with friends." Over the past couple of years, Pinterest has been steadily increasing its suite of "visual discovery tools."

After raising $150 million in June (at a flat share price), the company told Bloomberg that it would "use the funds to improve its computer vision and visual search technologies" as well as to continue to expand internationally.

The platform touts two billion monthly searches and 10 billion daily "personalized recommendations." In the 2017 edition of her influential Internet Trends report, Mary Meeker highlighted Pinterest "as the best place to browse for products to buy, when compared to Facebook, Instagram, Twitter, and Snapchat," as summarized by Pinterest itself.

For years, the reason to be bullish on Pinterest has been its potential to drive actual purchasing, unlocking "social commerce." Crucially, Pinterest itself would need to harvest a cut of the money.

As it stands, Pinterest's open-access Buyable Pins are free to use, and they encompass 10 million unique products sold by 20,000 merchants. The company can monetize Buyable Pins indirectly by pushing Promoted Pins, its advertising product.

In February, Pinterest rolled out Shop the Look in partnership with a handful of brands, enabling users to shop for the individual items in a larger picture. Currently, no revenue-share arrangement is involved. According to the company, "Early results show Pinners engage with Shop the Look Pins 3-4x more than Pins without Shop the Look, save them 5x more and visit a brand's website 2-3x more."

Within its app, Pinterest offers a feature called Lens, which allows users to search by snapping or uploading photos of the objects around them. The orientation toward shopping is obvious -- see a dress you like, take a photo, and Pinterest will offer up similar options. The app received an update on Wednesday, increasing its striking resemblance to Snapchat.

"We're investing more in fashion recognition because Pinners are telling us that fashion is one of the most important use cases," a spokesperson said in a statement. "The main way Pinners use Lens, just like Pinterest (where there are 13B+ fashion Pins), is to find new ways to style clothing items including those they already have in their closet, and Lens is a quick and easy way to do that."

Visual Shopping on Amazon

Meanwhile, in April Amazon introduced the Echo Look. This new device comes with Alexa, Amazon's virtual assistant, and is oriented toward optimizing your fashion choices. Using voice commands, users can take full-body selfies or video clips, which sync to a smartphone. The Style Check feature will advise you on your sartorial taste. (The Look also comes equipped with full Echo features.)

Amazon has historically struggled with fashion, but if users are willing to adopt Echo Look, the company will have direct visibility into what its users wear on a daily basis, including items they purchased elsewhere. And those users already have Amazon accounts, likely with Prime subscriptions. It's easy to imagine that Amazon's data model could learn a person's real preferences and level up its recommendations.

On Tuesday, the company launched Amazon Prime Wardrobe, which allows users to order a batch of clothes at no upfront cost, and then easily return the items they don't want. The new product appears to be a clone of startup Stitch Fix, but instead of an algorithm or stylist choosing what comes in your box of clothes, you get to decide.

Again -- especially if it's integrated with the Echo Look -- it's an obvious leap from Prime Wardrobe's current status to a product that knows what you want and surfaces that for you. Prime Wardrobe also brilliantly addresses customer anxiety about fit, one of the factors that is hard to get right when you're shopping online. Amazon could theoretically monetize this information through its continually growing advertising business.

Where the Conflict Lies

Pinterest and Amazon clearly have different approaches, but they're getting at the same idea: Machine learning can be used to interpret images and understand what people want to buy. Technology breakthroughs enabled this development, and both companies are interested.

Pinterest is a business built on consumer aspiration, whereas Amazon is a business built on consumer pragmatism. Their identities and histories are reflected in the orthogonal ways that they're trying to "fix" shopping. Still, Pinterest and Amazon share the goal of wanting to be the first place you go when you're ready to look for lifestyle goods.

Who will win? Will there even be one winner? Betting on Amazon usually pays off, and that seems especially likely when you compare Pinterest's 175 million monthly active users with Amazon's estimated 80 million Prime members -- Pinterest would need to get almost half of its users to start buying things through its service in order to even approach parity. And this on top of Amazon's purported 43 percent market share of American e-commerce.

Nevertheless, Pinterest's "visual discovery" options are currently broader than Amazon's, and Pinterest's ethos meshes with fashion better than Amazon's massive, utilitarian marketplace. The smaller company will be banking on that.