Connect with us

AI in Travel

A Deep Dive into Image Embeddings and Vector Search with BigQuery on Google Cloud

Published

on


A Deep Dive into Image Embeddings and Vector Search with BigQuery on Google Cloud
Image by Editor | ChatGPT

 

Introduction

 
We’ve all been there: scrolling endlessly through online stores, trying to find that perfect item. In today’s lightning-fast e-commerce world, we expect instant results, and that’s exactly where AI is stepping in to shake things up.

At the heart of this revolution is image embedding. It’s a fancy term for a simple idea: letting you search for products not just by keywords, but by their visual similarity. Imagine finding that exact dress you saw on social media just by uploading a picture! This technology makes online shopping smarter, more intuitive, and ultimately, helps businesses make more sales. 

Ready to see how it works? We’ll show you how to harness the power of BigQuery’s machine learning capabilities to build your own AI-driven dress search using these incredible image embeddings. 

 

The Magic of Image Embeddings

 
In essence, image embedding is the process of converting images into numerical representations (vectors) in a high-dimensional space. Images that are semantically similar (e.g. a blue ball gown and a navy blue dress) will have vectors that are “closer” to each other in this space. This allows for powerful comparisons and searches that go beyond simple metadata. 

Here are a few dress images we will use in this demo to generate embeddings.

 
Here are a few dress images we will use in this demo to generate embeddings.Here are a few dress images we will use in this demo to generate embeddings.
 

The demo will illustrate the process of creating a model for image embeddings on Google Cloud. 

The first step is to create a model: A model named image_embeddings_model is created which is leveraging the multimodalembedding@001 endpoint in image_embedding dataset.

CREATE OR REPLACE MODEL 
   `image_embedding.image_embeddings_model`
REMOTE WITH CONNECTION `[PROJECT_ID].us.llm-connection`
OPTIONS (
   ENDPOINT = 'multimodalembedding@001'
);

 

Creating an object table: To process the images in BigQuery, we will create an external table called external_images_table in the image_embedding dataset which will reference all the images stored in a Google Cloud Storage bucket.

CREATE OR REPLACE EXTERNAL TABLE 
   `image_embedding.external_images_table` 
WITH CONNECTION `[PROJECT_ID].us.llm-connection` 
OPTIONS( 
   object_metadata="SIMPLE", 
   uris = ['gs://[BUCKET_NAME]/*'], 
   max_staleness = INTERVAL 1 DAY, 
   metadata_cache_mode="AUTOMATIC"
);

 

Generating embeddings: Once the model and object table are in place, we will generate the embeddings for the dress images using the model we created above and store them in the table dress_embeddings.

CREATE OR REPLACE TABLE `image_embedding.dress_embeddings` AS SELECT * 
FROM ML.GENERATE_EMBEDDING( 
   MODEL `image_embedding.image_embeddings_model`, 
   TABLE `image_embedding.external_images_table`, 
   STRUCT(TRUE AS flatten_json_output, 
   512 AS output_dimensionality) 
);

 

Unleashing the Power of Vector Search

 
With image embeddings generated, we will use vector search to find the dress we are looking for. Unlike traditional search that relies on exact keyword matches, vector search finds items based on the similarity of their embeddings. This means you can search for images using either text descriptions or even other images.

 

// Dress Search via Text

Performing text search: Here we will use the VECTOR_SEARCH function within BigQuery to search for a “Blue dress” among all the dresses. The text “Blue dress” will be converted to a vector and then with the help of vector search we will retrieve similar vectors.

CREATE OR REPLACE TABLE `image_embedding.image_search_via_text` AS 
SELECT base.uri AS image_link, distance 
FROM 
VECTOR_SEARCH( 
   TABLE `image_embedding.dress_embeddings`, 
   'ml_generate_embedding_result', 
   ( 
      SELECT ml_generate_embedding_result AS embedding_col 
      FROM ML.GENERATE_EMBEDDING 
      ( 
         MODEL`image_embedding.image_embeddings_model` , 
            (
               SELECT "Blue dress" AS content
            ), 
            STRUCT 
         (
            TRUE AS flatten_json_output, 
            512 AS output_dimensionality
         ) 
      )
   ),
   top_k => 5 
)
ORDER BY distance ASC; 
SELECT * FROM `image_embedding.image_search_via_text`;

 

