A very common message to Indian jewellery stores on WhatsApp is a photo: a screenshot of the store's own Instagram post, a cropped catalogue image, or a picture of a relative's necklace. "Is this available?"
Staff then scroll through the catalogue to find it. For anyone building AI automation for jewellery retail India stores answer on WhatsApp, a small image lookup is a good first tool, as long as a person confirms the match.
Approach: perceptual hashes first, models later
Perceptual hashes (pHash) give similar images similar fingerprints, even after resizing or light compression. For screenshots of the store's own photos, that is often enough.
from PIL import Image
import imagehash, json, pathlib
def build_index(folder):
idx = {}
for p in pathlib.Path(folder).glob('*.jpg'):
sku = p.stem # file named by SKU, e.g. NK-1042.jpg
idx[sku] = str(imagehash.phash(Image.open(p)))
return idx
def match(photo_path, idx, max_distance=12, top=3):
h = imagehash.phash(Image.open(photo_path))
scored = sorted(((h - imagehash.hex_to_hash(v), sku) for sku, v in idx.items()))
return [(sku, d) for d, sku in scored[:top] if d <= max_distance]
idx = build_index('catalogue/')
json.dump(idx, open('phash_index.json', 'w'))
Wiring it into the enquiry flow
- Customer sends a photo.
- System returns up to three candidate SKUs with their catalogue photos.
- Staff pick the right one (or none) in one tap.
- Draft reply: "Yes, this design is available. Our team will share today's price shortly."
The price is never in the automated draft.
Limits to be honest about
- Photos of a physical piece (not a screenshot) match poorly with pHash. That is where an image-embedding model may help later, still with human confirmation.
- Crops matter. Crop to the jewellery before hashing if your catalogue photos have backgrounds.
- Keep the threshold conservative; a wrong "available" is worse than "let me check".
Why start this small
It saves staff scrolling time, it is easy to test on last month's photos, and nothing goes to a customer without a person. For the bigger decision of what to build versus buy, see whether to buy a chatbot or build one.
I run NxFlowAI (Mumbai). Code is illustrative.













