Roboflow Visual Search Classifier¶
Class: RoboflowVisualSearchClassifierBlockV1
Search a Roboflow classification project for the visually closest image and return
the matched image's classification annotation as a standard classification
prediction. Single-label annotations are returned in single-label classification
shape, and multi-label annotations are returned in multi-label classification
shape. Classification confidence is derived from the best candidate's public
Roboflow project search score field when present.
This block performs an external visual search API call and is not intended for
real-time or high-throughput workloads. To bound latency, query images are
downscaled with aspect ratio preserved to a maximum side length of 224 pixels by
default. Increase max_image_size when finer visual matching is more important
than lower latency.
How This Block Works¶
This block uses Roboflow project image search:
- Receives an input image from the workflow
- Downscales the query image if its larger side exceeds
max_image_size - Sends the query image to Roboflow project search as
image_base64 - Requests candidate image fields and classification labels or annotations
- Uses the best candidate's annotation as the predicted class
- Maps the API
scorefield to classification confidence when present - Returns the result through the standard
predictionsclassification output
The target project must expose classification annotation data in visual search results. This block does not train a model, create annotations, consume raw search backend relevance scores, or manage the visual search index.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/visual_search_classifier@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
target_project |
str |
Roboflow classification project URL slug to search.. | ✅ |
workspace |
str |
Optional Roboflow workspace URL slug that owns the target project. If not provided, the workspace is resolved from the request API key.. | ✅ |
top_k |
int |
Number of visually similar image candidates to request. The nearest candidate is used for classification.. | ✅ |
max_image_size |
int |
Maximum side length, in pixels, for the visual search query image. Images larger than this are downscaled with aspect ratio preserved before search. Increase this value for finer matching at higher latency.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Roboflow Visual Search Classifier in version v1.
- inputs:
Keypoint Visualization,Stitch OCR Detections,Twilio SMS/MMS Notification,OPC UA Writer Sink,PP-OCR,Qwen 3.6 API,Blur Visualization,EasyOCR,SIFT Comparison,Anthropic Claude,Grid Visualization,CSV Formatter,Color Visualization,Llama 3.2 Vision,PLC Writer,Image Convert Grayscale,Absolute Static Crop,Stitch OCR Detections,Distance Measurement,Roboflow Visual Search Classifier,Single-Label Classification Model,Qwen 3.5 API,Image Threshold,Icon Visualization,Polygon Zone Visualization,Trace Visualization,Current Time,CogVLM,Model Comparison Visualization,Camera Focus,QR Code Generator,Google Gemini,Image Stack,MQTT Writer,Contrast Equalization,Google Gemini,OCR Model,GLM-OCR,Qwen-VL,Background Subtraction,Mask Visualization,Reference Path Visualization,Contrast Enhancement,Twilio SMS Notification,Instance Segmentation Model,Google Gemma API,MoonshotAI Kimi,Microsoft SQL Server Sink,Text Display,VLM As Detector,Florence-2 Model,Dynamic Crop,Halo Visualization,Image Blur,Stability AI Image Generation,LMM,Google Vision OCR,Webhook Sink,OpenAI,Ellipse Visualization,Pixelate Visualization,Stitch Images,OpenAI,Florence-2 Model,Line Counter,LMM For Classification,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Polygon Visualization,Anthropic Claude,Roboflow Dataset Upload,Event Writer,OpenAI,Keypoint Detection Model,Morphological Transformation,Google Gemma,Detection Event Log,Bounding Box Visualization,Template Matching,Slack Notification,Image Contours,Image Slicer,Heatmap Visualization,Stability AI Outpainting,Anthropic Claude,Email Notification,Circle Visualization,Roboflow Custom Metadata,Perspective Correction,Camera Focus,Camera Calibration,Roboflow Asset Library Attributes,Crop Visualization,Morphological Transformation,Polygon Visualization,Line Counter,Multi-Label Classification Model,Relative Static Crop,Background Color Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,Clip Comparison,OpenAI-Compatible LLM,Corner Visualization,Object Detection Model,SIFT,VLM As Classifier,Image Slicer,Google Gemini,Roboflow Vision Events,Roboflow Visual Search,OpenRouter,Llama 3.2 Vision,Qwen3.5-VL,Local File Sink,Email Notification,Triangle Visualization,OpenAI,Roboflow Dataset Upload,Pixel Color Count,Dot Visualization,Image Preprocessing,SIFT Comparison,Line Counter Visualization,Halo Visualization,Depth Estimation,Label Visualization - outputs:
Perception Encoder Embedding Model,Qwen 3.6 API,Object Detection Model,PLC Writer,Llama 3.2 Vision,Distance Measurement,Roboflow Visual Search Classifier,Polygon Zone Visualization,BoT-SORT Tracker,Contrast Equalization,Google Gemini,Background Subtraction,Twilio SMS Notification,VLM As Detector,Florence-2 Model,Halo Visualization,SAM 3 Interactive,Dynamic Crop,Seg Preview,Ellipse Visualization,Florence-2 Model,Line Counter,Cache Set,OpenAI,Time in Zone,Google Gemma,Buffer,Semantic Segmentation Model,Email Notification,Detections Consensus,Crop Visualization,Polygon Visualization,Keypoint Detection Model,Line Counter,Object Detection Model,VLM As Classifier,Google Gemini,Multi-Label Classification Model,Qwen3.5,Object Detection Model,Time in Zone,Instance Segmentation Model,PP-OCR,Blur Visualization,Clip Comparison,EasyOCR,PLC EthernetIP,Segment Anything 2 Model,Color Visualization,Dynamic Zone,Motion Detection,Image Convert Grayscale,Stitch OCR Detections,Qwen 3.5 API,Trace Visualization,Current Time,Cache Get,PLC Reader,QR Code Generator,Google Gemini,Detections Stitch,Image Stack,Instance Segmentation Model,MoonshotAI Kimi,Microsoft SQL Server Sink,Continue If,Webhook Sink,Pixelate Visualization,Stitch Images,Polygon Visualization,Morphological Transformation,SmolVLM2,Template Matching,Image Slicer,Barcode Detection,Roboflow Asset Library Attributes,Relative Static Crop,Mask Area Measurement,Model Monitoring Inference Aggregator,Clip Comparison,SIFT,Dominant Color,Moondream2,OpenRouter,Qwen3.5-VL,Email Notification,Triangle Visualization,Roboflow Dataset Upload,Pixel Color Count,SIFT Comparison,Keypoint Visualization,Twilio SMS/MMS Notification,Keypoint Detection Model,OPC UA Writer Sink,Grid Visualization,SAM 3,Absolute Static Crop,Velocity,Image Threshold,CogVLM,MQTT Writer,Detections List Roll-Up,OCR Model,GLM-OCR,Contrast Enhancement,Reference Path Visualization,Google Gemma API,Instance Segmentation Model,Mask Edge Snap,Detections Classes Replacement,PTZ Tracking (ONVIF),Image Blur,LMM,SAM 3,OpenAI,LMM For Classification,Time in Zone,Path Deviation,Instance Segmentation Model,Event Writer,Semantic Segmentation Model,Single-Label Classification Model,Keypoint Detection Model,Slack Notification,Heatmap Visualization,SORT Tracker,Circle Visualization,Perspective Correction,Camera Focus,Byte Tracker,ByteTrack Tracker,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,SAM 3,Image Slicer,Roboflow Vision Events,Size Measurement,Local File Sink,SAM3 Video Tracker,Dot Visualization,QR Code Detection,Line Counter Visualization,Depth Estimation,Stitch OCR Detections,Anthropic Claude,Per-Class Confidence Filter,Qwen2.5-VL,Qwen3-VL,Single-Label Classification Model,Icon Visualization,Model Comparison Visualization,Camera Focus,Qwen-VL,Mask Visualization,Text Display,Gaze Detection,Stability AI Image Generation,Google Vision OCR,OpenAI,VLM As Detector,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Anthropic Claude,Roboflow Dataset Upload,Detection Event Log,Bounding Box Visualization,VLM As Classifier,Image Contours,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Multi-Label Classification Model,SAM2 Video Tracker,Camera Calibration,Morphological Transformation,Detections Stabilizer,Path Deviation,Background Color Visualization,Corner Visualization,GeoTag Detection,Track Class Lock,Roboflow Visual Search,Llama 3.2 Vision,CLIP Embedding Model,Single-Label Classification Model,OpenAI,OC-SORT Tracker,Image Preprocessing,YOLO-World Model,Halo Visualization,Label Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Roboflow Visual Search Classifier in version v1 has.
Bindings
-
input
image(image): Image to classify using visual search..target_project(roboflow_project): Roboflow classification project URL slug to search..workspace(string): Optional Roboflow workspace URL slug that owns the target project. If not provided, the workspace is resolved from the request API key..top_k(integer): Number of visually similar image candidates to request. The nearest candidate is used for classification..max_image_size(integer): Maximum side length, in pixels, for the visual search query image. Images larger than this are downscaled with aspect ratio preserved before search. Increase this value for finer matching at higher latency..
-
output
predictions(classification_prediction): Predictions from classifier.inference_id(inference_id): Inference identifier.candidate_found(boolean): Boolean flag.class_found(boolean): Boolean flag.best_candidate(dictionary): Dictionary.candidates(list_of_values): List of values of any type.best_candidate_image(image): Image in workflows.visual_search_score(float): Float value.error_status(boolean): Boolean flag.message(string): String value.
Example JSON definition of step Roboflow Visual Search Classifier in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/visual_search_classifier@v1",
"image": "$inputs.image",
"target_project": "reference-images",
"workspace": "my-workspace",
"top_k": 1,
"max_image_size": 224
}