Analyze images in batch with AI vision
Run the same AI prompt against multiple images automatically, without writing loops or managing API calls.
You have a batch of images that need AI-powered transformations—like turning photos into paintings, adding stylistic effects, or modifying content based on text prompts.
Images · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You can iterate on transformations before adding them to your table. Use .select() with .collect() to preview results on sample images—nothing is stored in your table. If you want to collect only the first few rows, use .head(n) instead of .collect(). Once you're satisfied, use .add_computed_column() to apply the transformation to all images in your table.
For more on this workflow, see Get fast feedback on transformations.
pip install pixeltable torch transformers diffusers accelerate
huggingface.image_to_image()pxt.create_table()insert()add_computed_column()# Save as computed columnt.add_computed_column(transformed=image_to_image(t.image,t.prompt,model_id='stable-diffusion-v1-5/stable-diffusion-v1-5',model_kwargs={'strength': 0.5,'num_inference_steps': 25,'negative_prompt': t.negative_prompt,},))
One cell of the notebook, copied as it is. Open it in Colab for the rest.
Run the same AI prompt against multiple images automatically, without writing loops or managing API calls.
Use AI vision to extract JSON data from receipts, forms, documents, and other images.
You need to add watermarks to hundreds of different images to protect copyright, add branding, or mark drafts.
You need to make hundreds of images semi-transparent for backgrounds, overlays, or watermarks.