Results: The query results will provide an image_link and a distance for each result. You can see the results you will obtain will give you the closest match in regards to the search query and the dresses available.

 
ResultsResults

 

// Dress Search via Image

Now, we will look into how we can use an image to find similar images. Let’s try to find a dress that looks like the below image:

 

Let’s try to find a dress that looks like the below imageLet’s try to find a dress that looks like the below image

 

External table for test image: We will have to store the test image in the Google Cloud Storage Bucket and create an external table external_images_test_table, to store the test image used for the search.

CREATE OR REPLACE EXTERNAL TABLE 
   `image_embedding.external_images_test_table` 
WITH CONNECTION `[PROJECT_ID].us.llm-connection` 
OPTIONS( 
   object_metadata="SIMPLE", 
   uris = ['gs://[BUCKET_NAME]/test-image-for-dress/*'], 
   max_staleness = INTERVAL 1 DAY, 
   metadata_cache_mode="AUTOMATIC"
);

 

Generate embeddings for test image: Now, we will generate the embedding for this single test image using ML.GENERATE_EMBEDDING function.

CREATE OR REPLACE TABLE `image_embedding.test_dress_embeddings` AS 
SELECT * 
FROM ML.GENERATE_EMBEDDING
   ( 
      MODEL `image_embedding.image_embeddings_model`, 
      TABLE `image_embedding.external_images_test_table`, STRUCT(TRUE AS flatten_json_output, 
      512 AS output_dimensionality
   ) 
);

 

Vector search with image embedding: Finally, the embedding of the test image will be used to perform a vector search against the image_embedding.dress_embeddings table. The ml_generate_embedding_result from image_embedding.test_dress_embeddings will be used as the query embedding. 

SELECT base.uri AS image_link, distance 
FROM 
VECTOR_SEARCH( 
   TABLE `image_embedding.dress_embeddings`, 
   'ml_generate_embedding_result', 
   ( 
      SELECT * FROM `image_embedding.test_dress_embeddings`
   ),
   top_k => 5, 
   distance_type => 'COSINE', 
   options => '{"use_brute_force":true}' 
);

 

Results: The query results for the image search showed the most visually similar dresses. The top result was white-dress with a distance of 0.2243 , followed by sky-blue-dress with a distance of 0.3645 , and polka-dot-dress with a distance of 0.3828. 

 
These results clearly demonstrate the ability to find visually similar items based on an input image.These results clearly demonstrate the ability to find visually similar items based on an input image.
 

These results clearly demonstrate the ability to find visually similar items based on an input image. 

 

// The Impact

This demonstration effectively illustrates how image embeddings and vector search on Google Cloud can revolutionize how we interact with visual data. From e-commerce platforms enabling “shop similar” features to content management systems offering intelligent visual asset discovery, the applications are vast. By transforming images into searchable vectors, these technologies unlock a new dimension of search, making it more intuitive, powerful, and visually intelligent. 

These results can be presented to the user, enabling them to find the desired dress quickly.

 

Benefits of AI Dress Search

 

  1. Enhanced User Experience: Visual search provides a more intuitive and efficient way for users to find what they’re looking for
  2. Improved Accuracy: Image embeddings enable search based on visual similarity, delivering more relevant results than traditional keyword-based search
  3. Increased Sales: By making it easier for customers to find the products they want, AI dress search can boost conversions and drive revenue

 

Beyond Dress Search

 
By combining the power of image embeddings with BigQuery’s robust data processing capabilities, you can create innovative AI-driven solutions that transform the way we interact with visual content. From e-commerce to content moderation, the power of image embeddings and BigQuery extends beyond dress search. 

