01 — Isolating an object

A mask identifies the pixels belonging to the product

Classification assigns a category to an image. Detection places a box around an object. Segmentation identifies its pixels; instance segmentation also distinguishes separate objects of the same class. Two shoes can therefore receive two masks.

Fully convolutional networks established pixel-level prediction. Mask R-CNN adds masks to object detection. YOLOv8-seg pursues this goal with an architecture intended for fast inference.

02 — The hypothesis

The setting can influence the product representation

An embedding summarizes an image as a list of numbers. In a fashion photo, it may represent the garment alongside the model, lighting and studio. Images can then appear close partly because of their staging.

I explored segmentation on images representing groups of similar photos. Candidate preparations include the full image, a crop around the product, the product on a neutral background and the product retaining a small margin of its setting.

03 — The measures

A good mask also needs to improve retrieval

Intersection over Union, or IoU, divides the area shared by predicted and reference masks by their union. Mean Average Precision, or mAP, summarizes detection or mask performance across thresholds and categories.

Retrieval evaluation would then examine the returned products: the proportion of relevant results, the share of relevant products recovered and their position in the list. Precision, recall and NDCG can measure those aspects. Successful image coverage, processing time and computational cost would also check whether cut-outs leave too many products unavailable to the service.

04 — The comparison

The proposed comparison keeps the catalog, encoder and index unchanged

The proposed protocol would keep the catalog, representation model and index unchanged, with or without masks. This comparison, called an ablation, would change only image preparation to examine its effect on results by category and photo type.

Segmentation remained an available research direction. Generic CLIP was sufficient for the first service’s basic visual similarity. Adding a stage and new failure modes required a measured retrieval benefit.

05 — The product decision

Removed context can sometimes be useful

A busy background may distract from the product. A lifestyle photo may also show a useful fit or intended use. Differences therefore need examination by photographic style.

I would retain full images as a fallback and assess neighbor relevance alongside the proportion of products still served. Cut-outs would be retained where their benefit justifies lost context and added cost.