Image Metadata Retrieval with ThanoSQL
wget
command below:Unsplash Embedding Sample Table (unsplash_embed_sample)
Contains detailed metadata about the images including information about the photographer, camera settings, and location.
Field | Description |
---|---|
photo_id | Unique identifier for each photo. |
photo_url | URL of the photo on Unsplash. |
photo_image_url | URL of the photo image. |
photo_submitted_at | Date when the photo was submitted. |
photo_featured | Indicates if the photo is featured. |
photo_width | Width of the photo in pixels. |
photo_height | Height of the photo in pixels. |
photo_aspect_ratio | Aspect ratio of the photo. |
photo_description | Description of the photo. |
photographer_username | Username of the photographer. |
photographer_first_name | First name of the photographer. |
photographer_last_name | Last name of the photographer. |
exif_camera_make | Camera make. |
exif_camera_model | Camera model. |
exif_iso | ISO setting of the camera. |
exif_aperture_value | Aperture value. |
exif_focal_length | Focal length. |
exif_exposure_time | Exposure time. |
photo_location_name | Name of the photo location. |
photo_location_latitude | Latitude of the photo location. |
photo_location_longitude | Longitude of the photo location. |
photo_location_country | Country of the photo location. |
photo_location_city | City of the photo location. |
stats_views | Number of views. |
stats_downloads | Number of downloads. |
ai_description | AI-generated description of the photo. |
ai_primary_landmark_name | AI-generated primary landmark name. |
ai_primary_landmark_latitude | Latitude of the AI-generated primary landmark. |
ai_primary_landmark_longitude | Longitude of the AI-generated primary landmark. |
ai_primary_landmark_confidence | Confidence of the AI-generated primary landmark. |
blur_hash | Blur hash of the image. |
Unsplash Metadata Sample Table (unsplash_meta_sample)
Contains image paths and their corresponding embeddings.
Field | Description |
---|---|
photo_id | Unique identifier for each photo. |
image_path | Path to the image. |
embedding | Embedding vector of the image. |
show_images
, displays images from URLs. It accepts either a single URL or a DataFrame containing multiple URLs. The function fetches each image using the URL, processes it using PIL, and then displays it using matplotlib.
unsplash_embed_sample
table to ThanoSQL. This table contains image paths and their corresponding embeddings.unsplash_embed_sample
data to ThanoSQL and retrieves the first 10 records to confirm the upload.
unsplash_meta_sample
table which contains detailed metadata about the images.
unsplash_meta_sample
data to ThanoSQL and retrieves the first 10 records to confirm the upload.unsplash_embed_sample
table.vector
extension is available and adds an embedding column to the unsplash_embed_sample
table if it does not already exist.unsplash_embed_sample
table using a pre-trained model.show_images
function with a single image URL of a coastal cliff which will be used to search similar images from the sample dataset. It will display the image inline in the notebook.