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:
Instance Segmentation Model,Twilio SMS Notification,Polygon Zone Visualization,Absolute Static Crop,OPC UA Writer Sink,Google Gemma API,Qwen-VL,Reference Path Visualization,Image Stack,Stability AI Inpainting,Triangle Visualization,Crop Visualization,Anthropic Claude,Image Convert Grayscale,EasyOCR,Model Comparison Visualization,Detection Event Log,Camera Focus,Image Slicer,Stitch OCR Detections,Llama 3.2 Vision,Heatmap Visualization,Stitch Images,Keypoint Visualization,Anthropic Claude,Polygon Visualization,Webhook Sink,Florence-2 Model,MoonshotAI Kimi,Dynamic Crop,Qwen 3.6 API,Event Writer,Perspective Correction,Google Gemini,Line Counter,Polygon Visualization,QR Code Generator,GLM-OCR,VLM As Detector,MoonshotAI Kimi,OCR Model,Roboflow Visual Search Classifier,Multi-Label Classification Model,Circle Visualization,Twilio SMS/MMS Notification,Slack Notification,Line Counter,CogVLM,Contrast Enhancement,Grid Visualization,Distance Measurement,Ellipse Visualization,LMM For Classification,Florence-2 Model,Pixelate Visualization,OpenAI,Corner Visualization,Local File Sink,Roboflow Custom Metadata,Image Blur,Label Visualization,Qwen3.5-VL,Llama 3.2 Vision,Template Matching,Object Detection Model,Anthropic Claude,Pixel Color Count,Qwen 3.5 API,LMM,Roboflow Visual Search,Roboflow Vision Events,Image Preprocessing,OpenAI-Compatible LLM,Trace Visualization,Morphological Transformation,Color Visualization,Roboflow Dataset Upload,Email Notification,SIFT Comparison,Stability AI Outpainting,Morphological Transformation,Camera Calibration,Dot Visualization,Current Time,Keypoint Detection Model,Roboflow Asset Library Attributes,Halo Visualization,Microsoft SQL Server Sink,Google Vision OCR,Classification Label Visualization,Clip Comparison,Bounding Box Visualization,Image Contours,Camera Focus,OpenAI,Halo Visualization,OpenRouter,S3 Sink,Stability AI Image Generation,Google Gemma,Relative Static Crop,Roboflow Dataset Upload,Contrast Equalization,OpenAI,CSV Formatter,Image Slicer,Stitch OCR Detections,Google Gemini,Email Notification,Model Monitoring Inference Aggregator,MQTT Writer,Text Display,Depth Estimation,Image Threshold,Icon Visualization,Blur Visualization,OpenAI,Line Counter Visualization,Google Gemini,PLC Writer,SIFT Comparison,SIFT,Single-Label Classification Model,Background Subtraction,VLM As Classifier,Background Color Visualization,Mask Visualization - outputs:
Absolute Static Crop,Gaze Detection,Triangle Visualization,EasyOCR,Detection Event Log,Stitch OCR Detections,Track Class Lock,Llama 3.2 Vision,Heatmap Visualization,Webhook Sink,Keypoint Visualization,Detections Stabilizer,Continue If,Dominant Color,GLM-OCR,Instance Segmentation Model,VLM As Detector,SAM2 Video Tracker,Twilio SMS/MMS Notification,Distance Measurement,SmolVLM2,Pixelate Visualization,Corner Visualization,Buffer,Template Matching,Per-Class Confidence Filter,Velocity,Roboflow Visual Search,OpenAI-Compatible LLM,Morphological Transformation,Color Visualization,Roboflow Dataset Upload,Morphological Transformation,Camera Calibration,Clip Comparison,Bounding Box Visualization,OpenAI,Halo Visualization,Contrast Equalization,Instance Segmentation Model,Model Monitoring Inference Aggregator,Multi-Label Classification Model,Cache Set,Blur Visualization,Microsoft SQL Server Sink,Single-Label Classification Model,Background Subtraction,Object Detection Model,Twilio SMS Notification,SAM 3,OPC UA Writer Sink,Path Deviation,QR Code Detection,Keypoint Detection Model,Image Stack,SAM 3 Interactive,Qwen3-VL,Stability AI Inpainting,Multi-Label Classification Model,Perception Encoder Embedding Model,Image Convert Grayscale,Camera Focus,Florence-2 Model,Time in Zone,Dynamic Crop,Qwen 3.6 API,Perspective Correction,Segment Anything 2 Model,CogVLM,Mask Edge Snap,LMM For Classification,Florence-2 Model,Label Visualization,ByteTrack Tracker,Image Blur,Seg Preview,Object Detection Model,Path Deviation,Anthropic Claude,Pixel Color Count,Trace Visualization,Email Notification,SIFT Comparison,Stability AI Outpainting,PTZ Tracking (ONVIF),Current Time,Image Contours,Camera Focus,Single-Label Classification Model,Moondream2,Stability AI Image Generation,VLM As Detector,Google Gemma,Google Gemini,BoT-SORT Tracker,Email Notification,Byte Tracker,SAM 3,Detections Stitch,Text Display,Semantic Segmentation Model,Qwen3.5,OpenAI,Time in Zone,SIFT,Detections List Roll-Up,MoonshotAI Kimi,Mask Visualization,VLM As Classifier,Qwen-VL,Cache Get,Model Comparison Visualization,OC-SORT Tracker,YOLO-World Model,Anthropic Claude,Stitch Images,Google Gemini,QR Code Generator,Multi-Label Classification Model,Line Counter,Ellipse Visualization,Single-Label Classification Model,Keypoint Detection Model,Llama 3.2 Vision,Qwen2.5-VL,Qwen 3.5 API,LMM,Semantic Segmentation Model,Motion Detection,Google Vision OCR,SAM3 Video Tracker,Object Detection Model,Mask Area Measurement,Detections Classes Replacement,MQTT Writer,PLC Reader,Image Threshold,Line Counter Visualization,Google Gemini,Background Color Visualization,Instance Segmentation Model,Polygon Zone Visualization,Google Gemma API,Reference Path Visualization,Crop Visualization,Anthropic Claude,Dynamic Zone,Image Slicer,Polygon Visualization,MoonshotAI Kimi,Event Writer,Line Counter,Polygon Visualization,Clip Comparison,OCR Model,Roboflow Visual Search Classifier,Circle Visualization,Slack Notification,PLC EthernetIP,Contrast Enhancement,Grid Visualization,Time in Zone,Barcode Detection,Local File Sink,Qwen3.5-VL,OpenAI,Roboflow Custom Metadata,SORT Tracker,Roboflow Vision Events,Image Preprocessing,Detections Consensus,Keypoint Detection Model,Dot Visualization,Roboflow Asset Library Attributes,Halo Visualization,SAM 3,Classification Label Visualization,OpenRouter,S3 Sink,CLIP Embedding Model,Roboflow Dataset Upload,Relative Static Crop,OpenAI,Image Slicer,Stitch OCR Detections,Size Measurement,Depth Estimation,Icon Visualization,GeoTag Detection,Instance Segmentation Model,PLC Writer,VLM As Classifier
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
}