Here are some other potential applications: 

  • E-commerce: Product recommendations, visual search for other product categories
  • Fashion Design: Trend analysis, design inspiration
  • Content Moderation: Identifying inappropriate content
  • Copyright Infringement Detection: Finding visually similar images to protect intellectual property

Learn more about embeddings on BigQuery here and vector search here.
 
 

Nivedita Kumari is a seasoned Data Analytics and AI Professional with over 10 years of experience. In her current role, as a Data Analytics Customer Engineer at Google she constantly engages with C level executives and helps them architect data solutions and guides them on best practice to build Data and Machine learning solutions on Google Cloud. Nivedita has done her Masters in Technology Management with a focus on Data Analytics from the University of Illinois at Urbana-Champaign. She wants to democratize machine learning and AI, breaking down the technical barriers so everyone can be part of this transformative technology. She shares her knowledge and experience with the developer community by creating tutorials, guides, opinion pieces, and coding demonstrations.
Connect with Nivedita on LinkedIn.



Source link

Continue Reading
Click to comment

You must be logged in to post a comment Login

Leave a Reply

AI in Travel

Headed on a Summer Road Trip? AI Makes My Travel Planning Easier

Published

on


If you’re anything like me, you really like spontaneous, unplanned trips but don’t like organizing things ahead . If you’re planning a summer road trip, you’re sure to be one of many on the road, so it’s definitely a good idea to think about your route now so you can avoid the worst of the traffic and figure out what you can see along the way.

A friend sent me a list of different artificial intelligence tools they used to make trip planning easier. This list included Curiosio, an AI trip planning tool that provides a map, budget and calculated trip length for you within seconds. My ears perked up imagining its potential output speed.

Watch this: I Used Google’s Gemini Gem to Plan My Trip

What is Curiosio AI?

My nonnegotiables for an AI trip planner list include a bright and accessible interface, little to no fees and inspiration for my upcoming trip. Curiosio delivered. 

The tool was created by Vas Mylko and Roman Bilusiak to support solo, budget-conscious and multistop travelers seeking personalized road trip experiences that feature cost breakdowns and flexible itineraries.

The free, AI-powered platform offers features like route optimization, detailed itineraries with maps, cost and time breakdowns and detailed guides to destinations. 

Between its Geek, Travel and Beta modes, Curiosio compiles quite a few tools to help navigate and embellish your getaway, regardless of what kind of adventure you’re going on.

What I particularly enjoyed about Curiosio was the focus on road trips instead of trying to be an all-in-one travel planner. I also enjoyed its country-specific branding, which includes a hot air balloon adorned with each nation’s flag, and its typeface that is reminiscent of an Indiana Jones PC game. With many sleek, yet sterile, tech brands on the market, I thought this gave the website a sweet touch.

How to use Curiosio for AI road trip planning  

Curiosio/Screenshot by CNET

Let’s first break down the three modes within Curiosio: Travel, Geek and Beta. 

Travel Mode is for travelers or busybodies who want a simplified, real-time guide. Needless to say, I fall into this category. Here, you can follow your itinerary with directions and context-aware tips. This is perfect if you want hands-off-the-wheel support. 

There’s also Geek Mode, for the detail-driven, perfectionist folks who want control over every detail of their trip. Direct that friend or partner over to this mode so they can put all that energy in Curiosio, and not on you. Here you can customize routing, add filters and use logic to the best of your planning ability. 

And Beta Mode is for the innovative, experimental type who not only thrives off novelty, but loves diving into a new thing before anyone else. Here you can get access to AI enhancements (and bugs) but also try out new features. At the time of writing, Curiosio was developing its membership to focus on the travel experience. 

