Clip Comparison¶
v2¶
Class: ClipComparisonBlockV2
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.clip_comparison.v2.ClipComparisonBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Use the OpenAI CLIP zero-shot classification model to classify images.
This block accepts an image and a list of text prompts. The block then returns the similarity of each text label to the provided image.
This block is useful for classifying images without having to train a fine-tuned classification model. For example, you could use CLIP to classify the type of vehicle in an image, or if an image contains NSFW material.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/clip_comparison@v2
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Unique name of step in workflows. | ❌ |
classes |
List[str] |
List of classes to calculate similarity against each input image. | ✅ |
version |
str |
Variant of CLIP model. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Clip Comparison
in version v2
.
- inputs:
Stitch Images
,Pixelate Visualization
,Multi-Label Classification Model
,LMM For Classification
,Blur Visualization
,Single-Label Classification Model
,Mask Visualization
,OCR Model
,Object Detection Model
,SIFT
,Model Monitoring Inference Aggregator
,Polygon Visualization
,Halo Visualization
,Grid Visualization
,Google Vision OCR
,Model Comparison Visualization
,Email Notification
,Camera Focus
,CogVLM
,Image Threshold
,Keypoint Visualization
,Image Preprocessing
,Roboflow Dataset Upload
,Slack Notification
,Stitch OCR Detections
,Relative Static Crop
,Background Color Visualization
,Clip Comparison
,Bounding Box Visualization
,Ellipse Visualization
,Image Contours
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,LMM
,Stability AI Inpainting
,Reference Path Visualization
,VLM as Detector
,Dynamic Crop
,Triangle Visualization
,Absolute Static Crop
,Florence-2 Model
,SIFT Comparison
,Keypoint Detection Model
,Corner Visualization
,Perspective Correction
,Local File Sink
,Polygon Zone Visualization
,VLM as Classifier
,Dimension Collapse
,Image Slicer
,Trace Visualization
,Size Measurement
,OpenAI
,Webhook Sink
,Twilio SMS Notification
,Roboflow Custom Metadata
,Crop Visualization
,Instance Segmentation Model
,Buffer
,Roboflow Dataset Upload
,Clip Comparison
,Anthropic Claude
,Dynamic Zone
,Image Blur
,Circle Visualization
,Image Convert Grayscale
,Dot Visualization
,Google Gemini
,Florence-2 Model
,OpenAI
,Color Visualization
,CSV Formatter
,Llama 3.2 Vision
- outputs:
CLIP Embedding Model
,Mask Visualization
,Object Detection Model
,Line Counter
,YOLO-World Model
,Cache Get
,Halo Visualization
,Grid Visualization
,Google Vision OCR
,Email Notification
,Byte Tracker
,Image Threshold
,Template Matching
,Image Preprocessing
,Roboflow Dataset Upload
,Relative Static Crop
,Background Color Visualization
,Bounding Box Visualization
,Triangle Visualization
,Distance Measurement
,Time in Zone
,Florence-2 Model
,Detections Stitch
,SIFT Comparison
,Keypoint Detection Model
,Local File Sink
,Roboflow Custom Metadata
,Cache Set
,Crop Visualization
,Clip Comparison
,Single-Label Classification Model
,Identify Outliers
,Time in Zone
,Florence-2 Model
,Path Deviation
,OpenAI
,Color Visualization
,Multi-Label Classification Model
,Pixel Color Count
,Path Deviation
,Stitch Images
,Multi-Label Classification Model
,LMM For Classification
,Keypoint Detection Model
,Line Counter
,Instance Segmentation Model
,Single-Label Classification Model
,Model Monitoring Inference Aggregator
,Polygon Visualization
,VLM as Detector
,Model Comparison Visualization
,CogVLM
,Keypoint Visualization
,Detections Classes Replacement
,Slack Notification
,Identify Changes
,Clip Comparison
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Ellipse Visualization
,Byte Tracker
,LMM
,Reference Path Visualization
,Stability AI Inpainting
,VLM as Detector
,Dynamic Crop
,Byte Tracker
,Object Detection Model
,Corner Visualization
,Perspective Correction
,Polygon Zone Visualization
,VLM as Classifier
,Trace Visualization
,Size Measurement
,Webhook Sink
,OpenAI
,Detections Consensus
,Image Slicer
,Twilio SMS Notification
,Instance Segmentation Model
,Buffer
,Roboflow Dataset Upload
,VLM as Classifier
,Anthropic Claude
,Image Blur
,Circle Visualization
,Dot Visualization
,Google Gemini
,Segment Anything 2 Model
,Detections Stabilizer
,Llama 3.2 Vision
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Clip Comparison
in version v2
has.
Bindings
-
input
images
(image
): The image to infer on.classes
(list_of_values
): List of classes to calculate similarity against each input image.version
(string
): Variant of CLIP model.
-
output
similarities
(list_of_values
): List of values of any type.max_similarity
(float_zero_to_one
):float
value in range[0.0, 1.0]
.most_similar_class
(string
): String value.min_similarity
(float_zero_to_one
):float
value in range[0.0, 1.0]
.least_similar_class
(string
): String value.classification_predictions
(classification_prediction
): Predictions from classifier.parent_id
(parent_id
): Identifier of parent for step output.root_parent_id
(parent_id
): Identifier of parent for step output.
Example JSON definition of step Clip Comparison
in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/clip_comparison@v2",
"images": "$inputs.image",
"classes": [
"a",
"b",
"c"
],
"version": "ViT-B-16"
}
v1¶
Class: ClipComparisonBlockV1
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.models.foundation.clip_comparison.v1.ClipComparisonBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
Use the OpenAI CLIP zero-shot classification model to classify images.
This block accepts an image and a list of text prompts. The block then returns the similarity of each text label to the provided image.
This block is useful for classifying images without having to train a fine-tuned classification model. For example, you could use CLIP to classify the type of vehicle in an image, or if an image contains NSFW material.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/clip_comparison@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Unique name of step in workflows. | ❌ |
texts |
List[str] |
List of texts to calculate similarity against each input image. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Clip Comparison
in version v1
.
- inputs:
Florence-2 Model
,Stitch Images
,Pixelate Visualization
,SIFT Comparison
,Corner Visualization
,Blur Visualization
,Mask Visualization
,Perspective Correction
,SIFT
,Polygon Zone Visualization
,Polygon Visualization
,Halo Visualization
,Grid Visualization
,Dimension Collapse
,Image Slicer
,Model Comparison Visualization
,Trace Visualization
,Camera Focus
,Size Measurement
,Image Threshold
,OpenAI
,Keypoint Visualization
,Crop Visualization
,Image Preprocessing
,Buffer
,Clip Comparison
,Anthropic Claude
,Dynamic Zone
,Image Blur
,Relative Static Crop
,Circle Visualization
,Image Convert Grayscale
,Dot Visualization
,Google Gemini
,Background Color Visualization
,Clip Comparison
,Bounding Box Visualization
,Ellipse Visualization
,Image Contours
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Florence-2 Model
,Stability AI Inpainting
,Reference Path Visualization
,Dynamic Crop
,Color Visualization
,Triangle Visualization
,Llama 3.2 Vision
,Absolute Static Crop
- outputs:
Time in Zone
,Florence-2 Model
,Path Deviation
,LMM For Classification
,Keypoint Detection Model
,Line Counter
,Instance Segmentation Model
,Keypoint Detection Model
,Corner Visualization
,Mask Visualization
,Object Detection Model
,Perspective Correction
,Line Counter
,YOLO-World Model
,Polygon Zone Visualization
,Polygon Visualization
,VLM as Classifier
,Halo Visualization
,VLM as Detector
,Grid Visualization
,Trace Visualization
,Email Notification
,Webhook Sink
,OpenAI
,Detections Consensus
,Size Measurement
,Cache Set
,Instance Segmentation Model
,Crop Visualization
,Buffer
,Clip Comparison
,VLM as Classifier
,Anthropic Claude
,Circle Visualization
,Dot Visualization
,Google Gemini
,Clip Comparison
,Bounding Box Visualization
,Label Visualization
,Classification Label Visualization
,Line Counter Visualization
,Ellipse Visualization
,Time in Zone
,Florence-2 Model
,Reference Path Visualization
,Path Deviation
,VLM as Detector
,Triangle Visualization
,Color Visualization
,Llama 3.2 Vision
,Object Detection Model
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Clip Comparison
in version v1
has.
Bindings
-
input
images
(image
): The image to infer on.texts
(list_of_values
): List of texts to calculate similarity against each input image.
-
output
similarity
(list_of_values
): List of values of any type.parent_id
(parent_id
): Identifier of parent for step output.root_parent_id
(parent_id
): Identifier of parent for step output.prediction_type
(prediction_type
): String value with type of prediction.
Example JSON definition of step Clip Comparison
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/clip_comparison@v1",
"images": "$inputs.image",
"texts": [
"a",
"b",
"c"
]
}