How to Pre-Filter Images Before Sending Them to an LLM
Blog post from Roboflow
A Roboflow Workflows tutorial describes a two-stage image-filtering pipeline that uses an RF-DETR object detector to screen images before sending likely candidates to Google Gemini, reducing multimodal LLM calls, token use, and processing time while preserving relevant images. Using a sports-car marketing example, the detector identifies cars at a low confidence threshold to maximize recall, a Continue If gate excludes images with no detected car, and Gemini then determines whether the car is a sports car and the main subject, checks for visible alcohol or branding, and produces a short description. The workflow parses and validates Gemini’s structured JSON response, assigns outcomes such as filtered_out, llm_match, llm_rejection, or error, and can be run at scale through Python scripts that record detections, decisions, token counts, and errors. It recommends tuning the detector threshold on labeled data by balancing gate pass rate against recall, measuring end-to-end precision and recall on a representative test set, and retaining detector annotations for future reuse. The approach can be improved over time by reviewing LLM outputs and training custom classifiers or detectors, and it also applies to other inspection tasks, such as identifying relevant product-packaging images for label and damage checks.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| LLM | 31 | 4,648 | 925 | 203 | -23% |
| Serverless | 6 | 940 | 259 | 93 | -23% |
| Local AI | 1 | 146 | 56 | 17 | -32% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.