This is how to use Curiosio’s travel tool:

  1. Head to the website and enter your country. 
  2. Once selected, navigate to the top and select Travel to enter your starting point and desired destination(s) for your road trip. Specify dates, duration and your budget preferences.  
  3. Let the AI do its thing and create a personalized road trip plan. Curiosio promises that this will not take longer than 100 seconds. For reference, my plans were generated in about 35 seconds. 
  4. Review the suggested routes. My output generated four itineraries, ranging in budget and trip length. You can toggle to see the full itinerary breakdown, including a day-by-day itinerary, hotels and budget allocation. 
  5. Modify by adding or removing the destination to start over, or adjust the travel dates or budget to better fit your needs. 
  6. Once you’re satisfied, finalize your itinerary. This is where you can export the plan to your preferred format or integrate with other mapping tools. Head to the upper right corner of your trip itinerary and select Google Maps from the dropdown menu, or copy the link over to your preferred GPS system. 
  7. Then use Google Maps or your GPS system to monitor real-time traffic, plus check out any interesting spots between your starting point and your trip’s destination. (Though an integrated traffic monitoring system would be a beneficial addition to Curiosio.)

Should you use AI to plan your road trip?

Curiosio planned a trip to Jackson Hole for me. 

Curiosio/Screenshot by CNET

Curiosio is a simple yet ideal tool for independent travelers who crave flexibility, customization and a touch of adventure — especially those planning multistop road trips. 

I see it as a great fit for digital nomads, couples, small groups or anyone taking a chaotic road trip with family who wants a streamlined way to create detailed itineraries without relying on prepackaged tours. 

If you’re someone who enjoys the planning process but wants help optimizing routes while also discovering hidden gems, Curiosio can be a time-saving, dopamine-boosting tool. It’s also particularly useful for travelers who are budget-conscious but still want well-rounded travel experiences with context tailored to the places they’re going. I found the tool easy to navigate, and it definitely helped me save time.

Now, Curiosio might not be the best choice for travelers seeking all-inclusive vacations, group tours or very spontaneous getaways. If you prefer to book flights and resorts, or if your travel is centered around staying in one city the entire time, the platform’s road trip-focused approach may feel unnecessary and somewhat rudimentary. 

It’s safe to say that if you’re seeking an easy, functional and road trip-focused AI tool to support and speed up your planning process, Curiosio is a simple yet functional option.

Planning in seconds is an ideal compromise. Now, if only it could pack for me, too.





Source link

Continue Reading

AI in Travel

How the Galaxy AI Features on Galaxy Z Fold7 Redefine Wanderlust – Samsung Newsroom U.K.

Published

on


Buckle up! You’re flying to Seoul, South Korea, to watch your favorite K-pop group’s first full-squad comeback. Concert tickets? Secured. Flights? Booked. Bags? Packed. But before you start snapping that first airport selfie, you’ve got some planning to lock down.

 

Unfold Samsung Galaxy Z Fold7 — your ultimate travel companion with multimodal capability for smoother, and smarter travel.

 

As the thinnest and lightest Galaxy Z Fold series device yet, its pro-level cameras and AI features make it the ideal travel buddy. Translation: zero travel stress, max fandom vibes.

 

 

Before You Go: Unfold Your Travel Planner

 

You’re about to witness a once-in-a-lifetime reunion show, and it’s also your first time visiting Seoul. Relax. Galaxy Z Fold7 will handle the details.

 

Press and hold the side button to activate Gemini. Drop your concert date, hotel address and wish-list spots, then tell it:

 

“Recommend a 4-day, 3-night itinerary including a K-pop concert and save it to Samsung Notes.”

 

Gemini generates a custom itinerary, complete with must-visit fan cafés and your personal favorite’s trainee-era hangouts, fueling your ultimate K-pop pilgrimage.

 

“Should I pack this T-shirt or a hoodie?”

 

Don’t know what to pack? Let Gemini suggest for you. Activate camera sharing on Gemini Live[1] to hold up your outfit options and just ask Gemini what works best to get real-time advice. It will consider Seoul’s weather and the kind of exploring you’ll be doing. No more overpacking so you’ll have more room in your luggage to bring home all that concert swag.

 

When the jet-set countdown starts, Now Brief[2] has you covered. It shows your boarding pass details, Seoul’s current weather and real-time exchange rates front and centre — so you can check what matters at a glance, before your trip.

 

Gate to Stage: AI Navigates Your Tour

 

You land at Incheon International Airport and the clock is ticking, so you ask:

 

