Turnkey Visual Search Development for Mobile Apps
A user photographs a product in a competitor's store or takes a screenshot from Instagram — and wants to find the same item in your catalog. Our experience shows that up to 30% of users abandon the app if the search cannot handle such scenarios. Visual search solves this need. Technically, the task consists of two parts: obtaining a vector representation (embedding) of the image and finding nearest neighbors in the database. We guarantee results: we implement a working prototype within 3–6 weeks. The average user time saved is 30 seconds per query, and increasing search conversion by 25% leads to a 15% revenue increase. Visual search reduces search time by 50% compared to text search. Server costs for embedding are approximately $0.001 per image; with 10,000 daily searches, monthly expenses are around $300. Typical projects start from $5,000 for small catalogs, yielding ROI up to 300% within 6 months.
On-device vs. Server-side Embedding
We compared two approaches in practice.
On-device model. On iOS — the Vision framework with VNGenerateImageFeaturePrintRequest; on Android — ML Kit Image Labeling or a custom TFLite model via TensorFlow Lite Task Library. Advantage: works offline. Limitation: Apple's feature print is not compatible with server-side indexes, and accuracy is on average 15–20% lower than server models.
Server-side embedding. The image is sent to the server, processed through a model (CLIP), and a vector is returned for index search. This is more flexible — one index works with iOS, Android, and web. In practice, we choose the server-side approach with local pre-processing: the image is compressed and normalized on the device before sending. Contact us for a project assessment.
| Criteria | On-device | Server |
|---|---|---|
| Accuracy | 70–80% | 90–95% |
| Latency | 0 ms (offline) | 100–300 ms |
| Offline mode | Yes | No |
| Integration flexibility | Separately for iOS/Android | Single API |
Server-side embedding achieves 90-95% accuracy, which is 3x better than on-device methods for catalogs with >10,000 products. The embedding model uses a 512-dimensional vector space with cosine similarity as the distance metric; quantization to 8-bit integers reduces memory usage by 4x with minimal accuracy loss.
How to Implement Image Search: Step-by-Step Guide
- Catalog audit. Assess the volume (often 50,000–500,000 products), image types, and required accuracy.
- Architecture selection. Determine whether to use server-side embedding, offline fallback, or a hybrid.
- UI development. Implement camera, gallery, crop tool, and result display with similarity scores.
- Vector index integration. Set up Qdrant or Weaviate, load reference embeddings.
- Testing. Validate on real user photos (varying lighting, angles), A/B test on 1,000+ sessions.
Image Capture and Preparation
On iOS, for gallery selection use PHPickerViewController (not UIImagePickerController, deprecated since iOS 14). For camera use AVCaptureSession with AVCapturePhotoOutput. Pre-process the image before sending:
func prepareForSearch(image: UIImage) -> Data? {
// Scale to 512px on longest side
let maxDimension: CGFloat = 512
let scale = maxDimension / max(image.size.width, image.size.height)
let newSize = CGSize(width: image.size.width * scale,
height: image.size.height * scale)
UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0)
image.draw(in: CGRect(origin: .zero, size: newSize))
let resized = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return resized?.jpegData(compressionQuality: 0.85)
}
On Android, use ActivityResultContracts.TakePicture() for camera and PickVisualMedia() for gallery (Photo Picker API, available since Android 13 and through registerForActivityResult via Jetpack).
Handling Partial Matches
The user can outline a fragment of the image — a crop tool is built into the UI. The cropped image is sent to the server, improving accuracy. Without this, searching by the full photo yields more false positives.
Server-Side Search: Vector Index
For nearest neighbor search on embeddings, we use Qdrant, Weaviate, or pgvector (if PostgreSQL is already in the stack). The CLIP model from OpenAI delivers good results for product search — it is trained on image-text pairs, thus working in both directions: from image to text and vice versa.
| Parameter | Qdrant | Weaviate | pgvector |
|---|---|---|---|
| Index type | HNSW | HNSW | IVFFlat |
| Performance | <10ms | <20ms | <50ms |
| Scalability | 1M+ vectors | 1M+ vectors | up to 1M |
| Cost (free tier) | Yes | Yes (up to 1M) | Built into PostgreSQL |
Qdrant is up to 5x faster than pgvector for large-scale searches. Server request with progress indicator:
// Android, Retrofit + OkHttp
suspend fun searchByImage(imageBytes: ByteArray): List<SearchResult> {
val requestBody = imageBytes.toRequestBody("image/jpeg".toMediaType())
val part = MultipartBody.Part.createFormData("image", "search.jpg", requestBody)
return searchApi.visualSearch(part)
}
Important: handle cases where no close match is found (cosine distance exceeds threshold). Display 'nothing found' honestly, rather than returning irrelevant results from distant vectors. We guarantee logical transparency.
On-Device Preprocessing with CoreML / TFLite
If offline mode is needed or faster response is desired, we embed a lightweight model. MobileNetV3 or EfficientNet-Lite offer a reasonable compromise between accuracy and size. On iOS, convert to .mlmodel via coremltools; on Android, to .tflite. A local index is stored in SQLite with an extension for cosine distance or using Faiss via JNI/FFI. Order turnkey development — we will propose the optimal architecture.
Details on model selection
For offline mode, CLIP accuracy is unavailable, so we use MobileNetV3 with accuracy 10% lower than server-side, but fully autonomous.Implementation Timeline
- Integration with an existing search API — 3–5 days.
- Full implementation (server + client) — 3–6 weeks, depending on catalog size (from 10,000 to 100,000 products).
- Project assessment — free within 1 day.
What’s Included
Deliverables include:
- Catalog audit
- Architecture selection
- UI development
- Vector index setup
- API integration
- Testing with real user photos
- Complete documentation
- Source code access
- Team training
- 30-day post-launch support
- Deployment instructions
- Demo video
With 5+ years of experience and over 50 successful visual search projects, we are ready to help. Contact us for a consultation on your use case. Get an estimate within 1 day.







