Visual similarity search for ERPNext Items — upload a product image and instantly find matching items ranked by similarity score.
bench get-app https://github.com/your-org/frappe_image_search
bench install-app frappe_image_search
bench --site <site> migrate- Open any Item in ERPNext and set an image in the
Imagefield. - Build the search index (run once, or after bulk item updates):
bench --site <site> execute frappe_image_search.search.rebuild_index
- Go to
/app/image-searchin the Frappe Desk. - Drag-and-drop or upload a product image → click Search.
- Matching items appear with a Match % similarity score.
Saving an Item with an image automatically updates its index entry.
Each item image is converted to a 1286-dimensional vector combining:
- Spatial colour histograms — where colours appear in the image
- HOG (Histogram of Oriented Gradients) — shape and edge structure
- LBP (Local Binary Patterns) — surface texture (e.g. chain links vs smooth metal)
- Grayscale thumbnail — coarse intensity layout
Search computes cosine similarity between the uploaded image and all indexed items.
MIT