“What’s the fastest and most affordable route to my hotel carrying two suitcases?”

 

In no time, Gemini displays side-by-side cards for airport express trains, buses and taxis, complete with fares, travel times and transfer counts all laid out.

 

Seoul Highlights, From Tradition to Modernity

 

 

After leaving your luggage at the hotel, day one kicks off at Bukchon Hanok Village, the perfect “Hello, Korea” setting for your vlog. Rest the Galaxy Z Fold7 on a ledge — Flex Mode lets you shoot easily, no tripod needed, while capturing the full Hanok backdrop

 

But wait. Those unwanted photobombers in your pictures? Gone. Galaxy AI’s Photo Assist understands the whole scene, and Suggest Erases[3] automatically detects and removes them with one tap. All done without post-editing hassle. Plus, with Side-by-Side Editing and Show Original, you can instantly compare the before-and-after images on the unfolded screen.

 

 

Next stop: K-beauty heaven. Aisles and aisles of products, but when you pick one up to read the label, it’s all in Korean. No worries. Camera sharing on Gemini Live can translate the ingredient labels listed in Korean, sprinkling in emojis for context to help you know what you’re buying. Still overwhelmed? Ask Gemini:

 

“Recommend one for sensitive skin.

 

Gemini cross-checks the ingredients and suggests a top 3 recommendation list tailored to you. You can check out like a skincare pro, not a confused tourist.

 

Main Stage Moment: Your Favourite Idol Up Close

 

 

It’s finally the big day. Your lightstick is charged, your phone is fully juiced and the stadium is crowded with fans. You might be stuck in the nosebleeds, but Galaxy Z Fold7’s 200MP camera captures your personal favorite up close with crystal-clear detail. Moreover, thanks to the 10 MP 100° front camera, you can squeeze all your new friends into one frame and still grab the boys on stage too. When the arena goes dark, Nightography kicks in, turning a sea of flickering lightsticks into sharp, balanced footage you’ll replay on a loop after the encore.

 

Final Encore: Edit and Elevate

 

 

Say goodbye, Seoul — hello airborne edit bay. Plane rides are perfect for some creativity. With Galaxy Z Fold7’s expansive screen, editing your travel vlog is easier than ever. Use the upgraded Audio Eraser[4] to reduce the sound of the crowd’s background noise so your favourite member’s vocals shine.

 

Z Fold7: The Perfect Travel Companion

 

Galaxy Z Fold7 isn’t just another travel gadget — it’s the backstage pass, stylist, translator, map and editing tool that elevates your creativity to the next level. It’s no longer the smartphone era; welcome to the age of the AI sidekick. Skip the endless search bars and just talk. Unfold your phone, and half your trip is already handled. So go ahead, live your best wanderlust life. Galaxy Z Fold7’s got your back from take-off to touchdown.

 

 

[1] Samsung Account login and network connection required. A visible watermark is overlaid on the saved image to indicate it was generated by Galaxy AI. Accuracy of output is not guaranteed.

[2] Compatible with selected languages only. Google account login and network connection required. Google and Gemini are trademarks of Google LLC. Samsung account login is required for certain AI features.

[3] Samsung account login and network connection required.

[4] Samsung account login required. Six types of sound can be detected; voices, music, wind, nature, crowd and noise. Results may vary depending on audio source and condition of the video.

 



Source link

Continue Reading

AI in Travel

How Galaxy AI Features on Galaxy Z Fold7 Redefine Wanderlust

Published

on


Buckle up! You’re flying to Seoul, South Korea, to watch your favorite K-pop group’s first full-squad comeback. Concert tickets? Secured. Flights? Booked. Bags? Packed. But before you start snapping that first airport selfie, you’ve got some planning to lock down.

Unfold Samsung Galaxy Z Fold7 — your ultimate travel companion with multimodal capabilities for smoother and smarter travel.

As the thinnest and lightest Galaxy Z Fold series device yet, its pro-level cameras and AI features make it the ideal travel buddy. Translation: zero travel stress, max fandom vibes.

Before You Go: Unfold Your Travel Planner

You’re about to witness a once-in-a-lifetime reunion show, and it’s also your first time visiting Seoul. Relax. Galaxy Z Fold7 will handle the details.

Press and hold the side button to activate Gemini.1 Drop your concert date, hotel address, and wish-list spots, then tell it:

“Recommend a 4-day, 3-night itinerary including a K-pop concert and save it to Samsung Notes.” 

Gemini generates a custom itinerary, complete with must-visit fan cafés and the band’s favorite hangout spots, fueling your ultimate K-pop pilgrimage.

“Should I pack this T-shirt or a hoodie?”

Don’t know what to pack? Let Gemini make a recommendation. Use Camera Sharing on Gemini Live and hold up your outfit options, ask Gemini what works best, and receive real-time advice. It’ll consider Seoul’s weather and your activities. No more overpacking, so you’ll have more room in your luggage to bring home all that concert swag.

When the jet-set countdown starts, Now Brief2 has you covered. It shows your boarding pass details, Seoul’s current weather, and real-time exchange rates front and center — so you can check what matters at a glance, before your trip.

Gate to Stage: AI Navigates Your Tour

You land at Incheon International Airport and the clock is ticking. So, you ask:

“What’s the fastest and most affordable route to my hotel carrying two suitcases?”

In no time, Gemini displays side-by-side cards for airport express trains, buses, and taxis, complete with fares, travel times, and transfers all laid out.

Seoul Highlights, From Tradition to Modernity

After leaving your luggage at the hotel, day one kicks off at Bukchon Hanok Village, the perfect “Hello, Korea” setting for your vlog. Rest Galaxy Z Fold7 on a ledge and Flex Mode will let you shoot easily, no tripod needed, while capturing the full Hanok backdrop.

But wait. Are there photobombers in your pictures? Now, they’re gone. Galaxy AI’s3 Photo Assist understands the whole scene and Suggest Erases automatically detects and removes them with a tap. All done without post-editing hassle. Plus, with Side-by-Side Editing and Show Original, you can instantly compare the before-and-after images on the unfolded screen.

Next stop: K-beauty heaven. Aisles and aisles of products, but when you pick one up to read the label, it’s all in Korean. No worries. Camera Sharing on Gemini Live, can translate the  labels listed in Korean, sprinkling in emojis for context to help you know what you’re buying. Still overwhelmed? Ask Gemini:

“Recommend one for sensitive skin.

Gemini cross-checks ingredients and suggests 3 recommendations tailored to your needs, so you can check out like a skincare pro, not a confused tourist.

Main Stage Moment: Your Favorite Idol Up Close

It’s finally the big day. Your lightstick is charged, phone is fully juiced, and the stadium is crowded with fans. You might be stuck in the nosebleeds, but Galaxy Z Fold7’s 200MP camera captures your favorite band member up close with crystal-clear detail. Plus, thanks to the 10MP 100° front camera you can squeeze all your new friends into one frame and still grab the boys on stage too. When the arena goes dark, Nightography kicks in, turning a sea of flickering lightsticks into sharp, balanced footage you’ll replay on a loop after the encore.

Final Encore: Edit and Elevate

Say goodbye, Seoul, hello airborne editing. Plane rides are perfect for some creativity. With Galaxy Z Fold7’s expansive screen, editing your travel vlog is easier than ever. Use the upgraded Audio Eraser4 to reduce the crowd’s background noise so your favorite member’s  vocals shine.

Z Fold7: The Perfect Travel Companion

Galaxy Z Fold7 isn’t just another travel gadget — it’s the backstage pass, stylist, translator, map, and editing tool that elevates your creativity to the next level. It’s no longer the smartphone era; welcome to the age of the AI sidekick. Skip the endless search bars and just talk. Unfold your phone, and half your trip is already handled. So go ahead, live your best wanderlust life. Galaxy Z Fold7’s got your back from takeoff to touchdown.



Source link

Continue Reading

Trending

Copyright © 2025 AISTORIZ. For enquiries email at prompt@travelstoriz.com